Re: [tsc-devel] Do we use sprite sheets at all?

Quintus | Thu, 29 Oct 2015 14:30:16 UTC

datahead <…r@f…> writes:
> Post via forum by datahead <…9@x…>:
> Do we use sprite sheets at all?  This basically means we would place
> an entire set of sprites into one image and have that loaded from the
> file system all at once.  It would then use the coordinates on the
> image texture in order to properly render the sprites at runtime.
> This tends to help with performance.

Currently, we only use sprite sheets (which I know as “tilesets” or
“tile maps” or even “tile atlas”) for the GUI system, because that’s how
CEGUI requires its graphical input for styling the GUI
widgets. Everything in-game uses separate files. However, before you
draw a conclusion from that, consider we are using a caching mechanism
that only loads the sprite from a file once per level. That is, if you
have 500 “Door Yellow” sprites in a level, the actual graphics file is
loaded from the disk only once for the first door found in the
XML. Every further access to this graphic will result in the already
cached texture being returned from the resource manager.

I think we can achieve much greater performance improvements by
preloading all sublevels or even all levels on a world map in separate
threads.

Vale,
Quintus

-- 
#!/sbin/quintus
Blog: http://www.guelkerdev.de

GnuPG key: F1D8799FBCC8BC4F