I am seeing an issue with a predicted looping gameplay cue that I feel must be an issue across all GCs like this and I’m wondering if we have found a solution for it before. It is applied for the course of a GA, which runs as long as you click. It is predicted and so shows up locally first then for other players once the server catches up. The issue is that if I quickly activate the GA twice, it can get into a state where the locally predicted GC from the second activation is cancelled by the server on the ending of the first, which can happen after the activation of the second on the client. The order looks something like this:
GA 1 Starts Predicted on Client GC is added on Client GA 1 Starts on Server GC is added on Server GA 1 Ends on Client GC is removed on Client GA 2 Starts Predicted on Client GC is added on Client GA 1 Ends on Server GC is removed on client and server <--- GA 2 Starts on server GC is added on server, but seemingly not replicated to owning client as it assumes it has it from prediction
We see two possible solutions:
- Add a cooldown to the GA. This doesnt actually fully fix the bug with enough latency, and it doesnt feel amazing. But it is simple and works most of the time
- Break the GC into two separate GCs with unique tags, GC_Local and GC_Remote, where GC_Local is local only and GC_Remote is applied only remotes (the GC has a setting for this). This works, but feels like we’re fighting the system a bit. Definitely adds some confusion and possibly bugs down the line if they aren’t kept in line with each other
I’m wondering if there might be a better way than these two.