Have you ever used Kenney's assets? Then you may know that all of Kenney's assets are "game-ready". Meaning you don't have to tweak anything or do some extra work to load those assets.
Every spritesheet of Kenney - unless it's a tileset or has animations in it - has an XML file by the same name.
Let me give you context. Here's a spritesheet made by Kenney (on left is the image 'diceRed.png' and on right is the metafile diceRed.xml)
spritesheetXML.png (32.36 KiB) Viewed 8212 times
How would you go about this? Well with iffy you'd do something like this:-
ingsoc451 wrote: ↑Tue Dec 03, 2019 5:14 pm
Here something I used while working with Kenney's sprite sheets. It converts the specific xml format to a lua table
Iffy too converts that specific xml format to lua table - it returns all the quads in a neat hashtable format! But you don't need to store that to any table since iffy stores a cache and you can draw a sprite using iffy.drawSprite or be more specific with iffy.draw
My Github- your contribution is highly appreciated
ingsoc451 wrote: ↑Wed Dec 04, 2019 9:42 am
You only need to convert it one time. It looks like it converts it everytime
It doesn't!! It may look like it cause "it is looking for cache" when there is no cache to speeden up the process of acessing things - especially for drawSprite function!
My Github- your contribution is highly appreciated