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?
Love fps cap?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- OmarShehata
- Party member
- Posts: 259
- Joined: Tue May 29, 2012 6:46 pm
- Location: Egypt
- Contact:
Re: Love fps cap?
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
or something like that
Code: Select all
love.conf = function(t)
t.vsync = false
end
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- OmarShehata
- Party member
- Posts: 259
- Joined: Tue May 29, 2012 6:46 pm
- Location: Egypt
- Contact:
Re: Love fps cap?
Ah thanks!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 thereor something like thatCode: Select all
love.conf = function(t) t.vsync = false end
Completely forgot about that.
Who is online
Users browsing this forum: No registered users and 56 guests