4 - Making Big Sprites [ZX Spectrum]
16x16 pixel sprites are pretty good, and you should probably make most of your games with them. The screen is only 256x192 pixels in size so a 16x16 pixel sprite looks quite large. However there will be times when a bigger sprite is more useful - an end of level enemy, a bit of scenery that needs to move around. Sprites have been used in various creative ways in old games.
Making bigger sprites involves sticking together lots of smaller ones to give the illusion of a bigger sprite.
This is Midnight Resistance from the Amiga. The Amiga has hardware sprites of a specific width, so larger moving items would have been made from joining multiples together.
This has a penalty however. If your sprite is animated and you make it use two 16x16 sprites, now your game is going to consume twice the pattern memory than if it used just one sprite.
There’s two terms that we need to know for the sprite system to make sense
- Anchor sprites
- Relative sprites
The way the Next draws sprites is fairly simple. It has 128 of them, it starts at the first one and draws each in turn, using the attributes to control how it looks and where it is. Unless you tell it otherwise, the coordinates are the pixel locations on the screen where the sprite will appear. This is your standard, regular sprite. They are also called anchor sprites.
An anchor sprite also tells the Next what to do with the following sprites also. If the following sprites are set to be relative sprites then their position coordinates are taken to be an offset from the last anchor sprite drawn.
Whether a sprite is an anchor or not is controlled using Sprite Attribute 4.
These are groups of sprites that act together as one sprite. Moving the anchor sprite moves all the relative sprites too, but rotating and scaling do not affect the relative sprites. This probably works well if you have some sort of space ship and want a shield or weapon sprite that follows behind it, or circles your player.
This is the player’s ship from R-Type, the orb thing above the player is its own thing, but moves with the player.
These are groups of sprites that act as one sprite and where mirroring and rotating the anchor affects all the relative sprites too. This is the one to use if you want to create a large enemy sprite.