Python Tools

Mu editor + PyGameZero

In January 2020 we switched from the Thony python editor to Mu. Thony is a nice editor but Mu has some features like Code Check and Code Tidy that should help us develop a good coding style.

We will use the python modules:

and websites for resources (also known as game assets):

and editing software:

  • Audacity, for editing and converting audio files,
  • Krita, for editing and generating art,
Finally, the set of games build here are heavily based on the excellent book Coding Games with Python by Carol Vorderman. This book is available from DK and is well worth getting a copy.

Worksheets

The following worksheets either build complete (but small) games or deep dives into programming concepts or game features such as maze building, animation of character and so on.

Games

Each of the following worksheets start with a game idea and then builds a sequence of games by adding extra features. You don't have to implement all of the features - so pick your own level of difficulty, and move to new worksheet whenever you are ready.

Fruit Ninja

Our starting version of the game consists of an apple that appears at random positions on the screen and the computer prints out ”Good shot!” and draws a new apple when you click on the apple, otherwise prints ”You missed!” and ends the game.

From this we add sound effects and background music, scoring and lives, moving targets, varying targets, and non-fruit vs fruit targets.

Collector

Our starting version of this game consists of coins appearing randomly on the screen and the player has to move the character to collect the coins before the limited time runs out.

From this we add sound effects and background music, scoring, multiple targets, vanishing targets and bonas prizes.

Network

Our starting point for network is to click on the nodes in the network in correct order as quick as possible.

There are lots of variations we can do to this game, but we will start with some bugs fixing and improving the random layout of the node in the network.

Space Invaders

It is a close of the classic arcade game.

Once we have got the basic clone working we will see about adding our twists to it.

Gardening Games

This is verion of those never-ending gradening games.

The original version of the game gets too difficult too quickly (for me) so we might come back and revist this at a later session.

Test Tube Sort Games

This is a logic game where you need to unscramble coloured drops in test tubes.

The game itself is relatively easy but there are some interesting programming challenges - for example, how do we ensure that the starting position is solvable?

Deep Dives

In each of the deep dives we will focus on a particular aspect of a game or some concept in programming in general.

Animating Characters

Rather than our character always looking the same, we want it to have some personality and respond to events, such as facing the direction it is moving in, or changing colour when it gets angry/sick, or just blinking when it is waiting for us to move it around the screen. In this worksheet we will cover how these effects can be implemented.