Inaccurate FPS help

Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.

What Wick Editor Version are you using?
1.19.4 (but there should be no reason this doesn’t apply to 1.19.3)

Describe the Problem
I used nick’s FPS code a few times in my projects but I noticed that 30FPS projects show approximately 31FPS and 60FPS projects show 62. I assumed it had to do with the way it blended FPS, so instead of taking 90% of the previous FPS and 10% of the current FPS, i tried something different but it still doesn’t work how I expect it.

for this, I am taking an array and storing the last 10 frame durations (the time between frames, in milliseconds). then I take the average of all of them and use that to determine FPS. however, I am still getting almost exactly 62.5 FPS for a 60 FPS project. I did some calculations and determined that 62.5 FPS translates to exactly 16 ms between frames, and 60 FPS translates to 16.67 ms.

so theoretically 17ms should pass 2/3 of the time and 16 should pass 1/3 of the time. when printing my array I found that 16 was way more common. i don’t know if this is a problem with my calculations or if this is a problem with wick.

What have you tried so far?
this is what i tried

Do you have a Wick Editor File that we can see? Optional*
Attach a .wick file if you have one in progress that can help us help you!

the code is in the frame in the 2nd layer. (so in the meantime here’s a very early version of a to-be-tetris-like game)
Stacker 2.010-12-2022_16-03-29.wick (18.8 KB)

2 Likes

I think you cannot expect fps to be accurate and reliable
you experienced value in excess of what you wanted but on many older machines the project cannot stay at designed pace and drop speed

1 Like

(for powerful PCs) It is a known bug. They are using a wrong method for the animation thread. I had a fix somewhere in the custom editor.