how to scale up a whole window

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
User avatar
leNoah
Prole
Posts: 14
Joined: Mon Feb 08, 2016 5:00 pm

how to scale up a whole window

Post by leNoah »

Hi,
I've been working on a game with a pixelated style (cliche much?) And at the moment the game window is 150 by 100 px. Is there a way to scale up the whole window at once to, say, 600 by 400? I've seen the scale factor properties in drawings but how would I scale it up altogether, if possible?

Thanks in advance, noah :awesome:
--Home is where the heart is. Home is the ribcage.--
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: how to scale up a whole window

Post by bartbes »

The easiest way is to call [wiki]love.graphics.scale[/wiki] at the start of love.draw. You just have to be careful with using Canvases, since if you don't reset or counteract the scaling they'd be scaled twice.
User avatar
Daniel Eakins
Citizen
Posts: 99
Joined: Thu Jul 18, 2013 9:14 pm
Location: France

Re: how to scale up a whole window

Post by Daniel Eakins »

Markgo's Screen Scaler Helper is a ready-made solution for that. It handles the scaling and coordinates automatically based on your monitor settings and keeps a correct aspect ratio so that the graphics don't look distorted or uneven.

Some of the graphics generated with love.graphics won't be scaled though, so you need to modify his script a bit if you actually notice it (for example, by using a canvas).

Ulydev also made an alternate module, which correctly scales everything using a canvas, but his version has fewer options and is a bit buggy; it requires some testing. For example, it doesn't round the scale factors, so the pixels can be uneven depending on your monitor resolution.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests