Home

Awesome

Resolution Solution

Yet another scaling library. Currently in maintenance-only mode.


Resolution Solution was inspired by:

Other similar scaling libraries that you might want to look into:

Video demonstration

Basic setup

  1. Require library:
local rs = require("resolution_solution")
  1. Configure library:
rs.conf({game_width = 640, game_height = 480, scale_mode = rs.PIXEL_PERFECT_MODE})
  1. Make window resizable (optionally, but stongly advised):
rs.setMode(rs.game_width, rs.game_height, {resizable = true})
  1. Hook into love.resize:
love.resize = function(w, h)
  rs.resize(w, h)
end
  1. Draw something:

(In this example we used scissors, but there another way to achieve this. Read manual or check examples for more info.)

love.draw = function()
  rs.push()
    local old_x, old_y, old_w, old_h = love.graphics.getScissor()
    love.graphics.setScissor(rs.get_game_zone())
    love.graphics.setColor(1, 1, 1)
    
    love.graphics.print("Hello, world!", rs.game_width / 2, rs.game_height / 2)
    
    love.graphics.setScissor(old_x, old_y, old_w, old_h)
  rs.pop()
end

Manual, examples, demo

Selling points of this library

Example:

rs = require("resolution_solution") ---@type ResolutionSolution

Games made using this library

By togfoxy:

By Gunroar:

By Saxashitter:

If you made game/program using this library, fell free to ask via contacts to add your game in this list.

Announces

I will post announces when new update will be dropped here or will create new release here on GitHub.

Contacts

If you have any questions about this library, have ideas, etc, you can contact me via:

  1. Submit new issue.
  2. love forum.
  3. matrix.
  4. Email - volkovissocool@gmail.com