Creating a Game with Python and Pygame
In This Chapter
Getting started with Pygame
Drawing rectangles and circles
Using nested lists to store a game map
Enabling keyboard control of an image
Displaying fancy text messages
Creating game logic, including a bouncing ball
In this chapter, you will build on your Python skills to create a simple arcade game called PiBuster (see Figure 13-1). It’s a variation on the classic format where you have to keep a ball in play using your bat, and your goal is to knock out all the blocks.
Our version has a fruity twist: The wall of bricks is replaced with a giant Raspberry for you to chip away at. The program is written in such a way that you can easily design your own levels. We talk you through how the game works and show you how to build it up step by step.
To help you to create games like this, we introduce you to Pygame, a free library ...