Skip to content

Releases: pygame-community/pygame-ce

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

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

2.3.2

03 Sep 17:58
bd6e38d
Compare
Choose a tag to compare

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

Hello and welcome to a shiny new bugfix release of pygame-ce! While we are working towards a 2.4.0 release, we thought it'd be nice to have a quick 2.3.2 with a couple of fixes and enhancements.

Bug fixes

  • New contributor @cyuria fixed a long standing and infamous bug in pygame.draw.arc in #2344 where arcs with widths would be incorrectly rendered with holes in between.
  • music.get_pos could segfault due to an internal zero division error, this has now been fixed by @oddbookworm in #2426
  • @ankith26 fixed a couple of overflow related bugs in mapped int color handling and improved the internal C API for it in #2349
  • @oddbookworm fixed a case of segfaulting in PixelArray in #2276
  • @Matiiss fixed Sound.__init__ incorrectly raising TypeError instead of FileNotFoundError for some inputs in #2381
  • @dr0id fixed copy.deepcopy support for Surface in #2394
  • @pmp-p fixed webassembly support of pygame.newbuffer and pygame.pixelarray in #2419 and #2413

Codebase fixes and robustness improvements

  • @pmp-p fixed compilation error when lseek64 is absent (like webassembly 32 bit mode) in #2410
  • @yunline replaced usage of PYGAMEAPI_DISPLAY_INTERNAL with the intended BUILD_STATIC in window.c in #2412
  • @dr0id added a lint warning ignore in locals.py to make the linter pass in #2393
  • @yunline bumped cython to 3.0.0 in #2395
  • @ankith26 bumped cibuildwheel in #2402 and as a result, this release now has wheels shipping for the python 3.12 release candidate, ready for the full release of Python 3.12 at the start of October!

Deprecation warnings

  • @bilhox fixed joystick doc and properly deprecated pygame.Joystick.init/get_id in #2363
  • @ankith26 deprecated passing out of range sequence lengths to colorspace setters in #2392

Unit-tests, typing and examples related improvements

New Contributors

Thanks all

Sincere thanks to everyone helping out! In addition to PR makers, as always we are thankful to the community at large and this includes issue reporters, PR reviewers, tutorial makers, admins/mods/helpers on various online forums, people who make helper libraries, and last but certainly not least, all our users including you: the person reading these notes!

If we've made a mistake in these notes, please get in touch with us to get a correction made.

Cya, have fun using pygame-ce!

Full Changelog: 2.3.1...2.3.2

2.3.1

07 Aug 06:51
2ffcf1e
Compare
Choose a tag to compare

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

Heya, welcome to another release of pygame-ce!! It's been about 2 months since the last release and there have been a lot of nice additions, enhancements and bugfixes. We hope this release treats you well until we get the next release out ;)

This release has several changes to the wheels (binaries) we distribute. We've raised our minimum MacOS version from 10.9 to 10.11, following our dependencies. Unlike previous releases, this release has wheels for aarch64 Linux, Python 3.12 beta releases, and Pypy 3.10. We've dropped wheels for Pypy3.7 due to lack of use. Thanks to @ankith26 and @Starbuck5 for these updates, in #2171, #2352, #2325, #2315, and #2335.

See what we've been working on!

New additions

  • @novialriptide added the point_size attribute to font.Font in #1961. This allows fonts to be resized after being loaded.
  • @dr0id added style_name property to font.Font/freetype.Font in #2175
  • @yunline added two pygame.system functions get_cpu_instruction_sets and get_total_ram in #2308. These can be used to find out more about the system at runtime.
  • @dr0id added new Rect/FRect methods - scale_by/scale_by_ip and @jonotassia updated these to accept keyword-arguments. This addition was ported to pygame-ce by @Starbuck5 in #2277
  • New contributor @AlexanderGroeger added functions to manage soundfonts (get_soundfont and set_soundfont) to mixer in #2274. This is relevant for midi playback through pygame.mixer.
  • @Matiiss added a few convenience classmethods - Color.from_<color_space> (i.e. Color.from_hsla) in #2177
  • @yunline added always_on_top attribute to _sdl2.video.Window in #2307. Now you can use this to force your Windows to always be highlighted at the top.

Potential breaking changes

  • @yunline fixed transform.gaussian_blur to handle radius like other standard implementations in #2246 (as an effect of this change, the output will be visually different to the older versions)
  • @that1guy232 removed the obsolete and deprecated vidcapture camera backend in #2207

Bug fixes

  • time.set_timer had a long standing bug in which one could get a segfault in some cases (like the timer duration being too low). @ankith26 fixed this in #2284 along with other enhancements to code quality and performance. As a result set_timer is now much more accurate with the timing!
  • @ankith26 fixed FRect slice subscripting to correctly return floats in #2313
  • @yunline added support for SDL_WINDOWID back, fixing a long standing compatibility issue with pygame 1 in #1953. However, this fix is not perfect, and there are some known issues with it (like certain events not working). We heavily recommend not using this.
  • pygame-ce 2.3.0 introduced a regression where SysFont could no longer handle None. @Sjmarf fixed this in #2271
  • Another pygame-ce 2.3.0 regression was in _sdl2.video.Window, this class was no longer usable when pyinstaller was used. @Starbuck5 fixed this by correctly marking a hiddenimport in the pyinstaller hook in #2287
  • @yunline fixed potential segfaults in font in #2255
  • @zoldalma999 fixed a segfault related to _sdl2.Window.from_display_module that happened on dealloc in #2341

Usage and performance enhancements

