Skip to content

Releases: pygame/pygame

2.0.0.dev24

27 Oct 20:52
Compare
Choose a tag to compare
2.0.0.dev24 Pre-release
Pre-release
python3 -m pip install pygame=2.0.0.dev24

A bunch of fixes and speedups before the release.
Now the default branch on the pygame repo is main.

@MyreMylar Dan Lawrence

  • Sets SDL Hint for hidden mouse cursor at window edges when full screen #2254
  • Documents that integers underlying key code constants differ between Pygame 1 & 2 #2253
  • Updates the joystick docs to include controller mappings for X360 & PS4 controllers #2252
  • Updates the docs for toggle_fullscreen() #2251
  • New Alpha blitter - fixes and speed ups #2243

@siggisv Sigur冒ur Sveinn Halld贸rsson

  • Add to test/draw_test.py some unit tests for draw.line() #2247

Ankith @ankith26

  • A small little deletion of obsolete file #2256
  • Do MOUSEBUTTONUP event on MOUSEWHEEL #2242
  • Fix event.post KEYDOWN/KEYUP #2244

2.0.0.dev22

23 Oct 19:00
Compare
Choose a tag to compare
2.0.0.dev22 Pre-release
Pre-release
python3 -m pip install pygame==2.0.0.dev22

Several very difficult to find and fix issues with alpha blending were fixed in this release.

The new alpha blitter has an SSE2 and arm NEON implementation, and keeps compatibility with pygame 1.

Also some progress on other issues, including these...

2.0.0.dev20

22 Oct 19:09
Compare
Choose a tag to compare
2.0.0.dev20 Pre-release
Pre-release

Another crunchy little release. This time more compatible manylinux wheels (Ubuntu 18.04 Bionic and CPUs without SSE 4.2), some documentation improvements, and pygame.midi fixes.

python3 -m pip install pygame==2.0.0.dev20

2.0.0.dev18

21 Oct 15:13
Compare
Choose a tag to compare
2.0.0.dev18 Pre-release
Pre-release

pip install pygame==2.0.0.dev18

This is a small bugfix release to fix a problem with installing pygame from source code.

If 2.0.0.dev16 worked for you, there's no need to upgrade.

2.0.0.dev16

20 Oct 19:17
Compare
Choose a tag to compare
2.0.0.dev16 Pre-release
Pre-release

pip install pygame==2.0.0.dev16

