9781118951798-c05f000

PYTHON IS USED for a huge variety of things. So far, you’ve used it to create a text-based interface, drawings with the turtle module and GUIs with the Tkinter module. In this and the following adventures, you will learn to use PyGame. As its name suggests, PyGame is a module in Python that can be used to make games. PyGame is a very versatile module and is also very good for creating drawings, animations, sounds, interactive art and lots of other things.

As PyGame is a Python module, you can use it alongside all of the Python that you’ve learned so far.

In this adventure, you’re going to use PyGame to create some animations. In later adventures, you’ll build upon the things you’ve learned here, building up to the final adventure in which you will build a fantastic game.

Installing PyGame

Before starting this adventure, you need to have PyGame installed on your computer. Unless you’re using a Raspberry Pi, PyGame probably isn’t pre-installed on your computer. Before you go any further, follow the installation instructions in the Appendix for PyGame on your computer.

My First PyGame

Get Adventures in Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.