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).
|
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