Home Schedule

Pygame Zero Examples

Basics

This collection has documented examples of setting up a Pygame screen and a modified example based on the tutorial found on the Pygame zero website.


Interactive Falling Zombies

This is the documented example of dynamically creating actors and allowing for keyboard interaction.


SPACE!!!

This is the documented example presents a mostly complete game with states for menu, gameplay, and game over. Additionally, sounds, animation, collision detection, and spawning actors.


Animation

This is the documented example demonstrating how to create an animation using states and timed events (clock). Additionally, animating the actors by changing their image properties is shown.


Efficient Animation with Cycle

This is the documented example demonstrating how to more efficiently animate an actor using Python's built in cycle feature.


Pygame Zero Example

These are a collection of examples and small games created by the developers of Pygame zero and a few other miscellaneous tutorials. These applications were not created by me and exist in their original state in both code and documentation. Only minor modifications were made to run them in Thonny simply by pressing play.


Pygame Zero Application Running Slowly on MacOS

If you are running Pygame Zero applications on your Mac and they appear to be running very slow, try the steps shown in the gif below. Start by opening any pygame zero application (I used the screen_setup example program). When the program runs, right click the little gamepad icon that appears in the dock for pygame zero and choose options and click Show in Finder. When finder opens, right click the grey rocket ship icon and select Get Info. In the new window that pops up, make sure you have the option Open in Low Resolution checked. Close all the windows and restart your pygame application. It should now run at full speed.

mu-debug