Skip to content

Releases: pygame-community/pygame-ce

2.5.2.dev2

13 Oct 08:35
Compare
Choose a tag to compare
2.5.2.dev2 Pre-release
Pre-release

Pre release version of 2.5.2 for testing, we appreciate everyone who tests out our dev releases!

Release highlights

  • Promoted pygame.Window to public API. Allows use of multiple windows at once, new window operations.
  • Various rect optimizations
  • Dependency updates: SDL and lower level C libraries
  • New module pygame.typing
  • Fixed segfault in antialiased draw functions with non 32 bit surfaces

What's Changed

Read more

2.5.1

12 Aug 11:47
e6fb798
Compare
Choose a tag to compare

☀️🌊🏖️😎🏄🐚🌈🏝️🍹☀️🌊🏖️🎉
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
☀️🌊🏖️😎🏄🐚🌈🏝️🍹☀️🌊🏖️🎉

We are pleased to do yet another release of pygame-ce, and this has been possible due to the efforts of over 20 code contributors. Together, we have made 193 commits across 139 files via 80 pull requests in the last 2 months since the previous release!

Now, onto the highlights!

Highlights

  • Added Python 3.13 (just standard 3.13, no free threading yet) and PyPy for apple silicon support.

  • We have a new logo!

pygame-ce logo

  • We haven't run out of optimization ideas yet 😅, we've managed to cram a few more in this release.

New API

  • There is now a default destination position (0, 0) for Surface.blit, thanks to @damusss in #2936.
  • @itzpr3d4t0r added a new function Surface.premul_alpha_ip to premultiply alpha faster by operating in place instead of needing to allocate a new Surface. @Matiiss also helped with documentation. See #2899, #2972, and #2980.

Bugfixes

  • @Matiiss fixed passing parent_window=None to display.message_box in #2723.
  • @itzpr3d4t0r fixed an issue transform.hsl not working on certain pixel formats in #2948.
  • @oddbookworm fixed a Surface.fill where rects with negative positions would slide to (0, 0) and then fill, instead of only filling part of the Rect. See #2939 for details.
  • @ankith26 fixed using SCALED after not using SCALED in display in #2925.
  • @damusss fixed using OpenGL with a resizable pygame.Window, see #2915.

General Enhancements

  • @MyreMylar added a SIMD printout (SSE2, AVX2 & NEON) to pygame.print_debug_info() in #2897. This will help us debug any SIMD-backend specific bugs submitted by users.
  • @damusss added support for radius = 0 circles to the experimental geometry module, see #2913.
  • @zoldalma999 added new "ABGR" format support to image.frombytes and image.tobytes in #2951.
  • @zoldalma999 made the experimental Window class subclassable in #2950.
  • @ankith26 added support for iterables in display.update, see #2987.
  • @Starbuck5 and @ankith26 added Python 3.13 support in #2994 and #3030.

Performance Enhancements

  • @itzpr3d4t0r continued his quest to optimize all the things, merging improvements to PixelArray.make_surface, transform.scale2x, Surface.fblits (a fix for a performance regression), mask.from_surface and (F)Rect methods. See #2953, #2859, #2978, #2895, and #2908 for more details.
  • @mzivic7 got a 5-6% boost out of draw.aacircle (new in pygame-ce 2.5.0) in #3012.
  • @Starbuck5 boosted the performance of some draw operations on 24-bit surfaces, with a 20% improvement on single-pixel line drawing, see #3021.

Deprecations and Removals

No new deprecations this release, but-

  • @ankith26 added deprecation warnings to some already-deprecated API (freetype.was_init, scrap.lost) in #3001.

Docs and Type Hints

  • @Mega-JC created a new logo and added it to the docs (in collaboration with @kadir014 on the design), in #2965. This is great for us to express our own identity as a project.
  • @REX2626, @whangho, @Mic-lab, and @damusss made grammar and wording improvements to docs content. See #2907, #2919, #2911, #3004, and #2901.
  • @damusss made it so deprecated functions are marked with the deprecated decorator in #2984. This allows editors to show users that a function is deprecated very neatly. They also made some smaller enhancements to the type stubs in #2918 and #2926.
  • @ankith26 modernized the stubs to use python-3.8-isms in #2995
  • @MrF1ow added a Contribution Section to README to help out new contributors in #2910.
  • @MyreMylar added license identifier to README in #2890.
  • @oddbookworm changed dark theme slightly to make code more readable in some cases in #2960.

