Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We briefly touched upon the subject of collision detection in Chapter 7 when we needed to know when the flaming arrows were hitting the player and the dragon. In that chapter game, just one type of collision detection was used, between just one sprite and another (one-to-one). However, Pygame supports several types of collision detection techniques that we will be learning to use in this chapter. The subject of sprite groups will also become more important as you will see in the chapter example, called The Zombie Mob Game, which will use a large group of zombies versus the player for some fast-action gameplay. These are fairly advanced topics but all of the concepts hold each other up rather than stand on their own, so the code does get easier after a time.
In this exciting chapter you will learn how to: