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

[pygame] Re: Starting the pygame 2 series


2.0.0.dev3 is out...

There are binaries for Mac, Windows, and Linux with SDL2.

python3 -m pip install pygame==2.0.0.dev3 --pre --user

So... what's new? Here's a few things.

The documentation has been made more readable on big screens and small ones. It is also updating from github again. @charlesej in particular has made a lot of documentation fixes. See https://www.pygame.org/docs/

It's easier to make custom types that will work with multiple GUI libraries.

    FIRST = pygame.event.custom_type()

(No more USEREVENT+1 nonsense) Also with pygame 2.0.0.dev3 you can have 8192 custom events instead of 32.

Thanks to @charlesoblack (first time contributor ya!) there is a pygame.Color.lerp() function now. It returns a linear interpolation.

>>> color.lerp(color2, 0.0) -> color 

>>> color.lerp(color2, 0.5) -> halfway_color 

>>> color.lerp(color2, 1.0) -> color2

@dlon added support for some Modern OpenGL features. For more detail see: #1127

Now you can do one-shot timers like this: pygame.time.set_timer(EVENT, 1000, 1)

Thanks to @bennuttall and the piwheels project, pygame has binary wheels for the raspberian linux. See https://www.piwheels.org/project/pygame/

The sound mixer has moved into the modern age and now defaults to a small low latency buffer size of 512 bytes, and uses CD quality audio by default.

Check these lists out for more detailed info on what's changed:

On Thursday, June 20, 2019, René Dudfield <renesd@xxxxxxxxx> wrote:
Hey yas,

There are binaries for Mac, Windows, and Linux with SDL2 on pypi.

You can try it out with a command something like this:
python3 -m pip install pygame==2.0.0.dev2 --pre --user

Also, SDL2 is the default now when you compile from source. You can use python setup.py install -sdl1 to compile against SDL 1.2.

Feels like some sort of milestone close(r) to the finish line?

Apart from lots and LOTS of work on the Color, Mask, and pygame.draw stuff, there are a few more experimental things. Like the sprite module compiled with Cython into C code. Additionally there is the new SCALED mode, for automagically scaling your low resolution game into a viewable sized window (a 320x200 window is tiny on a 4k screen... so this makes it bigger and scales everything for you).

Check these lists out for more detailed info on what's changed: