Skip to Content
Python Crash Course, 3rd Edition
book

Python Crash Course, 3rd Edition

by Eric Matthes
January 2023
Intermediate to advanced
552 pages
13h 38m
English
No Starch Press
Content preview from Python Crash Course, 3rd Edition

13 Aliens!

In this chapter, we’ll add aliens to Alien Invasion. We’ll add one alien near the top of the screen and then 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 large 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. For example, you can ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Fundamentals with Paul Deitel, 2nd Edition

Python Fundamentals with Paul Deitel, 2nd Edition

Paul Deitel

Publisher Resources

ISBN: 9781098156664