SOLVED: Please Help Me Understand Physics Frame Rate Independence.

0 favourites
  • 2 posts
From the Asset Store
three fully animated characters ideal for your RPG side scroller projects
  • SOLVED

    Solution:

    Hello,

    I've spent a very long time trying to figure this out. I have made a game using physics behaviour. It works fine in 60fps, but when switching to a high refresh rate (75,120,240 etc) the physics change dramatically making my project unplayable.

    I've set up a simple test project to try and figure out what is happening and no matter what I do, I see differences in the behaviour across the different refresh rates (mostly, at high refresh rates the forces are less energetic).

    Here are variations of logic that I have tried to create the same physics across multiple refresh rates:

    This is what the layout looks like, I am simply adding the force to the circle to jump and holding Z to sustain the jump.

    At 60hz refresh rate the circle reaches about 10 on the ruler. At 240 it barely registers as a jump. Using different variations of the logic, there's just something fundamental here I'm not getting at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This has been solved with help from Skymen :)

    1- You need to set it to framerate independant

    2- You need to divide all your forces by (dt * 60) (60 being the framerate you're testing with)

    3- When you want to apply a force on every frame, you need to do it using a every X seconds set to 1/60 (again, 60 being your target framerate)

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