Skip to content

Releases: pygame-community/pygame-ce

2.3.1.dev4

30 Jul 10:03
b2fd18d

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

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

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

2.3.0.dev4

05 Jun 06:33

Choose a tag to compare

2.3.0.dev4 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 2.3.0.dev2...2.3.0.dev4

2.3.0.dev2

17 May 05:50

Choose a tag to compare

2.3.0.dev2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 2.2.1...2.3.0.dev2

2.2.1

02 Apr 23:34

Choose a tag to compare

pygame-ce 2.2.1

# if you're switching over from pygame/pygame,
# remove it first to avoid conflicting namespace
pip uninstall pygame
pip install pygame-ce==2.2.1

This is a quick patch release to address a reported regression in a certain type of alpha blits, after the blit optimizations from 2.2.0. We're not sure how common this issue is, only one person reported it, but we wanted to get a release out quickly to address it.

We're also including all the changes since 2.2.0 merged in the last ~week, so it's not just that bugfix, we also have some nice enhancements.

What's Changed

Enhancements

  • @ankith26 and @Starbuck5 pulled in updates for pygame's dependencies: SDL and SDL satellite libraries. This updates us with all their hard work fixing bugs. #2057, #1986

  • @Starbuck5 sped up pygame.transform.scale and scale_by by replacing our internal scaling algorithm with an SDL function which is 10-40% faster. #1884

  • @SSS-Says-Snek added some helpful information to the Surface repr. When you print a surface, it looks like <Surface(50x50x32 SW)>. Now, it might look like <Surface(50x50x32, colorkey=(255, 255, 255, 255))> or <Surface(50x50x32, global_alpha=200)>. The idea is to give more information in the representation when there is more relevant things to know about the Surface. We hope that this will help people confused by Surface behavior in debugging. #2016

  • @Sjmarf made it so font.Sysfont will emit a warning if your font choice fell back to the default font. #1973

Bugfixes

  • @Starbuck5 fixed a regression in one of the AVX2 alpha blitters, thanks to @bigwhoopgames for the bug report. #2067

  • @dr0id fixed a bug where Sysfont could rarely give you a non-existent font file on Windows. (That's what we get for believing the Windows registry) #2034

  • @robertpfeiffer fixed a regresion where having $XDG_SESSION_TYPE not set would cause a crash in display.set_mode #2079

Docs, Examples, and Types

Cleanups and Robustness

New Contributors

Other News

Full Changelog: 2.2.0...2.2.1

2.2.0

25 Mar 09:32

Choose a tag to compare

pygame-ce 2.2.0

pygame_logo_transform

  • Demo of transform grayscale, invert, and blur routines. Invert and blur new in this release.
# if you're switching over from pygame/pygame,
# remove it first to avoid conflicting namespace
pip uninstall pygame
pip install pygame-ce==2.2.0

Welcome to the newest release of pygame-ce! We're excited to share the last month's worth of merged
enhancements, bugfixes, and cleanups.

What's Changed

Enhancements

  • @Emc2356 and @yunline added pygame.FRect, a version of pygame.Rect that supports floating point values! The FRect class supports the whole pygame.Rect API. This is useful so that one can use floating point values for position, while still being a Rect. #1944, #2046

  • @Starbuck5 accelerated many types of alpha blitting using AVX2 instructions, achieving a 30-300% performance gain when blitting with transparent Surfaces (on supported systems). #2019

  • @robertpfeiffer made it possible to use VSYNC in a normal (non-SCALED) pygame display setup, also added is_vsync, get_current_refresh_rate, get_desktop_refresh_rates functions. #1874

  • @ScriptLineStudios added pygame.transform.invert, which inverts the RGB color of each pixel in a Surface. #1911

  • @yunline added pygame.transform.box_blur and pygame.transform.gaussian_blur. #1836, #2026, #2028

  • @Starbuck5 and @ankith26 added a new module! pygame.system is for miscellaneous system information. Right now it has get_pref_path to create a persistent data directory and get_pref_locales to get system locale information. #1897

  • @MyreMylar accelerated the BLEND_PREMULTIPLIED blend mode using AVX2 instructions (2-6x faster). #5, #2005

  • @oddbookworm added a new copy-paste API in the scrap module, which is easier to use and more portable. #1984

  • @andrewhong04 added a Font.name attribute, to get the proper name of the font. #1971

  • @avaxar implemented swizzling for pygame.Color-- I.e. color.rgb, color.bgr, color.garb. #1935, #1994

  • @avaxar updated several object representations to better conform to Python standards. For example, pygame.Rect(1,2,3,4) is now represented as Rect(1, 2, 3, 4) instead of <rect(1, 2, 3, 4)>. #1995

  • @yunline added full support for keyword arguments in the image module. #2010

Bugfixes

Deprecations, Potential Breaking Changes, and Removals

  • Legacy pygame.scrap functions are now deprecated. Contributed by @oddbookworm. #1984

  • pygame.fastevent has been removed. Contributed by @gresm. #1966

  • pygame.mixer now raises a FileNotFoundError when the sound isn't found on the filesystem. Contributed by @Temmie3754. #2001

Docs, Examples, and Types

Cleanups and Robustness

Operations

New Contributors

Governance

Since last release, we're proud to welcome three new members of the project!
Congratulations to @yunline, @itzpr3d4t0r, and @dr0id.

We've also elected (among the contributors) a group of three contributors to the "steering council" -- responsible for releases and for resolving debates. The current steering council is @MyreMylar, @ankith26, and @Starbuck5. See https://github.com/pygame-community/pygame-ce/wiki/The-Steering-Council.

Full Changelog: 2.1.4...2.2.0

2.2.0.dev2 - dev release for testing

23 Mar 00:12

Choose a tag to compare

Pre-release

What's Changed

New Contributors

Full Changelog: 2.1.4...2.2.0.dev2

2.1.4

05 Mar 06:58

Choose a tag to compare

pygame-ce 2.1.4

# if you're switching over from pygame/pygame,
# remove it first to avoid conflicting namespace
pip uninstall pygame
pip install pygame-ce==2.1.4

Welcome, all! This release contains all the changes in the main branch of pygame/pygame from October through early February, mainly written by pygame-ce contributors, and of course all the pygame-ce progress in the past month!

Thank you to the community for all the support since the last release!

Because this contains so many months of changes, the release notes are quite long, so prepare yourself before reading further :).