Examples and Unit Tests

Code Quality and General Maintenance

New Contributors

Thanks all

A heartfelt thank you to everyone involved! This includes not just code contributors, but also the wider community - issue reporters, PR reviewers, tutorial creators, helpers on various media platforms, developers of supp...

Read more

2.5.1.dev2

06 Aug 09:56
Compare
Choose a tag to compare
2.5.1.dev2 Pre-release
Pre-release

A pre-release before the final release, please help us by testing this!

Release highlights

This is mostly a bug-fixes-and-enhancements release, but we do have a few cool new stuff to showcase!

  • We now support and distribute wheels for CPython 3.13 and PyPy for apple silicon.
  • The experimental Window class is now subclass-able.
  • Added new method Surface.premul_alpha_ip
  • The dst argument of Surface.blit now has a default value: (0, 0). This means you can skip this argument if you are blitting a surface at the origin (top-left) of the window.

What's Changed

New Contrib...

Read more

2.5.0

12 Jun 03:59
d93ad87
Compare
Choose a tag to compare

☀️🌊🏖️😎🏄🐚🌈🏝️🍹☀️🌊🏖️🎉
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
☀️🌊🏖️😎🏄🐚🌈🏝️🍹☀️🌊🏖️🎉

This release, coming in just four months after the previous one, has been possible due to patches submitted by over 30 contributors, who have collectively made over 132 pull requests with 464 commits that touch 413 files! Impressive!

Now, onto the highlights!

Highlights

API updates

@damusss

  • added mouse.get_just_[pressed|released] in #2836
  • added display.[get|set]_window_position in #2816
  • (F)Rect can be initialized with no arguments in #2655

@whydoubt added the pitch argument for image.tobytes in #2602

@XFajk added Color.from_normalized constructor and Color.normalized property in #2693

@mzivic7 added draw.aacircle in #2800

@itzpr3d4t0r added transform.hsl in #2398

@ScriptLineStudios implemented a few convenience properties to Surface class: Surface.width, Surface.height and Surface.size in #2813

@bilhox added math.invlerp and math.remap in #2654

@ankith26 added mixer.get_driver in #2741

SIMD Performance enhancements

@Starbuck5 improved performance of SSE2 no_surf_alpha_opaque_dst blitter in #2601 and #2896. As a result of this PR, some kinds of blit operations should get a nice speed up (upto about 2.5x speedup on the testcases we used) on some hardware.

@itzpr3d4t0r

  • Partially refactor SSE2 blitters with macros in #2656.
  • Implemented AVX2 variant of Surface.premul_alpha in #2615

@MyreMylar added SIMD versions transform.invert in #2534. This gives a significant performance boost, and in the example we tested, we have observed a 12x-13x speedup!

More pygame.geometry goodies

The recently introduced experimental pygame.geometry submodule has gotten more features and polish in this release in the PRs: #2561, #2660, #2634, #2662, #2661, #2709, #2791, #2732, #2731

A big thanks to everyone who contributed to pygame-geometry so far: @Emc2356, @itzpr3d4t0r, @novialriptide, @ScriptLineStudios, @avaxar, @gresm, @Matiiss, @newpaxonian, @maqa41, and @blankRiot96

As with all experimental submodules, do remember that things in here are subject to change, and there are a lot more things to be added! See the docs for the current progress.

Other general highlights

@oddbookworm added opengl support to the experimental pygame.Window interface in #2659

@ankith26 added Wayland and PipeWire support in the linux wheels distributed by us in #1997 and #2733

@ankith26 rewrote the build machinery in the meson buildsystem, while deprecating the old build machinery in the PRs #2557, #2803, #2853, #2856, #2875, #2854, #2831, #2779. As part of these changes, a few improvements are:

  • On 32-bit ARMv7 systems (which includes many Raspberry Pi), NEON (SIMD) optimizations are now enabled by default. Therefore users of this should see a significant performance boost in many operations that can support SIMD.
  • Enhanced support for Windows MinGW/MSYS2 systems.
  • Reduced wheel size.

Deprecations and Removals

@Starbuck5 removed the pygame.threads submodule in #2762

@oddbookworm re-added and properly deprecated the blend argument of draw.aaline in #2743

Performance Enhancements

In addition to those mentioned above that are SIMD-related

@itzpr3d4t0r

  • Optimized (F)Rect.unionall(_ip) in #2784
  • Optimized (F)Rect.collideXX family of methods in #2786
  • Replaced use of internal C-API functions with more efficient alternatives in #2819

