Newbie Question: How to force the screen to a specific size?

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
Calahagus
Prole
Posts: 6
Joined: Thu Jun 06, 2013 1:16 am

Newbie Question: How to force the screen to a specific size?

Post by Calahagus »

Just as the topic says. I've looked around the documentation but it's all very new to me; I just want to know how to make the screen a specific size. Thanks for the help!
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Newbie Question: How to force the screen to a specific s

Post by slime »

You can use love.graphics.setMode in love.load.
User avatar
Calahagus
Prole
Posts: 6
Joined: Thu Jun 06, 2013 1:16 am

Re: Newbie Question: How to force the screen to a specific s

Post by Calahagus »

slime wrote:You can use love.graphics.setMode in love.load.
Thank you very much!
User avatar
bramblez
Citizen
Posts: 50
Joined: Sun Jul 29, 2012 1:21 pm
Location: Russia, Moscow

Re: Newbie Question: How to force the screen to a specific s

Post by bramblez »

Just in case, you might want to check this one too
User avatar
sanjiv
Citizen
Posts: 88
Joined: Mon Feb 27, 2012 5:11 am

Re: Newbie Question: How to force the screen to a specific s

Post by sanjiv »

Wait, isn't conf.lua the way to go?
www.love2d.org/wiki/Config_Files

Basically, make conf.lua in the same place as main.lua, and add the following

Code: Select all

function love.conf(t)
    t.screen.width = 1024
    t.screen.height = 768
end
User avatar
chezrom
Citizen
Posts: 59
Joined: Tue May 28, 2013 11:03 pm
Location: France

Re: Newbie Question: How to force the screen to a specific s

Post by chezrom »

conf.lua is for initial configuration at startup, but if you want to change the graphic mode during game, setMode() is usefull.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 221 guests