Custom sprites - Manual sprite composition/tile location management - intended for HUD elements area
Posted: Wed Apr 19, 2023 4:22 pm
Greetings,
Here we come with a very specific, but VRAM saving need
We have some tiles to be used as HUD elements for a dual player game,
these tiles consist in 4 icons and numbers from 0 to 9
As HUD elements on screen we desire:
-A sprite that represents the number of lives and number of special weapon uses,
composed of icon number 1 (its a 8x8 tile) and followed by one of the number tiles.
Followed by an icon that represents the special weapon, and last another of
the number tiles.
-Next, will be another sprite that starts with an icon that represents ammunition,
followed by 3 tiles of numbers.
-At last, another sprite (or 2 sprites) that comprises up to 8 numbers,
that is the score for player 1
-The same HUD representation will be double if second player is active,
The idea is to use only 14 tiles of VRAM, we are very limited in VRAM space
for our game.
It is easy to detect that many of the number tiles can appear multiple times,
we can´t use the standard way to load and use animated sprites, due to
our HUD tiles can be loaded once, and we only have 14 tiles of space for
entire HUD.
We assume, we need a way to manually compose sprite data, and
manage what tiles are being displayed at each sprite tile location.
But, how to perform this using SGDK?
Thanks in advance for your help,
Here we come with a very specific, but VRAM saving need
We have some tiles to be used as HUD elements for a dual player game,
these tiles consist in 4 icons and numbers from 0 to 9
As HUD elements on screen we desire:
-A sprite that represents the number of lives and number of special weapon uses,
composed of icon number 1 (its a 8x8 tile) and followed by one of the number tiles.
Followed by an icon that represents the special weapon, and last another of
the number tiles.
-Next, will be another sprite that starts with an icon that represents ammunition,
followed by 3 tiles of numbers.
-At last, another sprite (or 2 sprites) that comprises up to 8 numbers,
that is the score for player 1
-The same HUD representation will be double if second player is active,
The idea is to use only 14 tiles of VRAM, we are very limited in VRAM space
for our game.
It is easy to detect that many of the number tiles can appear multiple times,
we can´t use the standard way to load and use animated sprites, due to
our HUD tiles can be loaded once, and we only have 14 tiles of space for
entire HUD.
We assume, we need a way to manually compose sprite data, and
manage what tiles are being displayed at each sprite tile location.
But, how to perform this using SGDK?
Thanks in advance for your help,