#Correct way to do tick timers with prediction?

2 messages · Page 1 of 1 (latest)

night badge
#

Hello! I'm a little confused with how to do tick timers correctly, and whether not they should be reconciled as my attempts so far have lead to desyncs and my client jittering when trying to implement a jump cooldown timer. Could anyone please show me a simple example to work off of? Ideally I'd like to just set a future tick that my cooldown expires at.

night badge
#

So I think I've solved my particular issue, I created a Fusion-style TickTimer class with a target tick, a created tick, and ExpiredOrNotRunning(uint currentTick). In my Replicate function I pass through the data.GetTick() to see if the timer is expired or not.
What I wasn't taking into account was that the tick it was created on would have to be replayed, and that my fresh tick timer would prevent that from happening! Wasn't the best spent sunday but at least I've got a better understanding of how prediction works hahaha