iffy: A spritesheet helper library
Posted: Tue Dec 03, 2019 8:00 am
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)
How would you go about this? Well with iffy you'd do something like this:-
and that'd draw the 6-faced die on the screen at (0,0)!
Github Link
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)
How would you go about this? Well with iffy you'd do something like this:-
Code: Select all
iffy=require 'iffy'
iffy.newSpriteSheet("diceRed.png")
function love.draw()
iffy.drawSprite('diceRed6.png')
end
Github Link