Python Programming for the Absolute Beginner, 3rd Edition
The project for this chapter, the Astrocrash game, is my version of the classic arcade game Asteroids. In Astrocrash, the player controls a ship in a moving field of deadly asteroids. The ship can rotate and thrust forward—most importantly, though, it can fire missiles at the asteroids to destroy them. But the player has some work cut out for him or her as large and medium-sized asteroids break apart into two smaller asteroids when destroyed. And just when the player manages to obliterate all of the asteroids, a new, larger wave appears. The player's score increases with every asteroid he or she destroys, but once the player's ship collides with a floating space rock, the game is over. Figures 12.1 and 12.2 show the game in action.
Категории