Page 1 of 1

Image bigger than window canvas

Posted: Sat Jun 25, 2016 8:06 pm
by di0nizus
Images turn bigger than window canvas when I run the game. Background, characters, etc.

Any idea how to fix that?

Re: Image bigger than window canvas

Posted: Sat Jun 25, 2016 10:00 pm
by HugoBDesigner
To have a background fit the window size perfectly:

Code: Select all

local width, height = love.window.getMode()
love.graphics.draw(background, 0, 0, 0, width/background:getWidth(), height/background:getHeight())
As for characters, etc., depends on each case. We'd probably need some screenshots or code to understand.

Re: Image bigger than window canvas

Posted: Sat Jun 25, 2016 10:24 pm
by di0nizus
Thank you, it worked for the background. I'm trying to get it to work with the sprites too