Releases: pygame-community/pygame-ce
2.3.1.dev4
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
- 2.3.1.dev2 by @ankith26 in #2332
- Start 2.3.1.dev3 by @ankith26 in #2333
- Continue moving away from format masks again by @Starbuck5 in #2328
- Remove irrelevant SDL version information by @Starbuck5 in #2334
- removed pygame.cdrom refs everywhere by @oddbookworm in #2327
- Update joystick.rst - Switch Joy-cons mappings wrong by @bilhox in #2258
- vector2 support for Surface.get_at and set_at by @ScriptLineStudios in #2111
- Drop pypy3.7, add wheels for pypy3.10 by @Starbuck5 in #2335
- Fix typos + update sse2neon by @Starbuck5 in #2347
- Add pg_post_event and DictProxy C API to release GIL, fix timer issues and speedups by @ankith26 in #2284
- Reset window data on borrowed windows on dealloc by @zoldalma999 in #2341
- Add
__repr__for Window class by @yunline in #2345 - Rename PyClockObject to pgClockObject, remove rendered field, small cleanups by @zoldalma999 in #2351
- Fix warnings in video.c by @yunline in #2343
- Port SDL_cpuinfo.h by @yunline in #2308
- Add Named Colors to docs for pygame.draw and pygame.Surface by @rethanon in #2346
- Re-add CircleCI for aarch64 builds by @ankith26 in #2352
- Corrected MacOS get_pref_path() documentation by @IrvKalb in #2326
- Made
Surface.set_at()fastcall by @itzpr3d4t0r in #2330 - add style_name property to font and freetype font by @dr0id in #2175
- Use OIDC to publish PyPI releases by @ankith26 in #2355
- Support
SDL_WINDOWIDby @yunline in #1953 - Enabling users to set the soundfont on midi playback by @AlexanderGroeger in #2274
- Don't use SDL_ name for our compat layer by @Starbuck5 in #2356
- Add
.point_sizeattribute modifier for fonts by @andrewhong04 in #1961
New Contributors
- @IrvKalb made their first contribution in #2326
- @AlexanderGroeger made their first contribution in #2274
Full Changelog: 2.3.1.dev2...2.3.1.dev4
2.3.1.dev2
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
- 2.3.0 by @Starbuck5 in #2250
- Start 2.3.1 by @Starbuck5 in #2251
- Bump docker/metadata-action from 4.4.0 to 4.5.0 by @dependabot in #2242
- Bump docker/login-action from 2.1.0 to 2.2.0 by @dependabot in #2241
- Bump docker/build-push-action from 4.0.0 to 4.1.0 by @dependabot in #2240
- Added multiline text rendering to eventlist example by @Martinus2004 in #2219
- Remove obsolete vidcapture camera backend (#1660) by @that1guy232 in #2207
- Fix segfault when rendering fonts by @yunline in #2255
- Bump docker/metadata-action from 4.5.0 to 4.6.0 by @dependabot in #2260
- Bump docker/build-push-action from 4.1.0 to 4.1.1 by @dependabot in #2261
- Fix SysFont None issue by @Sjmarf in #2271
- Gaussian blur radius fix by @yunline in #2246
- Restore SDL 2.0.9 support by @Starbuck5 in #2272
- Adjust pypi tags by @Starbuck5 in #2279
- Remove unused code from test utils by @Starbuck5 in #2278
- Raise macOS deployment target to 10.11 by @Starbuck5 in #2171
- Port Rect.scale_by(|_ip) by @Starbuck5 in #2277
- Add window hiddenimport by @Starbuck5 in #2287
- Reveal
.. note::reST block background color again by @Mega-JC in #2163 - Fixed typo in event.rst by @VantaTree in #2290
- Added
Color.from_<color_space>classmethods by @Matiiss in #2177 - Remove the old Window cython sources by @yunline in #2294
- Regenerate Cython using 0.29.36 by @Starbuck5 in #2305
- Update pixelformat to modern format, fix typos by @Starbuck5 in #2301
- Improved Rect and FRect typing to be more generic and accurate by @oddbookworm in #2297
- 2.26.5 by @Starbuck5 in #2317
- Fix FRect slice subscripting by @ankith26 in #2313
- Introduce new custom 'Sequence' ABC, fix issues by @ankith26 in #2292
- Bump pypa/cibuildwheel from 2.13.1 to 2.14.1 by @dependabot in #2324
- Remove unnecessary macro by @Starbuck5 in #2316
- Move to SDL 2.26.5 by @Starbuck5 in #2318
- Fix theme icon positioning when the page shrinks (fix #2320) by @devdanzin in #2321
- Multiline examples by @JiffyRob in #2235
- Replace Py_FileSystemDefaultEncoding by @Starbuck5 in #2315
- Add
always_on_topattribute for video.Window by @yunline in #2307 - 3.12 wheels by @Starbuck5 in #2325
New Contributors
- @Martinus2004 made their first contribution in #2219
- @devdanzin made their first contribution in #2321
- @JiffyRob made their first contribution in #2235
Full Changelog: 2.3.0...2.3.1.dev2
2.3.0
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
SystemErrorissue 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.polygonwhen 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)rectwith 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.RenderClearandpygame.sprite.OrderedUpdates(will be removed in pygame-ce 2.4.0). #2036 - @SSS-Says-Snek added deprecation warnings for
pygame.image.tostringandpygame.image.fromstringin favor of(to/from)bytes. #2101
Documentation, Examples, and Type Hints
- @Notenlish added an optional dark mode to the pygame-ce documentation! What an impressive first contribution! This can be enabled/disabled by the sun/moon icon next to the search bar in the upper right. @MyreMylar and @rethanon also contributed to fix a few styling gremlins that emerged.. #2122, #2226, #2215, #2248
- @oddbookworm, @Temmie3754, @narilee2006, @Starbuck5 all worked on "pygame-ce-ification"-- making sure the documentation and code reflect "pygame-ce" rather than "pygame" in relevant places. #2203, #2133, #2112, #2194
- @Mega-JC vastly expanded the experimental pygame._sdl2 documentation. #2128
- @Starbuck5, @narilee2006, and @yunline contributed miscellaneous documentation improvements. #2183, #2096, #2099, #2106
- @that1guy232 improved several of the pygame-ce example programs, making them more modern and consistent. #2204, #2191, #2193
- @oddbookworm added type hints for
pygame.PixelArray. #2113 - @bilhox and @jd-develop worked to translate the README into French, @yolowex translated the README into Persian. #2140, #2187, #2201
Operations and Code Quality
- @yunline rewrote the _sdl2.video.Window class into C from Cython, which is huge for our processes moving forward. #2114
- @yunline changed the default _sdl2.video.Window window title to match pygame.display. #2200
- @MyreMylar, @ankith26, and @Starbuck5 kept pygame-ce operations moving forward. #2213, #2173, #2212, (+release PRs)
- @yunline and @Starbuck5 worked explicitly on code quality to stay resilient for future changes. #1939, #2196, #2210, #2108, #2123, #2195
New Contributors
- @narilee2006 made their first contribution in #2096
- @durkisneer1 made their first contribution in #2071
- @bilhox made their first contribution in #2140
- @that1guy232 made their first contribution in #2191
- @jd-develop made their first contribution in #2187
- @yolowex made their first contribution in #2201
- @Notenlish made their first contribution in #2122
- @cbdj made their first contribution in #2249
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
What's Changed
- 2.3.0.dev2 by @Starbuck5 in #2168
- 2.3.0.dev3 by @Starbuck5 in #2169
- added stub info for PixelArray.getitem by @oddbookworm in #2113
- Manually bump actions/cache, minor usage updates by @ankith26 in #2173
- Raise an error when source and destination surfaces are the same (in
box_blurandgaussian_blur). by @yunline in #2161 _sdl2.videodocs rewrite, minor reorderings & method signature changes by @Mega-JC in #2128- Update cursors_module_example.py by @that1guy232 in #2191
- Minor documentation updates by @Starbuck5 in #2183
- Updated Chimp Example Explanation for #2033 by @that1guy232 in #2193
- A bit of pygame-ce-ification by @Starbuck5 in #2194
- Include more info in version by @Starbuck5 in #2195
- Use
Py_TYPE(self)->tp_free(self)instead ofPyObject_Freeby @yunline in #2196 - Update README.fr.rst (fix French grammar/punctuation/spelling/etc. mistakes) by @jd-develop in #2187
- Updated scrap code example. by @that1guy232 in #2197
- Fix the default value of title argument in video.Window by @yunline in #2200
- Re-allow destsurf scale w/ diff but compatible pixelformats by @Starbuck5 in #2172
- Bump pypa/cibuildwheel from 2.12.3 to 2.13.0 by @dependabot in #2205
- Issue redirection (correct one) by @oddbookworm in #2203
- Optimize
Surface.get_(f)rectby @Matiiss in #2179 - updated scrap related code. by @that1guy232 in #2204
- Remove
event._joy_instance_mapby @yunline in #2048 - Optimize vector coords memory by @Starbuck5 in #2174
- Added persian transaltion for README.rst by @mmdmoa in #2201
- Font warning spellcheck by @Sjmarf in #2147
- Add dark theme for documentation by @Notenlish in #2122
- Update sse2neon to latest version by @MyreMylar in #2213
- Fix the large inline code sections in the dark theme by @MyreMylar in #2215
- speedup for triangle rendering by @ScriptLineStudios in #2126
- Use builtin broadcasting intrinsics in blitters by @Starbuck5 in #2210
- fix search page green background in dark theme by @Notenlish in #2226
- Fix MAC_ARCH environment variable on CI by @MyreMylar in #2212
- Port video.Window to C by @yunline in #2114
- Add mixer.Channel.set_source_location() by @yunline in #1844
- Fix issue with converting surfaces to 8 bit surfaces with palettes by @Temmie3754 in #2031
New Contributors
- @that1guy232 made their first contribution in #2191
- @jd-develop made their first contribution in #2187
- @mmdmoa made their first contribution in #2201
- @Notenlish made their first contribution in #2122
Full Changelog: 2.3.0.dev2...2.3.0.dev4
2.3.0.dev2
What's Changed
- Release/2.2.1 by @Starbuck5 in #2093
- Re-start 2.3 by @Starbuck5 in #2094
- Redirect home_uri to pyga.me/docs by @narilee2006 in #2096
- New title for the unittests README. by @narilee2006 in #2099
- Fix typo by @yunline in #2106
- Create Surface.get_frect method by @durkisneer1 in #2071
- Undocument and deprecate redundant sprite group classes by @MyreMylar in #2036
- Add ce by @narilee2006 in #2112
- Start move away from format masks (prep for SDL3) by @Starbuck5 in #2108
- Bump actions/checkout from 3.5.0 to 3.5.2 by @dependabot in #2119
- Made
Rect/FRectmove/move_ipFASTCALL by @itzpr3d4t0r in #2040 - Bump docker/metadata-action from 4.3.0 to 4.4.0 by @dependabot in #2129
- Bump pypa/cibuildwheel from 2.12.1 to 2.12.3 by @dependabot in #2130
- Continue moving away from format masks by @Starbuck5 in #2123
- Deprecate pygame.image.tostring and fromstring by @SSS-Says-Snek in #2101
- Fix mac wheels issue: sndfile disable lame mpeg by @ankith26 in #2118
- french README by @bilhox in #2140
- fix #2087 until SDL catches up by @robertpfeiffer in #2088
- Tracker music fixes by @Starbuck5 in #2151
- Bump robinraju/release-downloader from 1.7 to 1.8 by @dependabot in #2148
- Update docs to use pygame-ce versioning by @Temmie3754 in #2133
- Fixes for tracker music support, add test by @Starbuck5 in #2152
- Clean video.pyx (Move declarations to pxd file) by @yunline in #1939
- Added keyword arguments to
Font.renderby @PurityLake in #2000
New Contributors
- @narilee2006 made their first contribution in #2096
- @durkisneer1 made their first contribution in #2071
- @bilhox made their first contribution in #2140
Full Changelog: 2.2.1...2.3.0.dev2
2.2.1
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.1This 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.scaleandscale_byby 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.Sysfontwill 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
-
@yunline added a Simplified Chinese version of the README. #1848, #2061
-
@gresm and @Starbuck5 spruced up the examples to use more preferred pygame conventions. #2072, #2074
-
@VantaTree made
transformdocs consistent about expectations for thedest_surfaceparameter of many functions. #2049
Cleanups and Robustness
-
@yunline and @Starbuck5 both improved how bits of internal C code are written. #2065, #2064
-
@Starbuck5 fixed a few typos and retargeted some old links. #2059, #2075
-
@yunline fixed an internal problem where some SDL constants were shadowed with 0. #2078
New Contributors
- @Sjmarf made their first contribution in #1973
- @VantaTree made their first contribution in #2049
Other News
- The pygame community organization now has a twitter acount. Consider following if you use the bird site :). https://twitter.com/pygamecommunity
Full Changelog: 2.2.0...2.2.1
2.2.0
pygame-ce 2.2.0
- 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 ofpygame.Rectthat supports floating point values! TheFRectclass 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_ratesfunctions. #1874 -
@ScriptLineStudios added
pygame.transform.invert, which inverts the RGB color of each pixel in a Surface. #1911 -
@yunline added
pygame.transform.box_blurandpygame.transform.gaussian_blur. #1836, #2026, #2028 -
@Starbuck5 and @ankith26 added a new module!
pygame.systemis for miscellaneous system information. Right now it hasget_pref_pathto create a persistent data directory andget_pref_localesto 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
scrapmodule, which is easier to use and more portable. #1984 -
@andrewhong04 added a
Font.nameattribute, 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 asRect(1, 2, 3, 4)instead of<rect(1, 2, 3, 4)>. #1995 -
@yunline added full support for keyword arguments in the
imagemodule. #2010
Bugfixes
-
@robertpfeiffer and @oddbookworm ensured that circles will draw properly even if way off screen. #2003, #2032
-
@yunline fixed a possible segfault in
Surface.convert()on 8-bit surfaces. #2007 -
@Temmie3754 fixed issues where
pygame.draw.linecould be cut off across Surfaces. #1998
Deprecations, Potential Breaking Changes, and Removals
-
Legacy
pygame.scrapfunctions are now deprecated. Contributed by @oddbookworm. #1984 -
pygame.fasteventhas been removed. Contributed by @gresm. #1966 -
pygame.mixernow raises a FileNotFoundError when the sound isn't found on the filesystem. Contributed by @Temmie3754. #2001
Docs, Examples, and Types
-
@oddbookworm and @Temmie3754 improved the documentation content. #1992, #1996, #2024
-
@yunline added type hints for draw_triangle and draw_quad in sdl2_video. #2018
Cleanups and Robustness
-
@Starbuck5, @itzpr3d4t0r, and @simplyrohan contributed refactors in the codebase. #1993, #2002, #2011, #2013
-
@zoldalma999 and @MyreMylar submitted some internal changes for controller and sprite. #1903, #1942
-
@simplyrohan made sure the version checking of SDL_ttf versions is correct. #1991
Operations
-
@oddbookworm added venv to gitignore. #1985
-
@yunline removed a now unnecessary GH actions workaround. #2012
New Contributors
- @simplyrohan made their first contribution in #1991
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
What's Changed
- Bump docker/login-action from 1.10.0 to 2.1.0 by @dependabot in #1979
- Bump docker/metadata-action from 3.3.0 to 4.3.0 by @dependabot in #1978
- Bump docker/build-push-action from 2.5.0 to 4.0.0 by @dependabot in #1976
- 2.1.4 by @Starbuck5 in #1983
- Start 2.2 by @Starbuck5 in #1982
- Implement swizzling for
pygame.Colorby @avaxar in #1935 - Dependabot: Update versions of docker related actions by @ankith26 in #1980
- pygame.transform.invert by @ScriptLineStudios in #1911
- add venv to gitignore by @oddbookworm in #1985
- doc fixes for
Font.set_directionby @oddbookworm in #1992 - added missing versionadded tags in recent new API docs by @oddbookworm in #1996
- Rework doc_ file generation by @Starbuck5 in #1993
- Fix color swizzling as per request in #1989 by @avaxar in #1994
- Modified docs css by @yunline in #2004
- Remove pygame.fastevent by @gresm in #1966
- Another minor fblits refactor by @itzpr3d4t0r in #2002
- Fix the segfault of
Surface.convert(). by @yunline in #2007 - Add test that the surface to be pre-multiplied has pixels by @MyreMylar in #2005
- Move cython based controller module to controller_old by @zoldalma999 in #1903
- Change font.c to compare with SDL_ttf instead of SDL itself by @simplyrohan in #1991
- transform.blur by @yunline in #1836
- System module by @Starbuck5 in #1897
- Add font name getter by @andrewhong04 in #1971
- Add keyword for image by @yunline in #2010
- Add image & rect properties to Sprite by @MyreMylar in #1942
- Remove
sudo apt-mark hold grub-efi-amd64-signedfor Ubuntu20.04 by @yunline in #2012 - Fix text input example by @yunline in #2009
- Renamed "
the_args" to "blend_flags" everywhere by @itzpr3d4t0r in #2011 - Revise
reproverload as per request in #1988 by @avaxar in #1995 - Add unifont to the font list of examples/textinput.py by @yunline in #2015
- Bump pypa/cibuildwheel from 2.12.0 to 2.12.1 by @dependabot in #2017
- Update file comment header titles by @simplyrohan in #2013
- Circle fix by @robertpfeiffer in #2003
- Better VSync by @robertpfeiffer in #1874
- Change mixer to use FileNotFoundError and fix related tests by @Temmie3754 in #2001
- Fix cursor doc formatting and improve consistency by @Temmie3754 in #2024
- Add type hint for draw_triangle and draw_quad by @yunline in #2018
- Fix issues and inconsistency with draw_line_width by @Temmie3754 in #1998
- fixed banding bug with draw.circle by @oddbookworm in #2032
- Bump actions/checkout from 3.3.0 to 3.4.0 by @dependabot in #2037
- Implement FRect by @yunline and @Emc2356 in #1944
- Add an AVX2 version of the BLEND_PREMULTIPLIED blend mode by @MyreMylar in #5
- AVX2 alpha blitters by @Starbuck5 in #2019
- Raise
ValueErrorwhen bluring an indexed surface. by @yunline in #2026
New Contributors
- @simplyrohan made their first contribution in #1991
Full Changelog: 2.1.4...2.2.0.dev2
2.1.4
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.renderwill respect explicit newlines in the text. #1898 - Internationalization! We can now render non-latin alphabets much better with new
Font.set_script(...)andFont.set_direction(...)methods. For example, to render Arabic, you'd load a font that supports Arabic,Font.set_script("Arab"), andFont.set_direction(pygame.DIRECTION_RTL). #1956, upstream #3330
- Multiline text! You can set a pixel limit and do automatic line wrapping, and you can align text left/right/center. Additionally,
-
@Matiiss added
pygame.mixer.music.get_metadata()to potentially grab title/album/artist/copyright metadata from music files. #8 -
@ScriptLineStudios added
transform.grayscaleandColor.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 thanblitsby 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
pitchargument forpygame.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_CEconstant 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 ofpygame.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_triangleanddraw_quadinpygame._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
-
@ankith26 fixed the "MacOS font rendering bug" that shall live in infamy-- where MacOS < 12 macs couldn't render fonts at all. #1922
-
@zoldalma999 made sure updating a Texture with a Surface takes into account pixel format. upstream #3548
-
@ankith26 fixed a regression where
camera.list_cameras()would be empty on Linux. upstream #3594 -
@ankith26 fixed several memory leaks in the math module. upstream #3590
-
@oddbookworm fixed potential segfaults in
PixelArray,Surface,draw, andtransform. upstream #3666, #1940 -
@ankith26 fixed a bizarre bug where fast mouse scrolls would have a bogus
.buttonattribute. upstream #3642 -
@yunline fixed reversed
Window.borderlessin the _sdl2 module. #1869 -
@Temmie3754 ensured toggle_fullscreen works for maximized window. #4
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 -
pgScancodeWrappernow raisesTypeErrorwhen you attempt to iterate over it, since iterating it is a footgun. Thanks to @PurityLake for implementing that in #1855
Docs, Examples, and Types
-
@pgattic, @winterhazel, @CodeMaster7000, @chimosky, and @IlmastroStefanuzzo fixed typos and grammar mistakes. upstream #3554, upstream #3562, upstream #3625, upstream #3694, #1879
-
@Matiiss and @andrewhong04 polished up
PixelArrayandmathdocs. upstream #3544, upstream #3581, upstream #3574. -
@Linkid fixed several links in the docs. upstream #3549
-
@zoldalma999 documented
SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS. upstream #3546 -
@Starbuck5 added a pygame quickstart section to docs front page. upstream #3541
-
@SmashedFrenzy16 updated README to replace a list with a table. upstream #3638
-
@andrewhong04, @yunline, @PurityLake, and @khiaxeng worked on enhancements throughout the docs. upstream #3684, upstream #3558, #1916, #1920, #1964
-
@pycoinfu overhauled the "stars" example. #1909
-
@ankith26, @Matiiss, and @yunline fixed typestub related errors in upstream #3395, #1885, #1
Cleanups and Robustness
-
@yunline, @MyreMylar, @Koswu, and @Starbuck5 removed unused and obsolete code from the codebase. #1895, #1904, upstream #3563, upstream #3553, upstream #3618 , upstream #3617
-
@ankith26 and @Starbuck5 worked to make the SIMD code (low level code for blitting) simpler and emit better warnings. upstream #3501, upstream #3588
-
@ankith26 worked to make the key compat table more robust. upstream #3426
-
@MyreMylar, @Matiis, @itzpr3d4t0r, @Starbuck5, and @TheVroum worked to simplify and spruce up code throughout the codebase. upstream #3530, #15, upstream #3655, upstream #3633, #1938, upstream #3577, [upstream #3620](...
2.1.4.dev2 - dev release for testing
This is a development pre-release for testing.
Please let us know of any issues on the issue tracker
What's Changed
- SSE2 blitter Optimisations by @PurityLake in upstream #3370
- Tweaking version getters for sdl modules and freetype by @oddbookworm in upstream #3379
- Warn when SIMD is usable but not compiled by @ankith26 in upstream #3501
- Changed minor name mismatch in
PixelArraydocs by @Matiiss in upstream #3544 - Document
SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTSby @zoldalma999 in upstream #3546 - Move
pg_tuple_from_values_int()into header, rename & add triple variant by @MyreMylar in upstream #3530 mouse.get_pos(),mouse.get_rel()optimizations by @itzpr3d4t0r in upstream #3424- Minor typo in the "pygame.Color" docs by @pgattic in upstream #3554
- Remove Python < 3.2 compatibility shim by @Starbuck5 in upstream #3553
- Docs: fix links by @Linkid in upstream #3549
- Fix typo in music.rst by @winterhazel in upstream #3562
- Delete
test_test_.pyby @Koswu in upstream #3563 - Add info on viewing docs locally by @andrewhong04 in upstream #3558
- Modify key compat table to store key-name pairs (fixes a rare bug) by @ankith26 in upstream #3426
- Adjust surface masks to create a proper 24 bit
Surfaceby @Starbuck5 in upstream #3577 - Add vector zero constructor clarification by @andrewhong04 in upstream #3574
- Minor
pygame.mathdoc enhancements by @Matiiss in upstream #3581 - Improved
.colliderect()method performance by @itzpr3d4t0r in upstream #3322 - Add VScode? _headers/ folder to gitignore by @Starbuck5 in upstream #3587
- Remove LGTM badges by @andrewhong04 in upstream #3599
- Fix
list_camerasbeing empty on linux by @ankith26 in upstream #3594 - Fix some more math memory leaks by @ankith26 in upstream #3590
- Use Python 3.11.0 rather than 3.11rc2 by @Starbuck5 in upstream #3611
- Add quickstart section to docs front page by @Starbuck5 in upstream #3541
- Add
.premul_alpha()method to surface by @MyreMylar in upstream #3276 - Add "window" attribute to DROPFILE and DROPTEXT event by @yunline in upstream #3568
- Added
__round__()method for vectors by @Matiiss in upstream #3559 - Segfault fix in
freetype.get_version()by @oddbookworm in upstream #3567 - Convert surface to texture's pixel format in
Texture.update()by @zoldalma999 in upstream #3548 - Performance improvement for
draw.circle()by @MightyJosip in upstream #3550 - Fix build errors on win_arm64 by @cgohlke in upstream #3583
- Consolidate SSE2 and NEON code paths by @Starbuck5 in upstream #3588
- Correct set_(shifts/masks) docs and cleanup code by @Starbuck5 in upstream #3620
- Capitalise 'Pygame' in readme by @CodeMaster7000 in upstream #3625
- Deprecate gamma and _sdl2 window brightness functionality by @SSS-Says-Snek in upstream #3622
- Change all (to|from)string to (to|from)bytes in image.c by @Matiiss in upstream #3633
- Update docs generation to sphinx 6.0 by @MyreMylar in upstream #3647
- Raise minimum SDL version to 2.0.8 by @Starbuck5 in upstream #3618
- Replace
music.set_pos()current error message withSDL_GetError()by @Matiiss in upstream #3641 - Update README with a table for the dependency versions by @SmashedFrenzy16 in upstream #3638
- Fixed segfault (in
PixelArray) by @oddbookworm in upstream #3666 - Fix event
.buttonattribute for fast mousewheel by @ankith26 in upstream #3642 - Change casting to list to using copy in
pygame.spriteby @Matiiss in upstream #3655 - Removing redudancy in regex by @TheVroum in upstream #3595
- Remove bit of MIR code by @Starbuck5 in upstream #3617
- Fix
scrapmodule typing (use only bytes and not AnyStr) by @ankith26 in upstream #3395 - pygame wasm test CI optimization by @pmp-p in upstream #3593
- Syntax highlighting fix by @andrewhong04 in upstream #3684
- Port
SDL_ttftext shaping capability by @Starbuck5 in upstream #3330 - Update linter ubuntu version by @MyreMylar in upstream #3698
- Linter/formatter run (
blackversion update) by @andrewhong04 in upstream #3695 - Correct update statement by @chimosky in upstream #3694
- Initial retargeting for fork by @Starbuck5 in #6
- Fix a typestub inconsistency causing the 22.04 ubuntu workflow to fail by @oddbookworm in #1
- More retargeting by @Starbuck5 in #7
- Fix project logo URL in
README.rstby @Mega-JC in #9 - Revert "Fix project logo URL in
README.rst" by @Mega-JC in #11 - more retargeting to the fork by @oddbookworm in #13
- Reword fork project description in README by @Mega-JC in #10
- Add a windows CI build by @MyreMylar in #790
- Try adding a -ce to fix Debian CI by @MyreMylar in #1838
- fix math.c formatting by @MyreMylar in #1849
- Add concurrecy check to CI runs. by @MyreMylar in #1852
- Add an initial CODEOWNERS file to the pygame-ce project by @MyreMylar in #14
- Use prebuilt bundle hosted by us by @Starbuck5 in #1858
- Spelling and grammar fixes suggested by PyCharm code inspection by @MyreMylar in #15
- Fixed reversed
Window.borderlessby @yunline in #1869 - Documentation retarget by @andrewhong04 in #1865
- wasm ci : bump sdk version, and python 3.11.2 by @pmp-p in #1861
- Add aliases for most common objects by @PurityLake in #1854
- updated "commits since badge" to reflect commits since 2.1.3 by @oddbookworm in #1871
- updated badges by @oddbookworm in #1880
- Reestablish uniformity across sentence terminations through the addition of a full stop character by @IlmastroStefanuzzo in #1879
collidepoint()performance improvements by @itzpr3d4t0r in #1832- Fix
mypyfailing in Python <= 3.7 due to positional-only argument syntax by @Matiiss in #1885 - Bump version of actions/checkout by @MyreMylar in #1882
- Add 'stubcheck' into setup.py by @yunline in #1866
- Use
SDL_GetTicks64instead ofSDL_GetTicksby @avaxar in #1873 - Add brew install pkg-config to mac builds by @ankith26 in #1888
- Debug method by @oddbookworm in #2
- Removed appveyor badge from the Readme file by @Ritikkhulbe in #1893
- Fix cppcheck crash. by @yunline in #1891
- Fix `...