The 28th of October 2020 will be the pygame 2.0 release date, because pygame turns 20 years of age. Save the date (maybe we'll do something)!

We reached two important milestones with this pre-release. Firstly the old game 'solarwolf' is working fine with no known issues on pygame 2. The second stone we passed by on the road to PyPy goodness is that we are releasing binary wheels for PyPy on mac, windows, and linux. PyPy is a different implementation of python that is highly compatible and can be extremely fast.

Here's a little youtube video of solarwolf on PyPy and SDL2...
solarwolf on SDL2 and pypy

If you watched the video to the end, you'll note there's a crash. We still have some way to go before everything in pygame is working with PyPy. "solarwolf" using cpython and pygame 2 is running deliciously and glitch free.

Critical backwards compatibility fixes for pygame 2

First up, some 'critical' improvements that have been made to pygame. 'critical' labeled issues are ones are backwards incompatible issues stopping a pygame 2 release.

Dan Lawrence @MyreMylar

Ankith @ankith26

Ren茅 Dudfield @illume

bugs, worms, shiny-shiny, and such

Dan Lawrence @MyreMylar

Ren茅 Dudfield @illume

@robertpfeiffer

@Starbuck5

Josip Komljenovi膰 @MightyJosip

Sigur冒ur Sveinn Halld贸rsson @siggisv

Ankith @ankith26

This time 4 'critical' backwards compatibility issues were fixed since the last release.


2.0.0.dev14

12 Oct 00:55
Compare
Choose a tag to compare
2.0.0.dev14 Pre-release
Pre-release

pip install pygame==2.0.0.dev14
dreamlines
-- Players, only love you when they're playing

With a very tiny little bit of discussion it was sort of decided that the 28th of October 2020 will be the pygame 2.0 release date, because pygame turns 20.

Critical backwards compatibility fixes for pygame 2

First up, some 'critical' improvements that have been made to pygame. 'critical' labeled issues are ones are backwards incompatible issues stopping a pygame 2 release.

Thanks to Dan Lawrence @MyreMylar for Adding a num_buttons parameter to mouse.get_pressed(). This was a backwards compatibility issue, because it used to return 3 elements. Now it returns 3 elements again by default and you can request 5 if you want. Another critical issue fixed by MyreMylar was a problem with key events being reordered on windows.

But wait... there's more. Another backwards compatibility fix by MyreMylar is the "Backwards compatibility for get_flags() in SDL2" PR, which has stopped some games handling full screen mode properly.

Sigur冒ur Sveinn Halld贸rsson @siggisv fixed a problem with how pygame.draw.aaline didn't look as before.

Now the anti aliased lines look (and smell) awesome.
13

bugs, worms, shiny-shiny, and such

Ankith @ankith26

Josip Komljenovi膰 @MightyJosip

Dan Lawrence @MyreMylar

Adam Andrews @adamandrews1

@Starbuck5

Ren茅 Dudfield @illume

Nguy峄卬 Gia Phong @McSinyx

Special thanks to the new contributors

@seenemikk

Sebastian Henz @BastiHz

Alice Lia Stapleton @slimelia

This time 4 'critical' backwards compatibility issues were fixed since the last release.


2.0.0.dev12

19 Sep 22:28
Compare
Choose a tag to compare
2.0.0.dev12 Pre-release
Pre-release
 ,--.
|  oo|
|  ~~| o  o  o  o  o  o  o  o  o  o  o
|/\/\|
       pip install pygame==2.0.0.dev12

Locked in or Locked out? That's not going to stop a new pygame coming out.

The main theme of this release is testing. With many new contributors having worked on unit tests, we can be much more confident that many more features will continue to work with our SDL2 based pygame 2 as in pygame 1 which is based on SDL1. But we also have a few new features, and plenty of bug fixes.

Thanks to everyone for their help with this release.

Critical backwards compatibility fixes for pygame 2

First up, some 'critical' improvements that have been made to pygame. 'critical' labeled issues are ones are backwards incompatible issues stopping a pygame 2 release.

We start with some joystick improvements from Daniel Pope @lordmauve. Add SDL2-specific methods to Joystick; rename event fields. Now joysticks(game pads, drum sets, dance mats) can be hot-plugged, and the game will still work properly.

@robertpfeiffer got posting of keydown events working on SDL2. This is part of the android work that has now been merged into the main branch - but it is also a backwards compatibility fix.

Thanks to Dan Lawrence @MyreMylar for fixing segfaults caused when interacting with display surface after quit, which is mainly useful for when writing unit tests or playing with pygame interactively.

Sometimes writing tests for existing functionality finds real issues and bugs. First @tsadama Added unit tests for display.toggle_fullscreen and display.get_active which uncovered an issue with SDL2. Then Dan Lawrence @MyreMylar Fixed get_active() function so it works as described in docs on windows under SDL2..

Tests

Here we see the amount of unit tests left to write to get full coverage of every pygame method. During this release period you can see a lot of things got new tests. During the testing it uncovered a number of real issues, and some of them were even fixed.

pygame version Methods left to test
2.0.0.dev12 81
2.0.0.dev10 127
2.0.0.dev8 143
2.0.0.dev6 147
1.9.6 156
1.9.5 155
1.9.4 189
1.9.3 194
1.9.2 194
1.9.1 232
1.9.0 232
1.8.1 25
1.8.0 0

The count can be found with the following command run in the pygame code base:

grep todo test/*.py | wc -l

'goodfirstissue' is a label applied to issues which would be good for someone who wants to try contributing to a Free, Open Source, or community project (like pygame). A lot of these issues were written up containing unit tests that needed to be finished off.

Unfortunately we will probably run out of things to test in some months. We hope to prepare new types of 'good first issues', and educational material in other areas next. So that there is something else for people who are interested in contributing as a way to learn. Hopefully we can structure it as a learning pathway, with even some advanced topics.

Thanks to Andy Nguyen @anguye13, who worked on a number of tests in the display, image, and surface areas.

Adam Andrews @adamandrews1 worked on the transform, threads parts of the code base. They have also begun work on cleaning up the buffer code, which is in C and kind of complicated. But that work is still waiting, and will likely make it into the next release.

Travis Chang @Reminisque

Dan Lawrence @MyreMylar

@khuang0312

@lkito

Pedro de la Pe帽a @pedrodelapena

@galexandreg continued to

@tsadama

pygame.joystick tests

@raphacosta27 Add unit test: joystick.quit()
Bill @AdditionalPylons Added unit test: JoystickModuleTest.test_get_count

pygame.display tests

Gabriel Moreira @gabsmoreira Add unit test: display.get_driver
@zoldalma999 Adding unit test to display.iconify
@amipy Added a unit test for display.flip()
@DGMcKenney Adds a unit test of the display.set_icon() function.
Grigoris Tsopouridis @gtsopus Add display.set_gamma unit test

pygame.time tests

Ilia Gogotchuri @Gogotchuri Implemented time.Clock.get_fps unit test
Jim Quach @jiquach Add unit test to Clock.get_rawtime
Aaron Li @AaronLi Added test for time.Clock.tick()
Clark Seanor @cruxicheiros Add basic tests for time.Clock.tick_busy_loop

pygame.threads tests

K Duggan @kduggan15 Adds test for threadloop
Micha艂 G贸rny @mgorny Replace long-deprecated Thread.isAlive() with .is_alive()
Clark Seanor @cruxicheiros threads.tmap() test and and fix. Unsurfaced bug #1768

pygame.Surface tests

@jtoloff unit test for Surface.get_locks function
@41aaronb Added unit test for the surface.lock() function

other tests

Prasanna Venkatesh @hanzohasashi33 math.Vector.scale_to_length docs and add test for display.set_palette()
@zoldalma999 Add unit test to image.get_extended
Nihal Mittal @codescientist703 Added unit test for pygame.cursors.compile
@leopoldwe Add key.get focused unit test

draw

Josip Komljenovi膰 @MightyJosip Fixed drawing of ellipse. No more holes.

Old:
Old
New:
New

Scott Noyes @snoyes draw_py._draw_line: Use correct endpoints during swap

Charles @charlesej Fix aatrigon/aapolygon drawing horizontal edges

Math

Daniel Pope @lordmauve Fix OOB access in math.Vector swizzle; add '0' and '1' swizzles

These will be useful to prepare homogenous coordinates for affine transforms by matrix multiplication. Here is a matrix representing a 2x scale + (3, -1) translation:

>>> import numpy as np
>>> from pygame.math import Vector2
>>> v = Vector2(0.5, 0.8)
>>> mat = np.array([
...   [2, 0, 3],
...   [0, 2, -1],
... ])
>>> mat @ v.xy1
array([4. , 0.6])

Community help...

Read more

2.0.0.dev10

31 May 18:55
Compare
Choose a tag to compare
2.0.0.dev10 Pre-release
Pre-release
 ,--.
|  oo|
|  ~~| o  o  o  o  o  o  o  o  o  o  o
|/\/\|
       pip install pygame==2.0.0.dev10

We only released 2.0.0.dev8 24 days ago. However, the last few weeks have been quite productive!
It's as if we were all trapped inside for some reason.

First up, the 'critical' window resizing bugfix thanks to @robertpfeiffer but also to @nthykier. This is another step towards a backwards compatible pygame 2 release. Another 'critical' bug (backwards compatibility bugs that block a pygame 2 release from happening) that got a fix is the pygame.display.update() call on windows. A patch has been merged into SDL so this should be fixed in pygame soon.

Community help

A special thanks to all the people who help out others. From making videos, to answering questions, to writing guides. MyreMylar, MichaelCPalmer, jtiai, claudeb, DaFluffyPotato, Rabbid76, The Big Kahuna, sloth, Kingsley, ... and lots of other people.

Type hints, and lint tools

The last pygame pre-release(2.0.0.dev8) shipped with Type hints, and now Type hints have been refined (not like oil, but more like an expensive fermented vegan cheese). Thanks to Josip Komljenovi膰 aka @MightyJosip

Documentation and tutorials

                                       _________________________
                                     =(__    ___       __     __)=
                                       |                       |
                                       |                       |
                                       | python -m pygame.docs |
                                       |                       |
                                       | The type hints were a |
                                       | major part of the doc |
                                       | work in this release. |
                                       | Some examples got an  |
                                       | update too.           |
                                       |__    ___   __    _____|
                                     =(_________________________)=

an amazing assortment of ammendments

And now have an ARM64 build for testing pygame on Travis CI (who provide it to us for free thanks!). Additionally a few bugs on the release process were fixed. Hopefully this will help us keep things working nicely on ARM platforms like the raspberry PI.

Thanks to @galexandreg Surface.blit can now take very large rects for the area argument. Which is very useful in open world games that could have huge sizes of surfaces. With SDL1 supporting only smaller rects and surfaces, it used to be limited to a 16bit number.

SCALED is a feature for scaling up low resolution game screens to large size screens - like 4k monitors or high resolution phone screens. This received some code cleanups and documentation. Thanks to @robertpfeiffer, and to @nthykier and @MyreMylar for help reviewing/testing.

pygame using SDL1 is building and passing tests again thanks to @MyreMylar and @illume. We stopped testing with SDL1 some time ago, whilst still sort of supporting it theoretically... but then bitrot set in and a few things stopped working again. Why do we want to keep doing this? It's useful for backwards compatibility testing. Additionally SDL1 is still better in a few tiny ways - the main one being on some ancient embedded linux platforms.

As part of a code robustness adventure of fixing... surface.blits was fixed for low memory situations where thanks to @nthykier.

Add support for controlling screensaver state by @nthykier and continued on in #1843 allows changing the behaviour of pygame with regards to screensavers. By default pygame disables screensavers, which is good for games because you don't want a screensaver kicking in midway through a cut-scene. But some apps don't need this behaviour. So pygame.display.set_allow_screensaver(True)

camera

                               ___
                       __()}|=|   |]          pygame.camera
                       (   \/ |___|
                       |       /|\
                      /|      / | \

The pygame.camera on windows got some fixes so that it works well on SDL2 with the VideoCapture module. In the process @MyreMylar made some improvements to pygame.image.frombuffer - the function used to quickly share large buffers of data with pygame and other modules.

Mask

                                                        鈻撯枔
                      鈻戔枒                  鈻撯枔鈻堚枅鈻掆枓        鈻掆枓鈻掆枓鈻戔枒
                      鈻戔枒鈻戔枒  鈻戔枒鈻掆枓鈻戔枒鈻戔枒    鈻掆枓鈻撯枔鈻堚枅鈻堚枅鈻戔枒      鈻撯枔鈻撯枔鈻掆枓
                      鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻戔枒鈻掆枓鈻撯枔鈻撯枔鈻堚枅鈻堚枅鈻撯枔鈻戔枒鈻掆枓鈻撯枔鈻撯枔鈻掆枓鈻掆枓
                    鈻戔枒鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻堚枅鈻堚枅鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻掆枓鈻戔枒
                鈻掆枓鈻戔枒鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻堚枅鈻堚枅鈻堚枅鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻掆枓鈻掆枓鈻掆枓      鈻戔枒
                鈻堚枅鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻堚枅鈻堚枅鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓
                  鈻掆枓鈻撯枔鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻堚枅鈻堚枅鈻撯枔鈻撯枔鈻堚枅鈻撯枔鈻掆枓鈻掆枓鈻戔枒鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔
                    鈻掆枓鈻掆枓            鈻戔枒鈻掆枓鈻撯枔鈻撯枔鈻堚枅鈻撯枔鈻撯枔鈻撯枔          鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻戔枒
                    鈻掆枓鈻掆枓鈻撯枔            鈻戔枒鈻掆枓鈻撯枔鈻堚枅鈻撯枔鈻撯枔          鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻掆枓
                    鈻戔枒鈻撯枔鈻掆枓鈻掆枓            鈻掆枓鈻掆枓鈻堚枅鈻撯枔鈻掆枓        鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻撯枔
                      鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻堚枅鈻撯枔鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻掆枓鈻撯枔鈻掆枓鈻撯枔鈻掆枓
                      鈻戔枒鈻掆枓鈻撯枔鈻撯枔鈻掆枓鈻掆枓鈻撯枔鈻撯枔鈻掆枓鈻撯枔鈻掆枓鈻堚枅鈻掆枓鈻撯枔鈻掆枓鈻撯枔鈻掆枓鈻撯枔鈻撯枔鈻掆枓鈻撯枔鈻撯枔
                        鈻戔枒鈻掆枓鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻撯枔鈻撯枔鈻掆枓鈻堚枅鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻掆枓鈻掆枓鈻掆枓

                        pygame.Mask -- when 1 bit is enough

Mask.to_surface is a way to draw 1bit Mask objects to surfaces. 1bit surfaces are great because they can be processed up to 32x faster than Surfaces with a large color depth(since Surfaces use up to 32bits per pixel). Great for pixel perfect collision detection in particular. Mask.to_surface is already useful, but Charles (aka @charlesej) has been working on preparing to implement the area keyword as seen in Surface.blit.

This could be interesting to those people interested in doing deformable terrain.

good first issue

'goodfirstissue' is a label applied to issues which would be good for someone who wants to try contributing to a Free, Open Source, or community project (like pygame).

Dan Lawrence (aka @MyreMylar) has been hard at work preparing almost 100 "good first issue"s for people to do.

Here are some of the first time contributors:

Daniel Gillet (aka @dangillet) worked on making saving images to BytesIO/StringIO work.

Thanks to kbanger on discord for looking into this "ljpeg and lpng missing in Setup.SDL2.in" issue, and also for working on updating the pygame buildroot package.

Fonts matter (don't they?)

Font got a touch of modernization applied to it. font.bold = True, font.underline = True and font.italics = True are now things... rather than having to do a font.set_bold(True). Now the freetype Font object has a 'bgcolor' attribute to mirror existing 'fgcolor' one. [ftfont.Font: Fix NameError when resolution is 0](https://github.com/pygam...

Read more

2.0.0.dev8

05 May 18:22
Compare
Choose a tag to compare
2.0.0.dev8 Pre-release
Pre-release

馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰
馃尲馃尭 pip install pygame==2.0.0.dev8
馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰

One year ago today on the 5th of May 2019 we released the first development release of the pygame 2 series. So today is our anniversary of sorts. 馃帀

Type hints for better editor support.

Type hints are now installed thanks to @MightyJosip #1685 This lets static type checkers do TAB completion and check your function inputs and outputs. Giving an altogether nicer experience when programming with pygame.

Color arguments are fuzzy wuzzy human friendlier

Thanks to new pygame team member @nthykier in #1676
there is now support for writing colors in an easier way.

surf.fill('black') # surf.fill(pygame.Color('black'))
surf.fill('#FFEECCF0') # surf.fill(pygame.Color('#FFEECCF0'))

Drawing improvements, and rounded corners.

Drawing improvements including more correct AND faster circle drawing, rounded rects. Thanks to @charlesej @MightyJosip and @robertpfeiffer. #1503

# Draw a rectangle with rounded corners
pygame.draw.rect(screen, GREEN, [115, 210, 70, 40], 10, border_radius=15)
pygame.draw.rect(screen, RED, [135, 260, 50, 30], 0, border_radius=10, border_top_left_radius=0,
                 border_bottom_right_radius=15)

# Draw only one circle quadrant
pygame.draw.circle(screen, BLUE, [250, 250], 40, 0, draw_top_right=True)
pygame.draw.circle(screen, RED, [250, 250], 40, 30, draw_top_left=True)
pygame.draw.circle(screen, GREEN, [250, 250], 40, 20, draw_bottom_left=True)
pygame.draw.circle(screen, BLACK, [250, 250], 40, 10, draw_bottom_right=True)

pygame recipe added to Python-For-Android

Thanks to @AndreMiras, @robertpfeiffer and others there is a pygame recipe in python-for-android kivy/python-for-android#2164 which is a python for android distribution.

Documentation and tutorials

Lots of little fixes, and even a whole new tutorial were made in this release. When someone takes the time to fix a little problem in the documentation that can help many people in the future from getting lost themselves.

Optimizations

new feature pygame.key.key_code

There's now a function to return the key code from the name of a key.

Thanks to @MyreMylar for digging into C code to implement, document and test this feature.

>>> pygame.key.key_code("return") == pygame.K_RETURN
True
>>> pygame.key.key_code("0") == pygame.K_0
True
>>> pygame.key.key_code("space") == pygame.K_SPACE
True

Bug fixes and Cleanups

Lots of bug fixes and cleanups continued to happen in the pygame code base.
We reached a milestone of turning lots of compiler warnings into errors for our linux builds.
In our C/C++ code we are now at zero alerts with LGTM, and only 10 left in our python code.

Dependencies updated

pygame uses a whole lot of different pieces of software to do a lot of the heavy lifting.

Development improvements

Along with the typehints for most pygame functions (which I've already mentioned above) there were some improvements for people developing pygame itself.

Many compiler errors now cause the CI system to fail if present. Thanks again to @charlesej for many fixes #1634 and to @nthykier for making our CI bots fail for more warnings #1652

Previous pygame header files for C extensions using pygame were not installed. Now they are thanks to @robertpfeiffer #1662

Some depreciation warnings from python 3.8 were fixed.

Community help

A special thanks to all the people who help out others. claudeb, DaFluffyPotato, MyreMylar, MichaelCPalmer, jtiai, Rabbid76, The Big Kahuna, sloth, Kingsley, ... Also a big thanks to the people who run community spaces and events like lordmauve who runs pyweek, and the /r/pygame community members.

Issues

@MyreMylar in particular went above and beyond investigating lots of old pygame issues, and closing many. Some of them several years old.

I'm happy that 4 'critical' backwards compatibility issues were fixed since the last release. If you notice a backwards compatibility issue with the pygame 2 series please let us know with a delicious issue report. Nom nom nom 馃崟


Read more

2.0.0.dev6

28 Oct 10:19
Compare
Choose a tag to compare
2.0.0.dev6 Pre-release
Pre-release

馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰
馃尲馃尭 pip install pygame==2.0.0.dev6
馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰馃尮馃馃尫馃尲馃尭馃拹馃挳馃尯馃尰

Python 3.8 support. For pygame 2 anyway. Decided not to do it for pygame 1.9.6, and to instead try and fix a few more of those 'critical' blocker issues (current critical issue count is lucky 13).

Virtual Mouse mode with relative mouse movements was fixed to how it was in pygame 1.9.x - thanks to new committer @mcpalmer1980. Who also added a new pygame.music.fadein() function, plus examples!

Support for old SDL1 SDL_VIDEO_WINDOW_POS and SDL_VIDEO_CENTERED environment variables which were removed in SDL2.

The Great Examples Cleanup of October 2019 is complete.

All of the examples were tidied up. Extra documentation was added, and things clarified. Thanks to new committer @Starbuck5 for their work on examples/eventlist.py. There's now 43 example files!! Cleanups like removing usage of from pygame.locals import *, which is kind of cool... but also not considered good practice in the wider python community. Also the examples are now formatted with the python code for-matter. Additionally two interesting AND EDUCATIONAL new examples: music_drop_fade.py, and font_viewer.py were contributed by @mcpalmer1980

python3 -m pygame.examples.font_viewer
python3 -m pygame.examples.music_drop_fade

Cleanliness brings us joy

As part of the continuing codeprose cleanups of the pygame codeprose-base, we are now warning free on the clang C compiler on MacOS. Additionally warnings are now errors on the clang compiler when the robots check our code for us. We are also very close to zero warnings on different gcc versions, and Microsoft Visual C compiler too. We reached a new milestone with the 'LGTM' static analyzer. It now gives pygame an "A+" for both the python code, and the C code - meaning pygame is within the top 5% of projects with those languages. LGTM now checks new pull requests automatically, and helps us find some issues on pull requests. The Coverity static analyzer rates pygame source code as having less defects than high quality code bases like the Linux kernel, OpenSSL, and libcurl. Strangely (to me) pygame is regularly trending on github as a C project. A lot of the cleanups were done by @charlesej, so thanks a lot for that! Oh, and a warning... please don't look at our setup.py file!!!! It's still scary AF. We have over 45,000 lines of python in pygame, and 350,000 lines of C... and a lot of that needs some attention.

Some developer improvements include verbose mode to our test runner (python3 -m pygame.tests -v), and the mechanism to share functions and data in our C API has been documented. See the Hacking developer guide.

Want to collide between a rect and a line?

Well, @charlesej has you covered with the new Rect.clipline(). This can also tell you where a line clips with a Rect. It was great to see the discussion on this as different people talked about API trade offs, and together came up with a very nice API. Thanks to @mcpalmer1980 for the discussion on the design, and also to @thiagojobson (who is now part of the pygame team on github! 馃巿 馃帀 ).

First time committer @hnrkcode fixed how comments are displayed on the website. Also thanks to @0101011 for a doc fix. Speaking of new committers, @galexandreg helped out fixing the pygame.mixer.Sound.get_num_channels() function to return a correct result in some cases (the sound stuff got a number of fixes this release!)

@robertpfeiffer did some more work on the SCALED feature, after a patch from @lordmauve enabling use of it with OpenGL apps.

Thanks to TravisCI who have allowed us to try out their alpha ARM64 support. We don't have pygame building on it yet, but hopefully soon it can join our other ROBOT builders like the power pc one.

In distro packaging news, FreeBSD now has pygame 1.9.6. Which is great, because it stuck around at 1.8.x for many years now. Thanks to Wen, and Nathan in maintaining it there. See the giant list of 119 pygame packages in different distros. No one seems to have packaged a pre-release of pygame 2 yet.

Cheers to the folks in the discord chat helping people out, chatting and sharing project updates on things. Especially to claudeb, and blubberquark.

All the regressions that were reported in issues for the 2.0.0.dev4 release have been fixed. Including one circle drawing regression fix by @MightyJosip, who also fixed a long lasting 'thick line' pygame.draw issue. Both very tricky ones! Also thanks to some very detailed unit tests that were written by @charlesej for the draw module that let us verify the drawing algorithms.

I'm happy that 5 'critical' backwards compatibility issues were fixed since the last release. If you notice a backwards compatibility issue with the pygame 2 series please let us know with a delicious issue report. Nom nom nom 馃崟


ps. Why dev6 instead of dev5? This time 2.0.0.dev5 was the version given to the git repo. So we can tell if someone is compiling pygame from source in bug reports. The git repo pygame will become 2.0.0.dev7, and when released it will be 2.0.0.dev8. This is how libsdl are doing things now too, and it's a good idea.
馃 is coming. Happy hacking!