Page 1 of 1
Eventu: Inconsistent Timing with waitSeconds
Posted: 25 Mar 2016, 6:54
by Sambo
The timing with the waitSeconds function isn't consistent. I moved multiple layers, at the same speed, for the same amount of time, and they weren't aligned afterward. Also, I tried waitSeconds(1) and waitFrames(65) at the same time, and they weren't aligned afterward. These wait times should be equivalent.
waitFrames is accurate.
Posted: 9 May 2016, 4:59
by Yoshi021
The reason is because the game does not run at exactly 65 fps. Its actually. Its actually a decimal (65.XX). So waitFrame ends up being more precise.
Posted: 26 Jun 2016, 22:39
by Hoeloe
Also, waitSeconds IS accurate, but in terms of the number of physical seconds taken. The waitSeconds function takes into account the time between frames, which means it will always take the same physical time regardless of any lag. For this reason, waitSeconds is not suitable for moving layers.