Summary
Chapter 4 has us well on our way to implementing a playable version of Asteroid Belt Assault. We have covered:
Building a generic Sprite class to represent objects within the game world
Creating a scrolling star field using a large number of sprites that update their own positions and a class to encapsulate the management of the star field as a whole
Implementing an asteroid field, with asteroids that rebound off each other using elastic collisions to simulate realistic changes in direction and speed
Creating manager classes for shots, the player's star fighter, and enemy ships
Designing an Enemy class that can follow a set of waypoints as the ships traverse the screen
Building an EnemyManager that controls enemy spawn rates and establishes waypoint paths for enemies to follow, as well as controlling enemy fire at the player
In the next chapter, we will finish building the Asteroid Belt Assault game by adding a collision detection system, particle effects, sound effects, and more.