Bug fixes

@oddbookworm added shim to fix broken midi module compilation in #2863

@ankith26

  • fixed some init related issues in the experimental window API in #2860
  • fixed segmentation fault during invalid PixelArray usage in #2742

General Enhancements

@Kn4ughty made error messages for using font align clearer in #2777

@pmp-p ensured we keep supporting pygame on the web in

  • wasm: unify pygame-web/pyodide/static Freetype init in #2748
  • fixed some METH_NOARGS arg missing in #2888

@damusss

  • made transform blur on a surface with either width or height equal to 0 not raise ValueError in #2852
  • Cleanup codebase, docs and examples with American spelling in #2827

@Starbuck5 added a briefcase template to pygame-ce in #2862

@RainRat fixed typos across the repository in #2847

@robertpfeiffer relax Surface.convert conditions in #2839, now it is no longer a requirement to have called display.set_mode when this method has been invoked with a

@oddbookworm removed the xwayland warning and ensured that debug info now contains whether x11 is running or xwayland in #2823

Examples and Unit tests

@snowfruit added an example for retro scaling in #2785

@Matiiss removed undefined variable in aliens.py in #2769

@Starbuck5 fixed ftfont_test being run directly in #2763

@MyreMylar

  • Add a delta of 2 ms to test_music_pause__unpause() in #2898

@ankith26

  • Force window surface update after set_size, hopefully proper fix for that pesky frequent pypy test fail in #2865
  • Minor changes to support pytest in #2675

Docs, Tutorials and typestubs

@lispspb

  • fixed documentation mix up in attributes of object returned by get_power_state in #2734
  • added clarifications about ranges in mixer docs in #2738

@kritserv fixed an issue in pygame.display.get_caption docs in #2765

@yohanmoon added instructions for resolving setuptools issue in the docs readme in #2868

@Matiiss added more / (positional-only notation) to docs and stubs in #2691

@oddbookworm fixed indentation of surface attributes in #2900

@ankith26 did some minor docs/stubs improvements in invlerp/remap in #2902

@Starbuck5 added warning about 7.1 stereo on set_source_location in #2881

@MyreMylar

  • removed duplicate images in tutorials in #2871
  • including print_debug_info() in issue template in #2879
  • adjusted symbol color in light theme in #2891

Code quality and robustness

@cclauss

  • Minor optimizations by using comprehensions in #2771
  • PEP572 Use Python's assignment expression in #2782
  • Remove lint logic from setup.py in #2796
  • setup.py: Properly add _sdl2_data_files to data_files in #2770

@Lumiobyte fix a comment typo...

Read more

2.5.0.dev4

02 Jun 19:16
311baac
Compare
Choose a tag to compare
2.5.0.dev4 Pre-release
Pre-release

This is a pre-release for 2.5.0.

Highlights

  • New functions for surfaces: draw.aacircle() and transform.hsl. Surfaces also have new attributes Surface.width, Surface.height and Surface.size.
  • New window positioning API for pygame.display. pygame.display.get/set_window_position()
  • New math functions math.invlerp and math.remap
  • OpenGL support for the experimental Window class
  • See the highlights of 2.5.0.dev2 as well: https://github.com/pygame-community/pygame-ce/releases/tag/2.5.0.dev2

What's Changed

New Contributors

Full Changelog: 2.5.0.dev2...2.5.0.dev4

2.5.0.dev2

24 Apr 10:21
Compare
Choose a tag to compare
2.5.0.dev2 Pre-release
Pre-release

This is an early pre-release for 2.5.0, we expect to also do a dev4 before the full release.

Highlights

  • More performance optimizations: Faster blitters in some cases, faster Surface.premul_alpha, faster transform.invert, faster "multi-collide" Rect methods (like Rect.collidelist).
  • Incremental progress in pygame.geometry, more methods added to classes.
  • Wayland and PipeWire support on linux wheels we distribute.
  • Switched to the Meson build system (keeps us modern). As part of this we expect SIMD support by default on 32-bit ARM systems (like some Raspberry Pi).

Other API updates

  • Added from_normalized() method to Color.
  • pitch argument implemented in image.tobytes().
  • Rect() and FRect() now support initialization with no arguments.

What's Changed

New Contributors

Full Changelog: 2.4.1...2.5.0.dev2

2.4.1

20 Feb 06:40
Compare
Choose a tag to compare

