Posts

Experiments with new low latency PyPy garbage collector in a thread.

Image
TLDR; less performance spikes, faster average performance, PyPy is a good Python for games and multimedia apps on desktop systems, running GC in a thread is a good idea for GIL releasing apps.
In March 2018 at the PyPy winter sprint I spent some days working on improving pygame support on PyPy. Part of this was investigating pypy frame drop. In there I found PyPy had both lower average performance in this pygame-using-CPython-API benchmark, and had spikes which caused frame drops. Remember that in latency sensitive applications performance spikes are not allowed. Note that not very much of this code is pure python (where PyPy is fastest), so it's almost a worst case benchmark for PyPy performance.

Thanks to Antonio, the PyPy team and their supporters — things have much improved since then. One improvement in particular is that PyPy now allows more control of when the Garbage Collection does its work. Read more about it in the blog post "PyPy for low latency systems".

In…

Year of the Desktop #yearofthedesktop

Image
#yearofthedesktop is a long running joke in FLOSS communities. When will Linux be more popular than Windows on the Desktop?
(please hold back your laughter until the end).
Let me explain why this is the Year of the Desktop, and why community developed software will win (and in fact has already).
TLDR; most PC hardware vendors are shipping Linux machines, Linux had the best cheap laptop of the year, Linux is a good platform for games, Steam now supports 1000s of Windows apps(+ 5000 linux native) and is contributing to Wine, the web is a good high quality desktop software target, government support for Linux desktop is increasing, and even Microsoft is supporting running Linux software on Windows, cheap hardware like Raspberry Pi(and more) is available and usable, community software cares about usability and has a supporting financial model, community development is a kinder place, fragmentation of the Desktop is no more, Gnome receives $1,000,000 donation, governments spend money on co…

๐Ÿฑ‍๐Ÿ — the first pygame 2 community game. Starting now! Are you in?

What is a ๐Ÿฑ‍๐Ÿ? *[0].


There was this email thread on the pygame mailing list.
"About Pygame development".
One topic of that conversation was doing a community game in there for reasons(see below).
I would like to do a pygame 2 community game to submit in the: - https://ldjam.com/ - https://itch.io/jam/game-off-2018 (GameOff github jam)
Ludumdare(ldjam) starts in 3 days, 7 hours. Theme not selected yet. GameOff finishes in 4 days 2 hours. Theme is "Hybrid", Jam already started.
So, the Jams finish in 4.1 days. Are you in?  If so join the web based chatroom(discord) in the "#communitygame" channel. Our repo: https://github.com/pygame/stuntcat
I'm trying to form a team now.
... read more?...
click.... loading... loading... buffering... loading... refresh... loading...

So why do this? My reasons for doing this are to push me to get pygame 2 features done that are actually useful in apps (Write Games, Not Engines). It will be a good testbed for prototypi…

pygame 2 update - the examples all work

Image
๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ
examples/chimp.py works

๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ

That's a nice milestone for pygame 2 development. (and also, now these examples also work...     python -m pygame.examples.aliens     python -m pygame.examples.scroll )
I'm pretty sure all the examples are now working with SDL2/pygame 2.

New SDL2 functionality. Also we have some new SDL2 functionality exposed     (experimentally, the APIs are not done yet). Multitouch, and AudioDevice, along with an example of recording audio. @dlon has been fixing a number of bugs(implementing key repeat, fixing unicode issues) and also prototyped some Window/Renderer classes (using ctypes and python).
The new events are done in a backwards compatible way, so that games using them with pygame 1/SDL1 will still work. You just won't get the events.
if event.type == pg.AUDIODEVICEADDED:     print('a new sound card plugged in... let's offer the user to use it')
On pygame SDL1 AUDIODEVICEADDED is defined as -1, …

Drawing data. With #flask, and #matplotlib.

Image
Here's a pretty simple example of using the Flask microweb framework, and matplotlib together.
Matplotlib is a graphing library used by a lot of people in python.

But how to serve your graphs up in a web browser as a png or an SVG image?
Code is in this gist: flask matplotlib.

Serving svg and png images with Flask and matplotlib.

Code is in this gist: flask matplotlib.

Josh Bartlett — pygame Artist in Residence

Image
The pygame Artist in Residence grant celebrates the Python arts community and lends a tiny bit of support to someones art practice. Josh Bartlett was the first recipient.

An artist residency usually works something like; a person spends some time in either a gallery making something to present or in a music club doing a weekly spot. The pygame artist in residence will do it in their own space, but be present on the top of the pygame website in the form of a thumbnail and a link to their patreon/blog/artist statement/website/whatever.

Josh Bartlett was the first recipient, and has been featured on the pygame website in October.  Please see the pygame artist in residence profile page for more info.



What has he been up to?  Go to his blog to find out.

ps. Thank you to everyone who applied, and those who helped with selection. Hopefully the next one will go more smoothly as the process is improved.

pygame artist in residence grant

Image
An artist residency usually works something like; a person spends some time in either a gallery making something to present or in a music club doing a weekly spot.

The first "pygame artist in residence" grant will be for a small amount of money (€512). It is for someone who is already doing stuff with pygame or python in their arts practice. There will be a little thumbnail on the website linking towards an artist statement/patreon page/blog or some such. The residency won't be in a physical space. It lasts for a month, from October 1st - November 1st. At the end of the month the website 'exhibition' will take the form of a small update from the artist — in whatever form that takes.

If you'd like to apply(or nominate someone) please write something short with a link about the arts practice and how python or pygame is used in it. Email: residency@pygame.org Applications close: September 15th.
Announced: October 1st.
Amount: €512 paid by paypal.


Why this? Art…