nsmryan / RustRoguelike

This Rust Roguelike is a Roguelike written in Rust.
17 stars 3 forks source link

Sprite Packing #381

Open nsmryan opened 2 years ago

nsmryan commented 2 years ago

Pack all sprites into a single atlas with https://github.com/rxi/atlas

The game's Makefile could build this code, and then run it on the resources directory. It looks like this will pack images and fonts. We will have to move unneeded images, like the ones used in the README into another directory like 'data'.

Then parse the output file to determine the offset and dimensions of the sprites in the atlas at runtime.

This should make the graphics code a little simpler as we won't have to look up textures all the time- there would only be one texture in use. It may also speed up rendering.

nsmryan commented 2 years ago

This is pushed to master

This issue is kept open for now in case we want to automatically detect changes and rebuild the atlas sprite.