Docs and examples improvements

  • New contributor @devdanzin fixed the positioning of the theme icon of the docs when the page shrinks in #2321
  • New contributors @Martinus2004 and @JiffyRob updated existing example programs to use pygame-ce multiline text rendering. #2219, #2235
  • New contributor @IrvKalb corrected the documentation of the get_pref_path function in the system module to use the org argument in the example in #2326
  • @Mega-JC made "note" blocks in the documentation look more distinct. #2163
  • @VantaTree fixed a typo in the event docs in #2290
  • @oddbookworm removed pygame.cdrom references from documentation and code in #2327
  • @bilhox updated joystick docs to reflect changed mappings of the joycon controllers in #2258
  • @rethanon added named colors to docs of the draw and Surface modules in #2346
  • @Starbuck5 removed SDL version information where it mentions versions that are below our supported SDL version in #2334

Unittests and typing related improvements

  • @oddbookworm improved Rect/FRect typing to be more generic and accurate in #2297
  • @ankith26 made some types more lax by using a custom Sequence ABC and also fixed some other related issues in #2292
  • @ankith26 made freetype tests run again on CI and fixed minor test failures in #2383 and #2370

Code robustness and cleanups

New Contributors

Thanks all

Sincere thanks to everyone helping out! In addition to PR makers, as always we are thankful to the community at large and this includes issue reporters, PR reviewers, tutorial makers, admins/mods/helpers on various online forums, people who make helper libraries, and last but certainly not least, all our users including you: the person reading these notes!

If we've made a mistake in these notes, please get in touch with us to get a correction made.

Cya, have fun using pygame-ce!

Full Changelog: 2.3.0...2.3.1

2.3.1.dev4

30 Jul 10:03
b2fd18d
Compare
Choose a tag to compare
2.3.1.dev4 Pre-release
Pre-release

The last pre-release before the full release, for testing. Thanks to everyone! 🎉

(Yes this stuff is 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.dev2...2.3.1.dev4

2.3.1.dev2

20 Jul 19:23
8ea22ac
Compare
Choose a tag to compare
2.3.1.dev2 Pre-release
Pre-release

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

(Yes this stuff is 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.0...2.3.1.dev2

2.3.0

15 Jun 06:02
Compare
Choose a tag to compare

pygame-ce 2.3.0

☀️🌊🏖️😎🏄🐚🏝️🍹☀️🌊🏖️
pip uninstall pygame
pip install pygame-ce --upgrade
☀️🌊🏖️😎🏄🐚🏝️🍹☀️🌊🏖️

Welcome to the newest release of pygame-ce! Summer is near (here in the northern hemisphere), and with that comes the time of vacations and game jams. The pygame-ce team has been working hard on improving several things for the last few months so you can enjoy your programming activity. You will be seeing a lot of light during these months, so for a change you can now view the pygame-ce documentation in dark mode. Outside of that, there have been a lot of other improvements, bug fixes, and other stuff which are listed below. We hope you will enjoy the changes, and we will continue to improve our beloved library in the following releases.

Besides the dark mode docs, a big story in this release are improvements to the experimental pygame._sdl2 module. It now has non-skeleton documentation, and the Window class was completely rewritten in C to enable better integration with the rest of pygame-ce.

Check out what we've been working on!

What's Changed

Additions

  • @durkisneer1 added the pygame.Surface.get_frect() convenience method. #2071
  • @yunline added pygame.mixer.Channel.set_source_location() (for panning-like effects). #1844
  • @PurityLake added keyword argument support to Font.render(). #2000
  • @Sjmarf improved a font warning message emitted when requested system fonts are not found. For example: The system font 'comicsans2' couldn't be found. Did you mean: 'comicsans', 'comicsansms'? #2147

Bug Fixes

  • @ankith26 fixed audio issues on older Macs (like pygame.mixer wouldn't work at all). If you see Library not loaded: @loader_path/libmp3lame.0.dylib, this is fixed now. #2118
  • @Starbuck5 fixed a regression where "tracker music" (XM/MOD/IT files) would no longer play on Windows. #2152
  • @Starbuck5 fixed a regression in pygame.transform.scale() when scaling to a destination surface with a different pixel format. #2172
  • @yunline fixed a SystemError issue when disconnecting and reconnecting controllers. #2048
  • @Temmie3754 fixed issue when converting surface to 8 bit surface with palettes. #2031
  • @yunline made it so pygame-ce will raise an error if source and destination surfaces are the same in pygame.transform.(box/gaussian)_blur, rather than just producing incorrect results. #2161
  • @cbdj fixed the Android build configuration. #2249

Optimizations

  • @ScriptLineStudios optimized a case for pygame.draw.polygon when drawing triangles. #2126
  • @itzpr3d4t0r optimized pygame.Rect.move, pygame.Rect.move_ip (and corresponding FRect methods) with FASTCALL, a 20-40% speedup. #2040
  • @Matiiss optimized pygame.Surface.get_(f)rect with FASTCALL, achieving a 20-40% speedup as well. #2179
  • @Starbuck5 slightly improved create/destroy performance and reduced memory usage of pygame.math.Vector(2/3) (enabling future optimizations). #2174

Deprecations

  • @MyreMylar added deprecation warnings for pygame.sprite.RenderPlain, pygame.sprite.RenderClear and pygame.sprite.OrderedUpdates (will be removed in pygame-ce 2.4.0). #2036
  • @SSS-Says-Snek added deprecation warnings for pygame.image.tostring and pygame.image.fromstring in favor of (to/from)bytes. #2101

Documentation, Examples, and Type Hints

Operations and Code Quality

New Contributors

Other News

DaFluffyPotato gave us a shoutout in a video about pygame-ce on his channel, titled "Pygame CE - Better & Faster." Check it out if you're interested: https://www.youtube.com/watch?v=pYq9edSUaOw

Full Changelog: 2.2.1...2.3.0