This chapter covers
- Animating our enemies
- Adding background animation
- Visualizing a bigger explosion when an enemy mine hits the ground
- Progressing to the next level of difficulty
We now have a mostly playable game, but it still lacks excitement and doesn’t really show some of the abilities of the NES hardware. We will use this chapter to add some items to make the game more interesting, including animations for both our enemies and the background, shaking the screen and fast cycling some colors when one of the enemy mines hits the planet’s surface, and finally allowing the player to progress to the next level of difficulty.
13.1 Enemy animations
In our previous chapter, we added starting and ending pattern numbers to both our enemy definition table and our in-memory tracking table. In this section, we will add to our code to use this information to progress each of the enemies through an animation sequence.
Before we get into our main code changes, let’s adjust some more of our default palette values so our meteor enemies are using a base brown color. Find our default_palette section, and make the following changes.