O'Reilly logo

Adventures in Python by Craig Richardson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required