Limited framerate by default?

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
Rectar2
Prole
Posts: 5
Joined: Wed Jan 30, 2013 2:09 am

Limited framerate by default?

Post 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?
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Limited framerate by default?

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 5 guests