🎩⚓📺💽🦾🎩⚓📺💽🦾🎩⚓📺💽🦾
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
🎩⚓📺💽🦾🎩⚓📺💽🦾🎩⚓📺💽🦾

Hello! This is a smaller release focused on bugfixes and small updates that we've developed on the course to 2.5.0. Rather than waiting for 2.5.0 to get these out into the world, we're doing this release to get bugfixes and small updates out into the world as soon as possible.

Special thanks to all our contributors and reviewers. Check out the changes!

Bugfixes

  • @Starbuck5 Fixed a 2.3.0 regression where sysfont wouldn't provide real bold/italic fonts. (Thanks @RasmusTufvesson for reporting this). #2678
  • @Starbuck5 Fixed a rare bug involving libpng16-16.dll. #2674
  • @Matiiss Fixed a segfault that could be triggered in Surface.fblits. #2667
  • @gresm Changed local docs viewing (python -m pygame.docs) to launch a webserver on Linux, to get around permissions issues with some Linux environments. This can be accessed explicitly as python -m pygame.docs.serve. #2676
  • @pmp-p Fixed the webassembly build setup. #2653
  • @Matiiss Fixed a memory leak in Renderer.to_surface. #2665

Dependencies

  • @Matiiss updated the build to SDL_ttf 2.22.0 (fixing an issue where "\n\n" would segfault multiline-rendering). #2688
  • @ankith26 updated the build to SDL_mixer 2.8.0 (adding support for wavpack music/sound). #2703
  • @Starbuck5 updated the build to SDL_image 2.8.2 (also fixing a rare bug involving libpng, mentioned earlier). #2674

Documentation and examples

CI and tests

New contributors

Community showcase

Clear Code released a new pygame tutorial meant specifically for pygame-ce, check it out: https://www.youtube.com/watch?v=WViyCAa6yLI

Full Changelog: 2.4.0...2.4.1

2.4.0 - The happy new year release

02 Jan 08:44
4356e63
Compare
Choose a tag to compare

☀️🏫🎊🏡🎆🏠🕛🏫🌈🎄🏩🏪🎇🏠🎉🏡🪅
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
☀️🏫🎊🏡🎆🏠🕛🏫🌈🎄🏩🏪🎇🏠🎉🏡🪅

Happy new year! And with that, hello and welcome to yet another release of pygame-ce!

In about 4 months since the last release, this release has seen 36 contributors make over 150 pull requests and 606 commits with 81,203 line additions and 88,026 line deletions across 375 files! Wow!

The 2.4.x series drops support for Python 3.7, which has reached EOL. If you are still using this, consider upgrading to a newer Python version!

Special thanks to all our new (and returning after a while) contributors. Check out the changes!

Notable changes

🟢 A new experimental geometry submodule with a Circle class

A new submodule is making its way to pygame, how exciting!

The pygame_geometry project started with the purpose of helping users integrate special colliders more easily, by providing implementations for things like polygons, circles, lines, and raycasting. This submodule is still in early development and is very much experimental, but is set to slowly make its way into pygame-ce over the next couple of releases.

A big thanks to everyone who contributed to pygame-geometry so far: @Emc2356, @itzpr3d4t0r, @novialriptide, @ScriptLineStudios, @avaxar, @gresm, @Matiiss, @newpaxonian, @maqa41 and @blankRiot96

Parts of the submodule were ported bit by bit in the PRs #2268, #2562, #2560, #2614, #2540, #2536, #2519 and #2545

As with all experimental submodules, do remember that things in here are subject to change, and there are a lot more things to be added! See the docs for the current progress.

🚀 More SIMD-based performance enhancements

Did you know pygame-ce uses optimized assembly? We use single instruction, multiple data (SIMD) instructions to speed up operations with lots of parallel computations. In this release, we've used this to increase performance of several transform and Surface operations (with more to come in future releases). These optimizations target Intel/AMD and ARM architectures.

  • @MyreMylar added an optimized backend for transform.greyscale through #2421 and #2432. Expected speedup: 7x for ARM/old x86 computers. 11x for x86 computers that support AVX2.
  • @itzpr3d4t0r worked on speeding Surface.fill when used with blend flags in #2566, #2382 and #2565. Expected speedup: Ridiculously faster, like 50-100x faster
  • @Starbuck5 added a new optimized backend for transform.smoothscale in #2473 and #2544. Expected speedup: 15% faster on x86, 35% faster on ARM.

🪟 Improvements to the experimental Window class

