Making Classic Games in Python

Python is a great programming language to learn however there’s no denying it’s a step up from block-based programming languages like Scratch.

When teaching Python it’s a big help if you can provide a hook to get new Python programmers interested. You will find that classic games like Candy Crush and Flappy Bird provide a great motivation for students.

../../../_images/flappy_bird.png

Flappy Bird in Pygame Zero

As soon as they see that they can create their own version of these classics they are fascinated and ready to get typing.

As well as the game concept you need a friendly programming environment and the Pygame Zero framework and the Mu editor are a great combination. Installing Mu also installs Pygame Zero so it’s easy to set up and get going.

../../../_images/candy_crush.png

Candy Crush in Pygame Zero

We (the mentors) at Brighton Coder Dojo have created three tutorials:

You’ll see a range of teaching styles in the tutorials from straightforward instruction (follow this and it will work), to some deliberate bugs that need to be fixed before progress can be made, through to more open ended exploration and algorithm design.

We plan to make more tutorials and would love to hear your feedback, so let us know what you think and if there’s anything you would like to suggest for future editions.

Eric Clack - eric@bn7.net.