Game runs too fast on a laptop?

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
sclark39
Prole
Posts: 5
Joined: Wed Jan 02, 2013 4:36 pm

Game runs too fast on a laptop?

Post by sclark39 »

Something very strange is going on with my Love2d entry. On my beast gaming machine at home, it runs at about 60 and feels good. On this laptop, it's reporting an FPS of 300 or so, like it's not taking any time at all to draw or something. It's drawing many more frames than are being simulated. It seems strange that a laptop would be running "faster" than a gaming PC, leading me to believe this might be a bug with love2d's handling of this card.

You can check out my source here: http://www.ludumdare.com/compo/ludum-da ... &uid=15443 (Love link includes images/sounds, Source is lua only)

Locally, I've added some code to limit the FPS from the bottom of http://love2d.org/wiki/love.timer.sleep which seems to help, but I really don't understand why I'm needing to limit the FPS on what I would assume is an underpowered device.

Stats of this machine:

Code: Select all

          Processor: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz (4 CPUs), ~2.8GHz
             Memory: 5120MB RAM
Available OS Memory: 5004MB RAM
          Page File: 3350MB used, 6654MB available
          Card name: Intel(R) HD Graphics Family
       Manufacturer: Intel Corporation
          Chip type: Intel(R) HD Graphics Family
           DAC type: Internal
         Device Key: Enum\PCI\VEN_8086&DEV_0126&SUBSYS_21DA17AA&REV_09
     Display Memory: 1696 MB
   Dedicated Memory: 64 MB
      Shared Memory: 1632 MB
Anyone have any clue what's going on here?
sclark39
Prole
Posts: 5
Joined: Wed Jan 02, 2013 4:36 pm

Re: Game runs too fast on a laptop?

Post by sclark39 »

Oh, I also remember reading something about vsync. Is vsync on by default for Love? Maybe the laptop GPU doesn't have vsync, so it's reporting a higher framerate even though the actual logic loop is taking more time than on a desktop (since the draw part is probably taking basically 0 time).
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Game runs too fast on a laptop?

Post by Robin »

Yeah, vsync is on by default, unless LÖVE can't turn it on, because of whatever low-level thing does not support vsync.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Game runs too fast on a laptop?

Post by bartbes »

Or if the graphics driver overrides it.
sclark39
Prole
Posts: 5
Joined: Wed Jan 02, 2013 4:36 pm

Re: Game runs too fast on a laptop?

Post by sclark39 »

Yeah, I believe that's what was happening. It was running way too fast and needed an FPS limiter on it.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Game runs too fast on a laptop?

Post by Jasoco »

Make sure you're creating framerate independent animations by using Delta Time (dt) to your advantage.
Post Reply

Who is online

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