Creating a game about punching chimps
In the pygame examples there is a simple example named “chimp”. This example simulates a punchable monkey moving around the screen with promises of riches and reward. The example itself is very simple, and a bit thin on error-checking code. This example program demonstrates many of pygame’s abilities, like creating a window, loading images and sounds, rendering text, and basic event and mouse handling.
The program and images can be found inside the standard source distribution of pygame. You can run it by running python -m pygame.examples.chimp in your terminal.
This tutorial will go through the code block by block. Explaining how the code works. There will also be mention of how the code could be improved and what error checking could help out.
This is an excellent tutorial for people getting their first look at the pygame code. Once pygame is fully installed, you can find and run the chimp demo for yourself in the examples directory.