[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: Starting the pygame 2 series



Oops. I forgot to paste the release notes here the other day.



🌺🌻🌹🥀🌷🌼🌸💐💮🌺🌻🌹🥀🌷🌼🌸💐💮🌺🌻
🌼🌸 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 @charlesejfor 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 🍕





On Monday, November 18, 2019, René Dudfield <renesd@xxxxxxxxx> wrote:
Now for something a little different...


One focus: pygame 2 issues.
Feature freeze for two months.
One issue at a time.
https://github.com/pygame/pygame/issues/1511