How to reuse full loaded frames for many sprites?
Posted: Mon Nov 01, 2021 1:52 pm
Greetings mates,
I am trying to reuse full loaded frames for many different sprites, with no success.
I loaded full frames for a single sprite, released the sprite; and the frame data still remains in VRAM;
after this I wan trying to create sprite with Auto tile upload disable... but with no clue regarding how to point the exact tile number for each frame...
Obviously, this bizarre trial doesn´t work well.
Next image illustrates the need:
Each enemy shoot needs to share the same full loaded frames, as well it is neccesary to disable dinamically tile uploading for these "bullet" sprites, due to all frames (4 tiles) are always loaded in VRAM
Usually, I manage the VRAM tile index used by each sprite type via SPR_setVRAMTileIndex after a call to SPR_addSprite .
As well, enemy soldier leg sprites will need to share their full loaded frames.
Some sprites are currently a composition of 2 sprites, in order to save memory and create an easier animation code.
Thanks in advance,
I am trying to reuse full loaded frames for many different sprites, with no success.
I loaded full frames for a single sprite, released the sprite; and the frame data still remains in VRAM;
after this I wan trying to create sprite with Auto tile upload disable... but with no clue regarding how to point the exact tile number for each frame...
Obviously, this bizarre trial doesn´t work well.
Next image illustrates the need:
Each enemy shoot needs to share the same full loaded frames, as well it is neccesary to disable dinamically tile uploading for these "bullet" sprites, due to all frames (4 tiles) are always loaded in VRAM
Usually, I manage the VRAM tile index used by each sprite type via SPR_setVRAMTileIndex after a call to SPR_addSprite .
As well, enemy soldier leg sprites will need to share their full loaded frames.
Some sprites are currently a composition of 2 sprites, in order to save memory and create an easier animation code.
Thanks in advance,