In this chapter we’ll add aliens to Alien Invasion. First, we’ll add one alien near the top of the screen, and then we’ll generate a whole fleet of aliens. We’ll make the fleet advance sideways and down, and we’ll get rid of any aliens hit by a bullet. Finally, we’ll limit the number of ships a player has and end the game when the player runs out of ships.

As you work through this chapter, you’ll learn more about Pygame and about managing a larger project. You’ll also learn to detect collisions between game objects, like bullets and aliens. Detecting collisions helps you define interactions between elements in your games: you can confine ...

Get Python Crash Course now with the O’Reilly learning platform.

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