What's Changed

Enhancements

  • @Starbuck5 and @oddbookworm worked on features to make font rendering better than ever before!

    • Multiline text! You can set a pixel limit and do automatic line wrapping, and you can align text left/right/center. Additionally, Font.render will respect explicit newlines in the text. #1898
    • Internationalization! We can now render non-latin alphabets much better with new Font.set_script(...) and Font.set_direction(...) methods. For example, to render Arabic, you'd load a font that supports Arabic, Font.set_script("Arab"), and Font.set_direction(pygame.DIRECTION_RTL). #1956, upstream #3330
  • @Matiiss added pygame.mixer.music.get_metadata() to potentially grab title/album/artist/copyright metadata from music files. #8

  • @ScriptLineStudios added transform.grayscale and Color.grayscale (in case you're feeling gray). #1907

  • @itzpr3d4t0r dug into the source to optimize overhead on mouse.get_pos(), mouse.get_rel(), Rect.colliderect(), Rect.collidepoint(), Rect.collidelist(), Rect.collidelistall(). These functions don't usually bottleneck people's code, but regardless, a 30-40% speedup on them is a cool thing to have. upstream #3424, upstream #3322, #1832, #1905

  • @PurityLake optimized blit mode code, achieving a 15-20% speedup while using blit blend modes for computers without AVX2 support. upstream #3370

  • @MightyJosip optimized pygame.draw.circle's with width (I saw a 300% performance boost in one case). upstream #3550

  • @itzpr3d4t0r added Surface.fblits(), which achieves faster speeds than blits by being slightly less flexible about input, as well as being highly optimized code itself. #1831, #1965

  • @Matiiss added __round__() method for pygame.Vector(2/3). upstream #3559

  • @avaxar implemented pitch argument for pygame.image.frombuffer, pygame.image.from(string|bytes). #1863

  • @Matiiss replaced an unclear hardcoded error message with the value of SDL_GetError(). upstream #3641

  • @yunline add IS_CE constant to test for running on pygame-ce, i.e. if getattr(pygame, "IS_CE", False): print("Running pygame CE"). #1900

  • @yunline added a "window" attribute DROPFILE and DROPTEXT events. upstream #3568

  • @oddbookworm made every dependency version getter work the same way, and return linked version vs compiled version. upstream #3379 and upstream #3567

  • @PurityLake added aliases to common objects. E.g. pygame.Joystick(...) instead of pygame.joystick.Joystick(...), pygame.Font(...), pygame.Clock(...), pygame.Event(...), pygame.Channel(...). #1854

  • @oddbookworm added a debug method to print out tons of pygame details. #2

  • @avaxar implement draw_triangle and draw_quad in pygame._sdl2. #1876

  • @MyreMylar added a way to premultiply a Surface's alpha, starting on a track towards optimized alpha blits via premultiplication. upstream #3276

Bugfixes

Deprecations, Potential Breaking Changes, and Removals

  • Python 3.6 support has been dropped. Thanks @yunline for implementing that in #1896 and #1936

  • pygame.display "gamma" functionality has been deprecated as it has been removed in the upcoming SDL3. Thanks @SSS-Says-Snek for implementing that in upstream #3622

  • pgScancodeWrapper now raises TypeError when you attempt to iterate over it, since iterating it is a footgun. Thanks to @PurityLake for implementing that in #1855

Docs, Examples, and Types

Cleanups and Robustness

Read more

2.1.4.dev2 - dev release for testing

27 Feb 16:48
ce96e88

Choose a tag to compare

Pre-release

This is a development pre-release for testing.

Please let us know of any issues on the issue tracker

What's Changed

Read more