question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timestep doesn't take refresh rate into account

See original GitHub issue

Setup

  1. Have two monitors, one 160hz and the other 60hz
  2. Open Newton’s Cradle demo listed in readme (Link)
  3. Run demo, and move chrome window from one monitor to the other

Observe

The demo runs twice as fast on the 160hz monitor than it does on the 60hz monitor

GIF

I recorded it on my phone to show the difference in simulation speed https://gfycat.com/HugeAmusingChameleon

I believe this is because of an assumption that requestAnimationFrame target FPS is 60, where as on a higher refresh rate RAF can be called at 140fps

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
marwan38commented, Dec 29, 2018

I’ve been trying to find out how to fix this as well. Running a game, using MatterJS physics, on 2 different monitors (144hz and 60hz) is like putting on fast forward.

3reactions
KingCosmiccommented, Dec 29, 2018

Same issue occurring for me and others

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is fixing your timestep still a thing? : r/gamedev - Reddit
What I am wondering is, is this still relevant in the age of high refresh rate monitors?
Read more >
Fix your (Unity) Timestep! - John Austin
Under load, your game will slow down. You must be much more careful that FixedUpdate can run at display frame rate.
Read more >
Another way to fix your timestep - GameDev.net
1. first, variable timestep is used to get the same speed on all pc's - but variable timesteps which are large can make...
Read more >
Why does Fixed Timestep setting affect game speed?
I aslo though the time.deltaTime multiplier would take this into account. If I also increase Time Scale to 2 (and Time Step at...
Read more >
When should I use a fixed or variable time step?
There are two issues related to the question. Should physics step rate be tied to frame rate? Should physics be stepped with constant...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found