I’m trying to make an ADOFAI clone (God I switch ideas so much) and the timing is a bit off here. Look at the video to see what I mean pls.
How could I fix this?
I don’t know your intentions. I’ll Google the game or game type that you mentioned.
My belief is that each time you reset a timer, you’re losing a tiny amount. It’s basically a rounding error. A tiny amount will quickly grow and throw things out of sync. The shortest timer will go out of sync quicker as it loses time more often.
If the target time was 10 seconds then the timer might hit 10.003 or maybe 10.005. I didn’t do the math. I don’t know the real numbers. It’s a second divided by a target of 60 for 60 frames per second. So, say it rest at 10.005 then the next time it might trigger at 10.010 or later. In the overall scheme that’s not very accurate since the frame rate can fluctuate.
A more accurate technique might be to use 1 timer that doesn’t reset. Compare the time to a target time that gets increased each time. That way if you added 10 each time, it would always aim for 10,20,30… and if you added 20 then it would always aim for 20,40,60…
It helps to post the events as an image instead of a video capture. It’s much easier to read.
Googled the game.
“A Dance of Fire and Ice is a challenging, one-button rhythm game where players guide two orbiting planets along a path by tapping in time with the music, requiring precise timing to maintain their equilibrium.”
Like Keith said, you shouldn’t reset the timer. You should use TimerElapsedTime(MyTimer) in your formulas.
Oh, that would probably make more sense. Thank you.
