Page 1 of 1

Limited framerate by default?

Posted: Sun Jul 20, 2014 12:35 am
by Rectar2
While testing my game, I noticed that my framerate seems to stick at a steady 60 fps. I tested this with an empty project and it behaved the same. I decided to just ignore it and be happy by the fact I wouldn't have to implement my own limiter. But when I sent the game to my friend, the game was behaving differently for him. I told him to tell me his framerate, and rather than be at 60fps, it was 260. Can anyone explain?

Re: Limited framerate by default?

Posted: Sun Jul 20, 2014 2:57 am
by slime
vsync is enabled by default in LÖVE, but it might be overridden by the user's video driver settings (or possibly if the video driver doesn't support vsync.)

You can disable vsync with the t.window.vsync boolean flag in love.conf, or the vsync flag in love.window.setMode. The default [wiki]love.run[/wiki] loop also has a 1000 FPS limit normally (because it sleeps the main thread for 1 millisecond every frame.)

In general it's not a good idea to rely on a specific framerate though - if you make proper use of the dt argument to love.update, everything should be fine on different systems.