I've been doing some things with Love2d, and personally had some trouble finding a tool/lib that took care of aspect ratio, resizing and such, and worked for me, so I did my own thing. Just today I packed all the code related to resizing (or all that makes sense) in a Lua file.
Right now it cover the basic needs that I wanted to cover, so if you find anything missing let me know.
Edit: I've made a complete rewrite of all the code and changed the way to use it, to be more simple, yet more specific. Leave a demo.
Update: New update on the lib. Added a function to convert from window coordinates to game coordinates. Useful when using mouse or touch events.
Code: Select all
local x, y = love.mouse.getPosition()
x, y = aspect_ratio:window_to_game_position( x, y )