pygame - 2.0.2.dev2 - Drumroll release
pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games.
☕ Cheer Up! 🍵
🍂 ✨ )) ✨ 🍂
🍂┃ (( * ┣┓ 🍂 we have a
python3 -m pip install pygame==2.0.2.dev2
🍂┃*💗 ┣┛ 🍂
🎂 For YOU 🍰
Hello internet strangers. We’re back with a new release, packed with tons of mundane bug fixes and unexciting improvements! It’s been a while since the last release, but in that time pygame development has been moving ahead. This release, 36 contributors (25 new ones!) contributed over 75 pull requests. Since 2.0.1, over 200 files were edited, with more than 16,000 lines added, and more than 7,000 lines deleted.
This is a development pre-release, so we can test out new release machinery. Probably we will do a couple more dev pre-releases, but we hope to have a full 2.0.2 release soon. There's a bunch of PRs still open that we want to help resolve and merge in before that.
So grab a beverage, and doom scroll our release notes, we prepared just for you, (&& those other interweb weirdos)
Bug Fixes 🐛
Artisanal source code like ours has the best intentions, but there's nothing like computers to bamboozle our best efforts.
It used to be actual bugs climbing inside the pipe organs programmed to play and the looms programmed to weave, but these days that excuse doesn't really work. Our bad.
Bugs in this 1910 Jacquard loom would be actual bugs
(See more the video at https://www.youtube.com/watch?v=1PBd3VJrfDw if you're interested)
- the init systems to prevent bugs from init-quit-init (#2428)
- an error handling bug in pixelarray in #2444
- the pygame default font would break when packaged with PyInstaller (#2604)
- 20 second load times for SysFont on Mac, and also gave Windows SysFont some love (#2594, #2640).
- A bug where
freetypewould think coordinates of -1 represented an error was fixed in #2576.
- A rare segfault in
mixer.pre_init()on Mac, in #2494
- Where window size couldn't be reduced after leaving
SCALEDmode on Windows (#2587)
- Exiting fullscreen would put your window at (0, 0) in #2460
- A failure in
- The pygame.scrap module building properly on Mac and Windows (#2499, #2495).
- IME placement in
SCALEDmode in #2451
- A rare bug where
Color.hsvawould return invalid values in #2467
One module in particular has come a long way in this release — sysfont. Thanks to @Starbuck5
(Of course you can still request bold from SysFont and it will hook you up, at least for Cambria)
New Features ✨
- vector projection to the
Vector3classes in #2510
- a “touch” attribute to all mouse events in #2514
projected = v3.project(v3) This is useful for collision detection in finding the components in a certain direction (e.g. in direction of the wall). For a more detailed explanation see
The .touch attribute is for events that were generated by a touch input device, and not a real mouse. You might want to ignore such events, if your application already handles finger events.
@MyreMylar worked on
mixer.set_reserved()to return the number of channels actually reserved in #2490
- adding an actual implementation to the
mixer.find_channel()in #2491 Before it simply wasn't implemented, only documented.
- a namehint argument to
mixer.music.load()for easier loading of music from file-like objects. (#2497)
- Vector2 support to the
Maskmodules, as well as keyword argument support to the
Maskmodules (#2536, #2557, #2581)
Internal / Portability
_________________________ =(__ ___ __ __)= | | | | | python -m pygame.docs | | | | A large number | | documentation fixes | | were made in this | | release. | | | |__ ___ __ _____| =(_________________________)=
New contributors @SplatRT, @bambalamm, @deek80, @NKID00, @MaukWM, and @shawnbyday all cleaned up the documentation with grammar and typo fixes, in: #2431, #2437, #2519, #2555, #2583, #2644. @Starbuck5 contributed to this worthy goal in #2590
New contributor @Grimmys and @Starbuck5 worked on the documentation build system, upgrading it from Sphinx 1 to Sphinx 3, hiding the obsolete
cdrom modules from the top bar, and adding the
--fullgeneration flag to
setup.py docs. #2513, #2511, #2617, #2624.
New contributor @kaiec noticed that SDL_Image, pygame’s image loading backend, supports more than we had documented, so updated the documentation accordingly, in #2619. (We support WebP and SVG, who knew?) New contributor @duthades continued this by adding tests for the new image formats in #2656.
Typehints got some neat updates in this release as well, so that you can code with pygame in your favourite IDE and you get that sweet auto-correct/autocomplete and type-checking to catch bugs even before they are reported!
New contributor @jakebailey made tons of good typehint fixes in #2537, the most important ones being, correctly exporting submodules in a way that typehints are recognized for the submodules, and generic types used in annotations being fixed to include the missing type params, among other fixes.
- @w-v fix
set_mods()type hint in #2457
- @nathanielconroy less strict type checking for
- @sandipanpanda Fixed wrong kwargs types in sprite.pyi in #2652
- @vnmabus Fix syntax for typing AbstractGroup attributes in #2663
- @bydariogamer Update Vector3 overloaded constructor signature in #2674
- @shingo-kagami Fixed
mouse.get_pressed()type hint in #2685
New contributor @jonozw added a needed
pg.quit() for IDLE compatibility in the stars example (#2560). Many other examples needed this too, so another expeditious new contributor (@AnudeepGunukula) swept through and made sure it was on every example in #2643.
New contributor @mljli improved the aliens example in #2608, new contributor @njbradley improved the font_viewer example in #2655 (it’s cool check it out), and @Starbuck5 overhauled the chimp example in #2651.
Experimental super secret _sdl2 things
TODO: this section is supposed to be top secret! No one is
supposed to know about these new APIs yet, except people wanting to give
feedback and live dangerously. So I guess bikers, and skydivers can
know about this stuff?
- To all the returning contributors who helped improve pygame this release:
Josip Komljenović (@MightyJosip) | Dan Lawrence (@MyreMylar) | Pierre Sassoulas (@Pierre-Sassoulas) | Charlie Hayden (@Starbuck5) | Ankith (@ankith26) | @droid | @galexandreg | Rene Dudfield (@illume) | Lenard Lindstrom (@llindstrom) | @robertpfeiffer | @zoldalma999
- And to all the new contributors who put themselves out there by volunteering fixes:
@MaukWM | Chris Herborth (@Taffer) | NKID00 (NK) (@NKID00) | Fabio Niephaus (@fniephaus) | Ayush Bisht (@ayushbisht2001) | Nathaniel Conroy (@nathanielconroy) | Kai Eckert (@kaiec) | Anudeep Gunukula (@AnudeepGunukula) | @bydariogamer | Don Patterson (@deek80) | @njbradley | @odidev | @SplatRT | Max Zangs (@Muxelmann) | mljli (@mljli) | shawnbyday (@shawnbyday) | Bambalam (@bambalamm) | Grimmys (@Grimmys) | Carlos Ramos Carreño (@vnmabus) | Jake Bailey (@jakebailey) | Sanket Duthade (@duthades) | Matt Hollands (@mhollands) | @w-v | @sandipanpanda | jonozw (@jonozw) | Shingo Kagami (@shingo-kagami)
- As all releases, this one too would not have been possible without support from the community, from people submitting issues, to people making PRs for all kinds of improvements, from typo fixes, to fixing complex segfaults in C code, every contribution matters a lot!
- patreon.com/pygame sponsors: Christopher Cacho, Daniel Lawrence, Tommi Sinivuo, Leif Theden, zoldalma, rosa, and Bob Johnson. With their help half of the first patreon goal of covering the monthly hosting costs has been covered and a number of pygame tutorials have been made.
- The people supporting pygame financially by buying the pre-release of a pygame book. It's a book by a long time pygame contributor where all funds go towards pygame development.
- People helping out the community in general, from making youtube tutorials, to answering questions on various forums of discussions, to helping with packaging pygame!
- Home Page
- Github repo
- Support this project on Patreon
Pygame.org account Comments
Chris 2020-10-30 17:24:13.330390Super glad to finally get an update! But just wondering, is the new version compatible with python 3.9? Just tried to run my old games on python 3.8.6 and I got the welcome message and no error, but I didn't see any window anymore and I am trying to figure out what is wrong...
Rene Dudfield 2020-10-30 20:13:25.934690Yeah, it works with python 3.9. If you can't figure it out, feel free to drop an issue in github, or ask for help on the reddit/stackoverflow/discord/mailing list :)
Tom 2020-11-02 11:02:03.187471今天重新安装pygame的时候发现版本号已经是2.0了,开心的不行,感谢你们的付出,谢谢!!!希望pygame越做越好,奥里给!!!
ruben rogerio contreras 2020-12-29 11:31:33.931292this is exciting , got to learn THANKS