Pygame Zero : Pac Man tutorial

In this tutorial we’ll use Pygame Zero to create a Pac Man clone. As well as learning about sprites and game logic we’ll use files to store each level, which means you’ll get to design your own levels, and you’ll learn how to read files in Python.


If you’ve not yet set up Pygame Zero and the editor Mu, head over to the Flappy Bird Tutorial and follow the instructions there:

If you’re new to Python programming then that Flappy Bird tutorial is probably better place to start – this tutorial is significantly harder.

Installing Assets

Download the tutorial assets by clicking this link. You can close that page once the download finishes. Click on the Images button in the Mu editor. This will open the directory where Pygame Zero looks for images. Copy the images from the file you just downloaded into this directory.

Get in touch

We would love to hear how you’ve got on with this tutorial or receive any other feedback. Get in touch with the author: Eric Clack <>

Copyright © 2021, Eric Clack

Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike licence v4.0