Zwoptex and Löve2D

I created a Zwoptex template that lets you export spritesheets into a format you can use with Löve2D.

You can find it here.

Include the spriteSheet library:
SpriteSheet = require('SpriteSheet')

then load any sheets created in Zwoptex using the template with:

sheet = SpriteSheet:new('sprites')

Draw takes the name of a sprite (defined in Zwoptex) and the same parameters as love.graphics.draw
sheet:draw(name, x, y, r, sx, sy, ox, oy, kx, ky )

Manual method
You can ignore the helper object and just load the spritesheet manually

You just load the spritesheet with

local spriteSheet = require('sheet')

and then draw with

love.graphics.drawq( spriteSheet.image, spriteSheet.frames.green_ball.quad, 100, 300 )

I’m probably going to try my first metatable stuff and create a spritesheet object that makes it easer to draw the sprites.