How do I make my game framerate independant without gameplay variences occuring?

0 favourites
  • 4 posts
From the Asset Store
In this template the music plays without looping in your game
  • hello, ive been working on a game for a while now, and recently got a new laptaop with a 300hz monitor, and playing my project on this new system caused a lot of issues for my project.

    ive since fixed nearly all of them, but i have a flying enemy in the game that still just has very different movement patterns based on whether im testing on 300hz (eg. a 300 fps rate) or 60fps.

    ive tried setting the physics stepping mode to "framerate independant"

    ive tried only applying force to the enemies every X seconds instead of every tick.

    ive tried filtering the amount of force applied by the delta time (eg. instead of applying a force of 1, apply '60*dt')

    ive tried all of these, and in various combinations with each other that would make sense, and i still get significantly different plays with either framerate

    sometimes the difference in enemies speed doesnt make any sense, like its running at 80% speed when it should be running much slower

    has anyone else had these issues?

  • Posting a cut down version of your project that shows the behaviours of the objects that you are having issues with would be helpful for diagnosis.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Generally speaking, for framerate independence when using physics, you'll want to set stepping mode to framerate independant, and NOT use dt in your expressions.

    However, framerates less than 30fps will still result in variance, as that is the limit of the dt value used by the behavior.

  • thanks for your help guys! i think ive identified the problem tho. it turns out if a physics object has any animations, it will cause huge discrepencies in their movement over time. something due to the physics of the object being recalculated with each changing frame. ill try and get a project ready that demonstrates this

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