Here's a snippet of what I did to my game.lua
Code: Select all
function _M:setupDisplayMode()
print("[DISPLAY MODE] 32x32 ASCII/background")
-- when th and tw = 32, mouse works fine. When done like this, mouse is offset.
-- font_scale = 175, which gives me a reasonably tidy way to adjust font size based on screen resolution.
-- It works pretty good everywhere else.
local th = (self.h/font_scale)*5
local tw = (self.h/font_scale)*4
Map:setViewPort(0, 0, self.w, self.h, tw, th, "/data/font/FSEX300.ttf", (self.h/font_scale)*7, true)
Map:resetTiles()
Map.tiles.use_images = false
-- snip