Profile image

Any Funkytree variable for frame rate?

8,496 Sockdragger  6 days ago

As it says in the title: sum(x) and rate(x) measure the total 'distance' of x or the change in x from frame to frame. Which means their value will increase or decrease with the number of frames per second your local SimplePlanes program can muster on your local computer. Which again means that if I use them to 'time' a rate of descent or a distance travelled, my results playing Simpleplanes on my phone will be different from yours, if you have a faster phone, or play SimplePlanes on a gaming desktop.

Is there a way to get to the refresh rate or frame rate our computer is using to run SimplePlanes , so I can account for this or recalculate sum(x) or rate(x) in sum not change per second?

Thanks in advance

  • Log in to leave a comment
  • Profile image
    8,496 Sockdragger

    Update: I found a decent workaround by just counting the number of 'ticks' the program makes in the first second(s) of running:

    In the variable settings popup, add a variable FPS and definitely it as
    FPS= Time<1?FPS+1:FPS
    Then we can use the time frame to somewhat accurately model the distance travelled or the total number of engine rotations by adding the new value divided by the frames per second

    5 days ago