How do I get past refresh rate inconsistencies?

0 favourites
  • 2 posts
From the Asset Store
Little Broccoli
$2.50 USD
50% off
Help the cute broccoli to get past all obstacles in his way!
  • Hello, C3 Forums.

    Yes, I know what delta time is, but I doubt that could fix this;

    I noticed that some behaviors, like Sine, act differently depending on your refresh rate. I was curious if anyone has found a way to get past this.

    Thanks.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess it depends on how the sine behavior does the math internally.

    But instead of finding a way to look at the workings of the behavior, and maybe finding a correction you could just do the sine motion directly with math instead.

    It’s fairly simple to do it in a way that I’d frame rate independent. Here it does horizontal motion:

    X = startX + magnitude*sin(time*360/period + offset)

    I suspect the sine behavior moves objects in a more relative way since you can use it with other motions.

    This would do it in a relative way but still be frame rate independent.

    Previous = current
    t = t + 360/period* dt
    Current = mag*sin(t)
    X = x + current-previous

    As I said, the behavior must do something different.

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