โ๏ธ๐๐ป๐ธ๏ธ๐ท๏ธ๐ง๐งโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ฏ๏ธ๐ชฆ๐ฌ๐ญ๐ซโ ๏ธโฐ๏ธ๐ฎ๐งน๐๐โโฌ๐ฆ๐
pip uninstall pygame
(if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
โ๏ธ๐๐ป๐ธ๏ธ๐ท๏ธ๐ง๐งโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ฏ๏ธ๐ชฆ๐ฌ๐ญ๐ซโ ๏ธโฐ๏ธ๐ฎ๐งน๐๐โโฌ๐ฆ๐
We're pumped to drop another pygame-ce release, thanks to the awesome efforts of 30+ contributors in this release! In the last couple of months, we've together made 286 commits, updated 281 files, and merged 85 pull requests.
Now, let's dive into what's new!
New and improved API
-
pygame.Window
has left experimental status and now been declared public API (contributed by @Starbuck5 in #3170). @damusss further enhanced the API by adding theWindow.flash
method andWindow.focused
property in #3054 and #3079 respectively. -
@damusss added a new module,
pygame.typing
, in #3002 that exports commonly used type aliases for use in type hinting. -
The experimental
pygame.geometry
module saw more API porting from its development repository in this release. A big thanks to allgeometry
project contributors: @novialriptide, @Emc2356, @itzpr3d4t0r, @ScriptLineStudios, @avaxar, @Matiiss, @newpaxonian, @maqa41, @blankRiot96, @gresm- New contributor @MrRedstone058 added additional
Circle
attributes in #3127 - @itzpr3d4t0r added the
Circle.intersect
method and the base for theLine
class in #3071 and #3131 respectively. - @damusss added the
Circle.collidelist(all)
method in #2880
- New contributor @MrRedstone058 added additional
-
@ScriptLineStudios added the
transform.solid_overlay
function in #2304 making it easier to create a single color version of an alpha possessing surface. -
@damusss added the
desktop
argument tomouse.get_pos
andmouse.get_pressed
in #3105 so you can get the position of the mouse outside of the pygame window, where this is supported by the OS. -
@damusss added the
pygame.Sound
alias to denotepygame.mixer.Sound
in #3063. That should save a few precious characters of typing.
Bugfixes
-
@Starbuck5 fixed an OpenGL issue in
Window
init in #3059 -
@oddbookworm fixed a break when the OS resizes the window in
set_mode
in #2992 -
@bilhox fixed segfault with antialiased draw functions with a depth different than 32bits in #3008
-
@pmp-p did some fixes for improved wasm support in #3137 and #3163
-
@MyreMylar fixed midi timer reset when quit in #3018
-
- Fixed aalines overlap issue in #2912
- Fixed missing pixels in
aalines
when using integer coordinates in #3144
General Enhancements
- @oddbookworm improved
Vector{2,3}.__delattr__
messaging when deletingx, y, {z}
and removedVector4
zombies in #3069, and @ankith26 applied some more related updates in #3087 - @bilhox made it so that too many arguments to
Color.from_{colorspace}
style methods now raise errors in #3125 - @damusss added handling for all color types in
transform.threshold
in #3156
Performance Enhancements
-
@Starbuck5 updated more places in
rect
code to usePyObject_Vectorcall
in #3048. The affected methods therefore see 15-22% improvements in speed.
Docs and Type Hints
-
New contributor @MrValdez added example on how
Window
behaves withWINDOWCLOSE
andQUIT
events in #3115 -
New contributor @datapythonista clarified how
Rect
and positions relate in the intro tutorial in #3111 -
@oddbookworm fixed a couple of versionadded tags that should have been versionaddedold in
display
docs in #3046 -
@itzpr3d4t0r improved
geometry
docs in #3043 -
@Starbuck5 fixed
transform.average_color
docs and stubs to match implementation in #3076 -
@yunline updated the dependency section of zh-cn README in #3119
-
@zoldalma999 fix stubcheck typing error on windows in #3147
Examples and Unit Tests
-
New contributor @avpai-dinosaur fixed
test_inflate_ip__larger
unit test in #3098
Code Quality and General Maintenance
-
New contributor @raspofabs migrated
pkgdata
code to importlib to resolve warning aboutpkg_resources
in #3061 -
@zoldalma999 ported the controller module to C in #2056
-
@oddbookworm added code coverage CI in #2990
-
- Switched code to use
PyObject_CallOneArg
where applicable in #3023 - Drop MSYS2 clang32 from our CI in #3116
- Fix whitespace and eof formatting with pre-commit in #3104
- Fix a compiler warning in debug mode in #3124
- Made sure our CI and build dependency versions are all up to date in #3123, #3100 and #3118
- Switched code to use
-
@ankith26 and @Starbuck5 continued on the work to get pygame-ce compiling with the latest SDL3 prerelease in #3141, #2975, #3145, #2933, #3146, and #3160
-
@oddbookworm and @Starbuck5 kept our SDL dependency updated in #3094 and #3168 respectively
-
@ankith26 and @Starbuck5 kept the dev release process running in #3042 and #3173 respectively
-
@dependabot kept our CI dependencies updated in #3065, #3095, #3051, #3050, #3081, #3103, #3112, #3135, #3136, #3151, #3153, and #3161
New Contributors
- @aatle made their first contribution in #3080
- @raspofabs made their first contribution in #3061
- @avpai-dinosaur made their first contribution in #3098
- @hisa10 made their first contribution in #3114
- @MrValdez made their first contribution in #3115
- @MrRedstone058 made their first contribution in #3127
- @datapythonista made their first contribution in #3111
Thanks all
A huge thank you to everyone who's been part of this journey! This goes beyond code contributors; we are grateful to the whole community - issue reporters, PR reviewers, tutorial creators, folks helping out on different platforms, developers of supporting libraries, and most importantly, all our users (yes, that also includes you, who is reading this!).
If you notice any mistakes in these notes, please let us know so we can fix them up.
Take care, and happy pygaming!
Full Changelog: 2.5.1...2.5.2