Love fps cap?

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
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Love fps cap?

Post by OmarShehata »

So I've been working with Love for a while. However I just realized today how to set an FPS cap by modifying the love.timer.sleep() call in the love.run() function.

However I was surprised to see that the default love fps cap was 1000. And yet my game was running at 60. At first I thought my game was lagging, but then I created a new file with nothing but a single "love.graphics.print()" call and the fps was still 60.

Why does the fps cap there?
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Love fps cap?

Post by Nixola »

Because of vsync, an option that (with good graphic drivers) caps the FPS to the monitor refresh rate. It's on by default, you can disable it by creating a file ('conf.lua') and wrting in there

Code: Select all

love.conf = function(t)
t.vsync = false
end
or something like that
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Re: Love fps cap?

Post by OmarShehata »

Nixola wrote:Because of vsync, an option that (with good graphic drivers) caps the FPS to the monitor refresh rate. It's on by default, you can disable it by creating a file ('conf.lua') and wrting in there

Code: Select all

love.conf = function(t)
t.vsync = false
end
or something like that
Ah thanks!

Completely forgot about that.
Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests