Playmat
A strong utility for making mode 7 games from within love2d!
Features:
- Fast to set up!
- Cool helper functions.
- Versatile sprite system.
- Ability to run on slow computers.
Code: Select all
PM = require("playmat")
mapimg = love.graphics.newImage("map.png")
spriteimg = love.graphics.newImage("sprite.png")
cam = PM.newCamera() --Sets up a new camera, resolution is 800 x 600 by default.
cam:setPosition(100,50)
cam:setZoom(48)
function love.draw()
PM.drawPlane(cam, mapimg) --The image drawn as a plane.
PM.placeSprite(cam, spriteimg, 125,100, 0, 8,8)
PM.renderSprites(cam) --And now the sprite is there too!
end
Code: Select all
v1.5 - Experimentally better
Sprites can now be colored!
Planes are stretchy now.
Planes now render directly using the shader.
Some major code improvements.
v1.2 - Minor
Fixed Sprite scaling problems
v1.1 - Perfection
Fixed non-square images not working right.
Added plane wrapping feature!
v1.0.3 - Hotfixes
The demo has also been updated to fix crashing for some.
v1.0 - Made public!
Github
Feedback would be greatly appreciated!
Demo controls:
wasd - Movement
q & e - Rotate
- & + - Zoom in and out
i & o - Change FOV
k & l - Change Offset