Hi everyone,
I currently am making a monopoly game. However, whenever I resize my screen, the board that I have created stays the same size. I would like for it to scale depending on the size of the screen (i.e. 1024, 768 -> 1920, 1080). Is there anyway to do it?
Thanks!
Needing help with scaling.
Re: Needing help with scaling.
If your code is prepared to deal with any resolution, sure. Just use the love.resize callback to be notified when the screen size changes, and adjust whatever you need to adjust.
Also, welcome to the forums
Also, welcome to the forums
- NobodysSon
- Prole
- Posts: 33
- Joined: Tue Oct 30, 2012 10:37 pm
Re: Needing help with scaling.
To build a little more on what pgimeno said, in order for your code to deal with any resolution the coordinates to display your various images,text, etc should be set relative to the screen size rather than using hard coded values. For instance, if you had an 800 x 600 window and were placing a pixel in the center of it by drawing at (400,300) it would obviously not be centered anymore if the window was resized. Instead you should be placing the pixel at screen width/2. That is a very simple example but it should give you some idea. Your images can be scaled to be larger or smaller relative to the window using the various scaling functions built into LÖVE.
Who is online
Users browsing this forum: No registered users and 4 guests