Gravity Fall Speed Different On Two Computers

  • Hi All,

    I have an issue where a world gravity of 10 isn't the same on two different computers. A setting of 10 on one computer makes the object fall at a nice speed where it falls insanely fast on the 2nd computer.

    I've created a .c3p to test this. If you could download and run the example and post your Elapsed Time, it would be very helpful in my trouble shooting. If anyone has had any issues like mine then please discuss. Thanks!

    http://www.ragebyte.com/downloads/GravityTest.c3p

    My Elapsed Time was 1.400036

  • By default Physics is framerate-dependent. See the tutorial Delta-time and framerate independence.

  • Based on your post Ashley, I just realized that the monitor refresh on my first computer is set to 60hz and the monitor refresh on my 2nd computer is set to 144 Hz.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • And I just found where to set the Physics as framerate independent! Thanks Ashley!

  • Chroma72 I'm pretty sure that monitor refresh rate has nothing to do with it. It doesn't limit the framerate of your game. If all your other hardware is capable of running the game at 100 FPS, on a 60Hz monitor you will be able to see only 60 frames per second, but the game will still run at 100 FPS.

  • Chroma72 I'm pretty sure that monitor refresh rate has nothing to do with it. It doesn't limit the framerate of your game. If all your other hardware is capable of running the game at 100 FPS, on a 60Hz monitor you will be able to see only 60 frames per second, but the game will still run at 100 FPS.

    I think someone is confused here.

    The tutorial says one thing and you say another ...

  • The Mnk See these links:

    avadirect.com/blog/frame-rate-fps-vs-hz-refresh-rate

    digitaltrends.com/computing/do-you-need-a-120hz-or-240-hz-monitor

    GPU can limit FPS if monitor refresh rate is low and VSync is enabled, maybe this is what the tutorial is referring to.

  • maybe the problem is that Construct just sets game frame rate according to refresh rate so we have no control over it

  • Construct does run at the monitor refresh rate, so it defenitely has an impact.

  • It is the browser that sets the refresh rate and as I have read in other threads it is set to 60

  • Chroma72 I'm pretty sure that monitor refresh rate has nothing to do with it. It doesn't limit the framerate of your game. If all your other hardware is capable of running the game at 100 FPS, on a 60Hz monitor you will be able to see only 60 frames per second, but the game will still run at 100 FPS.

    That's not right: Construct ticks at the speed of the display. So on a 60 Hz display it will run at 60 FPS, and on a 100 Hz display it will run at 100 FPS. Assuming your game is designed to be framerate independent, as described by the tutorial, it makes no difference and gameplay will proceed at the same speed regardless of the framerate. However if it is framerate dependent, gameplay will proceed faster at 100 FPS. As noted in the tutorial, the Physics behavior is an exception and defaults to framerate-dependent to make the simulation deterministic, and you need to opt-in to framerate-independent (and non-deterministic) behavior.

    In retrospect this was probably a mistake, since the default means physics works at different speeds depending on the display refresh rate. But it might be difficult to change the default without breaking backwards compatibility...

  • Yeah, still easy to forget this is a different situation than playstation or Nintando

    If you have a minute, can you try this game on 60hz and 144 hz and see the difference

    http://www.deusx.com/hrd/

  • That's not right: Construct ticks at the speed of the display.

    Is this because Vsync in Chrome/Chromium is enabled by default? So that display refresh rate basically limits the maximum FPS in the browser?

  • It's mainly because Construct has always worked like that, ever since Construct Classic.

    In C3 internally we use requestAnimationFrame which is the browser-provided v-sync event. AFAIK most browsers run this at the refresh rate of the display.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)