🌺🌻🌹🥀🌷🌼🌸💐💮🌺🌻🌹🥀🌷🌼🌸💐💮🌺🌻
The north enters a winter solstice and the south a summer solstice.
The shortest day of the year for people up top,
and the longest day of the year for people down under.
For people in the middle, it's pretty much the same every day ;)
Whatever the length of your day, this pygame is for you.
---
Before we get to What's new in pygame 2.1.1...
> At the *bottom of this post* we have a special treat...
> some **games** people have made this year.
> Some of the themes: Aliens, moose, cars, giant robots, trees, and... menus
<a href="ggames"><img width="150" src="https://img.itch.zone/aW1nLzU2NDIwMDUucG5n/original/Yl3rUc.png" /> <img width="150" src="https://img.itch.zone/aW1hZ2UvMTExMzk4MC82NjQ2NTY5LnBuZw==/original/D36ryh.png" /> <img width="150" src="https://github.com/davidpendergast/circuits/raw/master/gifs/119-tele-effect.gif?raw=true" /> <img width="150" src="https://img.itch.zone/aW1hZ2UvODc0Mjc5LzQ5MjY0MDYuZ2lm/794x1000/e69j1m.gif" /> <img width="150" src="https://img.itch.zone/aW1hZ2UvMTI1MTEzMS83Njk4ODIyLmpwZWc=/794x1000/LV0DAn.jpeg" /> <img width="150" src="https://repository-images.githubusercontent.com/342905347/8c764600-a6cd-11eb-8854-8a5d35ea4e94" /> <img width="150" src="https://camo.githubusercontent.com/2270e3b3e94503fbdff874ec14fb5263f5ab4ff42f97110808cd660bbf05cb82/687474703a2f2f69332e7974696d672e636f6d2f76692f42795f636273616376544d2f6d617872657364656661756c742e6a7067" /> <img width="150" src="https://static.jam.vg/raw/ed9/81/z/445e1.gif" /> <img width="150" src="https://pygame-menu.readthedocs.io/en/4.2.0/_images/first_steps.png" /> <img width="150" src="https://img.itch.zone/aW1hZ2UvMTE4ODEwMy83MDkyNjYxLmdpZg==/794x1000/AN9Vdb.gif" /> <img width="150" src="https://raw.githubusercontent.com/novialriptide/novialriptide.github.io/main/images/projects/gravity.gif" /> </a>
---
But first...
What's Changed?
We have a new SDL 2.0.18 release which brings a lot of fixes and optimizations.
<details>
<summary>What changed in SDL 2.0.18?</summary>
<br>
<div data-pjax="true" data-test-selector="body-content" data-view-component="true" class="markdown-body my-3"><p>In addition to lots of bug fixes, here are the major changes in this SDL release:</p>
<p>General:</p>
<ul>
<li>The SDL wiki documentation and development headers are automatically kept in sync</li>
<li>Each function has information about in which version of SDL it was introduced</li>
<li>SDL-specific CMake options are now prefixed with 'SDL_'. Be sure to update your CMake build scripts accordingly!</li>
<li>Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information</li>
<li>Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API</li>
<li>Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture</li>
<li>Added SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates</li>
<li>Added SDL_RenderSetVSync() to change whether a renderer present is synchronized with vblank at runtime</li>
<li>Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels</li>
<li>Added a window event SDL_WINDOWEVENT_DISPLAY_CHANGED which is sent when a window changes what display it's centered on</li>
<li>Added SDL_GetWindowICCProfile() to query a window's ICC profile, and a window event SDL_WINDOWEVENT_ICCPROF_CHANGED that is sent when it changes</li>
<li>Added the hint SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY to allow EGL windows to be transparent instead of opaque</li>
<li>SDL_WaitEvent() has been redesigned to use less CPU in most cases</li>
<li>Added SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to confine the mouse cursor to an area of a window</li>
<li>You can now read precise mouse wheel motion using 'preciseX' and 'preciseY' event fields</li>
<li>Added SDL_GameControllerHasRumble() and SDL_GameControllerHasRumbleTriggers() to query whether a game controller supports rumble</li>
<li>Added SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to query whether a joystick supports rumble</li>
<li>SDL's hidapi implementation is now available as a public API in SDL_hidapi.h</li>
</ul>
<p>Windows:</p>
<ul>
<li>Improved relative mouse motion over Windows Remote Desktop</li>
<li>Added the hint SDL_HINT_IME_SHOW_UI to show native UI components instead of hiding them (defaults off)</li>
</ul>
<p>Windows/UWP:</p>
<ul>
<li>WGI is used instead of XInput for better controller support in UWP apps</li>
</ul>
<p>Linux:</p>
<ul>
<li>Added the hint SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME to set the activity that's displayed by the system when the screensaver is disabled</li>
<li>Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices</li>
<li>Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices that will be opened in addition to the normal joystick detection</li>
<li>Added SDL_LinuxSetThreadPriorityAndPolicy() for more control over a thread priority on Linux</li>
</ul>
<p>Android:</p>
<ul>
<li>Added support for audio output and capture using AAudio on Android 8.1 and newer</li>
<li>Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()</li>
</ul>
<p>Apple Arcade:</p>
<ul>
<li>Added SDL_GameControllerGetAppleSFSymbolsNameForButton() and SDL_GameControllerGetAppleSFSymbolsNameForAxis() to support Apple Arcade titles</li>
</ul>
<p>iOS:</p>
<ul>
<li>Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.</li>
<li>Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()</li>
</ul></div>
</details>
We also have a new Vector2d.copy() method, a way to check if `rect in rect`. Some draw assembly optimizations are enabled on aarch64 (M1 and rasbperry pi), and rect drawing is much faster.
Work continues on code cleanup, and we reached a milestone where all PRs are checked for code formatting and linting. Work on enforcing stricter C level static analysis checks is in progress. Our examples were cleaned up to use simplified color names, and semantic variable names for colors (instead of naming the variables after colors). Work on other cleanups progresses too... but we can tell you about that in the next release notes!
Bugfixes
- Working gamma test on windows by MyreMylar in https://github.com/pygame/pygame/pull/2906
- Freetype: Fix intermittent crash with test_font_file_not_found by illume in https://github.com/pygame/pygame/pull/2944
New contributor bugfixes
- JoshuaShequin fixed the return value for music.get_pos() after pausing and unpausing. 2899
- Addressing set error inconsistencies in certain src_c/{base.c, rect.c} functions by anmallie in https://github.com/pygame/pygame/pull/2934
- mingzhang96 fixed SysFont on MacOS not being able to find Arial on their system. 2849
ankith26
- a strange issue where pygame failed on import on some systems in 2870
- FileNotFoundErrors not being displayed properly from pathlib loading in 2840
- transform.average_color failing on the ppc64le architecture with `-O3` in 2876
- hang on exit fix in 2816
- GIL release in transform module in https://github.com/pygame/pygame/pull/2904
MightyJosip
- pygame.version.SDL and pygame.version.vernum fixed in https://github.com/pygame/pygame/pull/2938
- Large ellipses are no longer drawn as diamonds in 2880
- Fixed a `pygame.draw.rect` bug where unfilled drawn rects had weird corners in 2927. In the process of this `pygame.draw.rect` saw some large speedups.
Starbuck5
- The initial display surface could have artifacts and not be set up right on MacOS in 2859
- freetype.Font could raise `IOError` instead of `FileNotFoundError` in 2922
- Writing fixes, corrected audio device mistake in https://github.com/pygame/pygame/pull/2925
Enhancements
* SDL 2.0.18 has now been added. Skip some focus related tests by illume in https://github.com/pygame/pygame/pull/2939
- Starbuck5 added a shiny new, special icon just for MacOS (provided by TomSchimansky), improving pygame's look on MacOS in 2858
- New contributor michaelasp added a `__contains__` operation to the Rect class, allowing you to check if `Rect1 in Rect2` in 2897
- New contributor novialriptide added a copy() method to Vector2 and Vector3. 2894
- New contributor GustavoQuintero99 added a couple CSS colors we were missing into pygame's named colors. 2865
- ankith26 enabled blitting optimizations by default on aarch64 (M1 and new raspberry) in 2818
Docs and Types
- AvaxarXapaxa fixed a bunch of "it's" that should've been "its." 2923
- Starbuck5 added the documentation into the installation itself. `python -m pygame.docs` will launch a local copy of the docs now. 2826
- New contributor Radiicall fixed a spelling mistake. 2864
- New contributor novialriptide fixed a grammar mistake in 2835 and fixed some typing for `AbstractGroup` in 2896 and 2930
- ankith26 cleaned type stubs and fixed some of them in 2882
Deprecations
- New contributor CAPTAIN1947 deprecated `sprite.LayeredDirty.set_timing_treshold` in favor of `set_timing_threshold`. 2921
- New contributor novialriptide deprecated `Vector.rotate_ip_rad` methods in favor of the more consistent `Vector.rotate_rad_ip`. 2863
- zoldalma999 added deprecation warnings and undocumented the long deprecated enable/disable swizzle functions in `pygame.math`. 2856
- ankith26 deprecated the fastevent module because the SDL2 event queue makes it unnecessary. A python shim is still available. 2843
Development and Cleanups
- Reform colors across the examples by maxsteep, rbsampang, ian-sartor, and taimur-hassan in https://github.com/pygame/pygame/pull/2901
- Grimmys made sure we can still build the docs without worrying about all the requirements of building pygame. 2907
- bydariogamer cleaned up python code throughout the codebase, now that it doesn't need to worry about Python2 or SDL1. 2833, 2845
- ankith26 did plenty of cleaning up too, through C code and python code. 2844, 2854
- Starbuck5 did some miscellaneous fixes, including raising the cython language level. Replaced `get_num_audio_devices` and `get_audio_device_name` with `get_audio_device_names`. 2841, 2920
- illume continued on the work of queueseven and added custom blend modes to the _sdl2.Renderer class. 2790
- Pierre-Sassoulas added `setup.py lint` to keep the codebase squeaky clean. illume integrated it into the pygame development workflow by adding `setup.py format` and a format test to CI, and formatted all the code in the repository. 2285, 2857, 2842
Many many special Thanks go to
- everyone writing up issues, answering questions, sharing your work, or moderating discussions on different forums.
- code reviewers, doing an important and tireless job. Thanks especially to ankith26, MyreMylar, Starbuck5, illume, MightyJosip and for to new reviewers!
- [patreon.com/pygame](https://patreon.com/pygame) sponsors: Daniel Lawrence, Leif Theden, zoldalma, rosa, Dasterin, and Anonymous. With their help half of the first patreon goal of covering the monthly hosting costs has been covered.
- the people supporting pygame financially by buying the pre-release of a [pygame book](https://pygame.itch.io/pygame-book). It's a book by a long time pygame contributor where all funds go towards pygame development.
- The reddit, and discord mods for making nice communities where people can hang out
- Stackoverflow Q&A folk
- People sharing code to their games on github the pygame website, and elsewhere.
Thanks to you! It's hard making these release notes (Thanks Starbuck5 and illume). If we've missed someone, or made a mistake... firstly sorry! Secondly, feel free to get in touch with us to make a correction.
---
<span id="ggames" ></span>
Some games and apps
Here's a few things people have released recently using pygame (but made mostly with their own sweat and tears).
---
Tempest Run
> And then this summer, tank king Lord Commentarios of Freeduck and Spooky made "Tempest Run" for a jam hosted by this server:
> A cross between Tempest (1981) and Temple Run (2011), "Tempest Run" puts a new spin on those iconic games and was made for the Pygame Community Summer Jam 2021, whose theme was "Recreate an old game with a twist."
- url: https://tank-king.itch.io/tempest-run
- github: https://github.com/davidpendergast/pygame-summer-team-jam
- youtube: https://www.youtube.com/watch?v=48InrM39w5g&ab_channel=RounakBhowmik
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvMTExMzk4MC82NjQ2NTY5LnBuZw==/794x1000/3qHXpJ.png"></a>
---
RESYNC, A platformer about robots.
- app/game link: not available yet, still in development
- title: RESYNC (subject to change~)
- github/source host link: https://github.com/davidpendergast/circuits
- "dev log" https://twitter.com/Ghast_NEOH
<a href=""><img width="100%" src="https://cdn.discordapp.com/attachments/772505616680878083/923293051735138424/unknown.png"></a>
---
GRAVITY
> A puzzle game where you can control the gravity in the room you're in.
- github: https://github.com/novialriptide/Gravity
<a href=""><img width="50%" src="https://raw.githubusercontent.com/novialriptide/novialriptide.github.io/main/images/projects/gravity.gif"></a>
---
Flyre
> Flyre is a 2d pixel art shoot-em-up, where you improve through a skill tree !
- url: https://cozyfractal.itch.io/flyre
- source: https://gitlab.com/ddorn/flyre
- youtube trailer: https://www.youtube.com/watch?v=_AwWQzmCyjg
<a href=""><img width="100%" src="https://img.itch.zone/aW1nLzU2NDIwMDUucG5n/original/Yl3rUc.png"></a>
---
Gearhead Caramel
> It's been a year since the Typhon Incident, when a biomonster from the Age of Superpowers awoke and rampaged across the Earth. Aegis Overlord, having consolidated power on Luna, begins preparation to extend their domination across the solar system. The L5 Alliance attempts to maintain a fragile peace while their member-states bicker and war among themselves. To make matters worse, the cyberpop band Love Magnet just announced that they're splitting up. I trust that all of you know what this means.
>
> It's time to fire up your giant robot and go do some stomping.
- url: https://gearhead.itch.io/gearhead-caramel
- github: https://github.com/jwvhewitt/gearhead-caramel
- youtube: https://www.youtube.com/watch?v=b1441O0PT5E&feature=emb_logo
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvODc0Mjc5LzQ5MjY0MDYuZ2lm/794x1000/e69j1m.gif"></a>
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvODc0Mjc5LzQ5MjY0MTYucG5n/794x1000/s3dMjy.png"></a>
---
Imperios Estelares - Surgimiento
> Imperios Estelares - Surgimiento is a turn-based 4X strategy game set on space, in the Orion Arm. You can choose between nine different species, expand by dozens of solar systems and hundreds of planets. Design your warships, recruit troops and crush your rivals or develop your technologies to get a diplomatic victory or a combination of everything to achieve first place at the end of the game.
https://a5-studios.itch.io/imperios-estelares-surgimiento
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvMTI1MTEzMS83Njk4ODIyLmpwZWc=/794x1000/LV0DAn.jpeg"></a>
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvMTI1MTEzMS83MjkxNzY0LmpwZWc=/794x1000/hoTlyM.jpeg"></a>
---
PySprint
> Remake the Atari ST port of Super Sprint by Electric Dreams from 1985 in Python with Pygame
- github: https://github.com/salem-ok/PySprint#readme
- twitter: https://twitter.com/salem_ok
<a href=""><img width="100%" src="https://repository-images.githubusercontent.com/342905347/8c764600-a6cd-11eb-8854-8a5d35ea4e94"></a>
<a href=""><img width="100%" src="https://github.com/salem-ok/PySprint/raw/main/ImageSource/OptionsScreen.png?raw=true"></a>
---
DUGA 2021
> My old game, DUGA has been updated and now supports hardware acceleration! Never has it been so smooth! Thanks to Pygame for updating to version 2 :-)
- github: https://github.com/MaxwellSalmon/DUGA
- twitter: https://twitter.com/MaxwellSalmon/status/1445479363433037824
<a href=""><img width="100%" src="https://camo.githubusercontent.com/2270e3b3e94503fbdff874ec14fb5263f5ab4ff42f97110808cd660bbf05cb82/687474703a2f2f69332e7974696d672e636f6d2f76692f42795f636273616376544d2f6d617872657364656661756c742e6a7067"></a>
---
Run my dear LD49
> a Mini game where you play as a deer exercising on an UNSTABLE treadmill that is changing its speed unpredictably.
<a href=""><img width="100%" src="https://static.jam.vg/raw/ed9/81/z/445e1.gif"></a>
- url: https://ldjam.com/events/ludum-dare/49/run-my-dear
- github: https://github.com/OmarMoBadr/Run-my-Dear-LD49
---
Tree Maker
> Create different trees and tree-like structures using fractal-like math.
>
> Many natural things exhibit patterns of self-similarity. For example, a whole tree looks like a branch and a branch looks like a leaf.
- url: https://2pi360.itch.io/tree-maker
- source: https://gitlab.com/2pi360/tree_maker
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvMTE4ODEwMy83MDkyNjYxLmdpZg==/794x1000/AN9Vdb.gif"></a>
<a href=""><img width="100%" src="https://img.itch.zone/aW1hZ2UvMTE4ODEwMy83MDkyNjU4LmdpZg==/794x1000/LSGNhN.gif"></a>
---