A lot of nice work went behind the experimental Window class in this release. The Window class enables controlling multiple windows, and enables cool new windowing features over the pygame.display API. This is important because we hope the Window API exits experimental status soon! See the docs for the current progress.

API Changes

New API

Updated API

  • @yunline improved subpixel rendering (float coordinates) for _sdl2.video.Texture and _sdl2.video.Renderer in #2039
  • @yunline added support for int/str color values in _sdl2.video module in #2400
  • @gresm added and improved support for subclassing mixer.Sound and mixer.Channel in #2590
  • @oddbookworm added keyword argument support to Rect.collidedict[all] in #2309
  • @oddbookworm did some changes to allow clamp_magnitudeing of the zero vector when possible in #2598
  • @Starbuck5 updated our build to use SDL_image 2.8.0, which adds support for QOI images, in #2595.

Removals and deprecations

Performance enchancements

In addition to those mentioned above that are SIMD-related

  • @Starbuck5 optimized vector argument parsing in #2443, so Vector methods that operate on another Vector (like move_towards) are now ~10% faster.
  • @itzpr3d4t0r made many [F]Rect methods implement the FASTCALL convention in #2043, #2563 and #2570. All the updated functions should now work faster!
  • @Matiiss and @itzpr3d4t0r optimized hadling of [F]Rect arguments in #2041 and #2465.

Bug fixes

  • @dr0id added checks to disable font API usage when the subsystem is not initialized in #2371
  • @oddbookworm fixed an underflow issue in tick_busy_loop in #2466
  • @Damus666 did some WASM related fixes in display, math and color submodules in #2480 and #2482 (by adding required PyObject *_null parameter to functions marked with METH_NOARGS)
  • @pmp-p fixed a WASM loader incorrect target issue in #2586
  • A team of new contributors: @igordsm, @JorasOliveira, @Antonioarf, @jpgianfaldoni, @caioesr, @cicerotcv and @nataliaqmc fixed a colorkey issue in transform.rotozoom in #2491
  • @yunline fix a segfault in the update method of _sdl2.video.Texture in #2553
  • @ankith26 fix file-like close not called in freetype.Font in #2606
  • @Temmie3754 fixed incorrectly drawn edges in draw.polygon in #2131
  • @Temmie3754 fixed gfxdraw.bezier for when there are a lot of points in #2503
  • @MyreMylar fixed a segfault when passing empty StringIO/File objects to Font in #2548
  • @MyreMylar fixed RLE related issues in the transform module in #2535
  • @MyreMylar prevented an unnecessary warning from being raised when using SysFont and the default font in #2543
  • @Starbuck5 implemented a fix for windows webcams that don't report framerate crashing pygame.camera in #2574
  • @Starbuck5 fixed image.get_sdl_image_version incorrectly handling the linked argument in #2597

Test and examples related improvements

Docs and typing related enhancements

Other general updates

Read more

2.4.0.dev4

25 Dec 06:45
3a6d0ae
Compare
Choose a tag to compare
2.4.0.dev4 Pre-release
Pre-release

Hello!

A final dev pre-release before the release of 2.4.0 - please test it!

🍾 🐍 🎉 🌈

The 2.4.x series drops support for Python 3.7, which has reached EOL. If you are using this python version, consider upgrading!

(Yes these notes are mostly autogenerated, if something is missing from here, please do reach out and let us know! The notes for the final release is going to be more handwritten and polished)

Notable new features

  • 🟢 A new, experimental, Circle geometry class - like Rect & FRect, but for Circles.
  • 🚀 More SIMD based performance enhancements - for the transform submodule and filling surfaces with special blend modes.
  • 🪟 More improvements to the experimental Window class - should be a lot easier to use for standard pygame software rendering using (e.g. using .blit()).
  • 🐛 And, as usual, lots of more enhancements and bug fixes. You can see the full list of changes below

And special thanks to all our new (and returning after a while) contributors.

What's Changed

Read more

2.4.0.dev2

04 Oct 19:02
f08b287
Compare
Choose a tag to compare
2.4.0.dev2 Pre-release
Pre-release

A pre-release for testing before the full release, thanks to everyone! 🥳

The 2.4.x series drops support for Python 3.7, which has reached EOL. If you are using this python version, consider upgrading!

(Yes these notes are mostly autogenerated, if something is missing from here, please do reach out and let us know! The notes for the final release is going to be more handwritten and polished)

What's Changed

New Contributors

Full Changelog: 2.3.1.dev4...2.4.0.dev2