Monday 15 December 2014

Rocket Raid Under the Hood 11: Sprites

This is the eleventh part in a series of posts on digging into the code of the Acornsoft side-scrolling arcade game, Rocket Raid.

Sprites

Rocket Raid uses heavily on sprites, such as the player ship, rockets, fuel tanks and asteroids. In this post we will look at how these are stored and accessed. The code supports up to 20 sprites onscreen simultaneously.


Sprites Used in the Game

A total of 13 different sprite shapes are defined in the game, quite a small number. There are a couple of points of interest to note. One of them (number 7, which is a small shape like a rock) is one I have never actually seen displayed on screen; while the last one (number 12) looks strange at first glance but has actually been carefully designed so that it results in a cleanly-drawn sprite when plotting a rocket in motion (we will look at this more closely in a later post). 

0 Player's ship
1 Rocket



2 Fuel tank
3 Ultimate Robot (last level)
4 Alien (tunnel section)
5 Robot

6 Asteroid
7 Rock? (not encountered)

8 Ship explosion
9  Bullet
10 Bomb

11 Player's ship (small) - used to display the number of lives remaining
12 Rocket in motion

Storage of Sprite Shapes

The games stores following information to enable efficient sprite plotting:

  • Height of each sprite
  • Width of each sprite
  • Data size (number of bytes) of each sprite
  • Table of pointers to the start of the data for each sprite
  • Sprite data (stored consecutively)



No comments:

Post a Comment