Sprites map are not compressed in VRAM

SGDK only sub forum

Moderator: Stef

Post Reply
alko
Very interested
Posts: 172
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Sprites map are not compressed in VRAM

Post by alko » Thu Dec 30, 2021 2:10 pm

why are repeating and symmetric tiles from sprites stored in VRAM as unique ?

Image
Image

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Sprites map are not compressed in VRAM

Post by Stef » Sun Jan 02, 2022 9:12 pm

SGDK does not handle the duplicate / flip optimization on sprite tiles for various reasons.
It's much more tricky to handle as the optimization can work only on (hardware) sprite basis and so they should have the same size. It can somehow work if you fix the sprite size and also for single hardware sprite (no meta sprite) and still, you can have edge case where the rescomp sprite cutter would break it.

Edit: If you have multiple instances of the same sprite then you can use SPR_setVRamTileIndex(..) to share same tiles between several sprites.

Post Reply