P.s.
I use push.lua to manage resolution, i suspect it might be the culprit
P.p.s love version is 11.1
Code: Select all
-- in main
function love.load()
love.graphics.setDefaultFilter("nearest", "nearest")
push:setupScreen(gWidth, gHeight, window_width, window_height,
{
vsync = true,
--canvas = false,
fullscreen = false,
resizable = true
})
Gamestate.switch(gStates.play)
end
function love.draw()
push:start()
Gamestate.draw()
push:finish()
end
Code: Select all
-- in play gamestate
local Camera = require "libs/camera"
function play:init()
-- stuff
self.camera = Camera(0,0)
end
function play:draw()
self.camera:attach()
self.map:draw()
self.player:draw()
self.camera:detach()
end
Code: Select all
-- in play gamestate
local gamera = require "libs/gamera"
function play:init()
self.camera = gamera.new(0, 0, gWidth*2, gHeight*2)
end
function play:draw()
self.camera:draw( function(l,t,w,h)
self.map:draw()
self.player:draw()
end)
end