December 2013
Beginner
464 pages
13h 46m
English
In this chapter, we’ll continue using Pygame to do animation. We’ll look at things called sprites, which help us keep track of lots of images moving on the screen. We’ll also see how to detect when two images overlap or hit each other, like when a ball hits a paddle or a spaceship hits an asteroid.
In the last chapter, you saw that simple animation isn’t quite so simple after all. If you have a lot of images and are moving them around, it can be a lot of work keeping track of what’s “under” each image so you can repaint when you move the image. In our first example with the beach ball, the background was just white, so it was easier. But you can imagine that, with graphics in the background, ...
Read now
Unlock full access