Image bigger than window canvas

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
di0nizus
Prole
Posts: 3
Joined: Sat Jun 25, 2016 7:38 pm

Image bigger than window canvas

Post by di0nizus »

Images turn bigger than window canvas when I run the game. Background, characters, etc.

Any idea how to fix that?
User avatar
HugoBDesigner
Party member
Posts: 403
Joined: Mon Feb 24, 2014 6:54 pm
Location: Above the Pocket Dimension
Contact:

Re: Image bigger than window canvas

Post 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.
@HugoBDesigner - Twitter
HugoBDesigner - Blog
di0nizus
Prole
Posts: 3
Joined: Sat Jun 25, 2016 7:38 pm

Re: Image bigger than window canvas

Post by di0nizus »

Thank you, it worked for the background. I'm trying to get it to work with the sprites too
Post Reply

Who is online

Users browsing this forum: 101Corp and 6 guests