DRW wrote:
While it does save graphics tiles, you have to sacrifice ROM space for meta sprites and execution speed of the update sprites function.
Because in this case, each single sprite in the meta sprite needs its own x and y offset value.
With the rectangle version, you only need a width and height per meta sprite (if all characters have the same width, then you don't even need the width). The sprite rendering function can then set the correct offsets itself.
This is what I did in my game to give the sprite updates a major boost and to reduce the ROM space of the meta sprite declarations.
Metasprites don't necessarily add a lot extra data, depending on how you format things.
Store the sprite tiles, along with the mirroring bits, as you normally would, in a metasprite--
Example:
Code:
metasprite_00:
.db $03,$00,$00,$01,$02,$40
Store the X/Y offsets in a separate "sprite pattern", defined as the first byte in a metasprite frame.
This way, the sprite offsets can be recycled, saving a large chunk of ROM space from being wasted.
Games like Castlevania and Contra used this trick, or rather, something quite similar.
Example:
Code:
pattern_03: ; 16x16
$87,$87,$01,$87,$87,$01,$01,$01 (-7,-7), (+1,-7), (-7,+1), (+1,+1)
(This could easily have been 4-bit encoded, but I wanted to "stream" the offsets quickly.)