Home

Awesome

simpleScale

A simple library for scaling games made in LÖVE to any window size and aspect ratio.

Scales the game while maintaining its aspect ratio, adding vertical or horizontal letterboxes if necessary. Inspired by TLfres and used in SuperLuminauts.

TO USE:

  1. Import simpleScale

  2. In love.load call simpleScale.setWindow(gameWidth, gameHeight, windowWidth, windowHeight, flags)

    gameWidth - width of the game

    gameHeight - height of the game

    windowWidth - width of the final window

    windowHeight - height of the final window

    flags - a table of optional flags corresponding to those used in love.window.setmode https://love2d.org/wiki/love.window.setMode

  3. At the start of love.draw call simpleScale.set()

  4. At the end of love.draw call simpleScale.unSet()

Additional Features: