Pygame Zero programs

The example programs are now all in one book.

Colour version

Cheaper black and white version

You can also read the text online but it doesn’t look as nice.

Erata (2nd edition)

Section 9.3 (Page 99)

There is one line missing. The code should read:

tile = tiles[maze[row][column]]
if tile == 'empty':
    player.x = column * TILE_SIZE
    player.y = row * TILE_SIZE
elif tile == 'goal':
    print("Well done") exit()

Section 9.5 (Page 101)

Rather than top of program the code should be added just above the draw() function.

Section A.5 (Page 130)

There is a word missing. The pyinstaller command should be:

pyinstaller NAME_OF_GAME.py --distpath . --add-data "pgzero;pgzero" --add-data "images;images" --add-data "fonts;fonts" --add-data "sounds;sounds" --add-data "music;music" --onefile --noconfirm --windowed --clean