#When does prediction v2 rerun replicate?

17 messages · Page 1 of 1 (latest)

gleaming spade
#

Hi!

It seems my setup is very aggressively replaying inputs in the [Replicate] method, does anyone know what triggers such behavior?

example: log attached

#

When does prediction v2 rerun replicate?

urban shell
#

That's how it works. It reconciles with the server's state and then reruns all the states it did since that state

gleaming spade
#

ok i see, so say client is at T3 and it receives reconciliation data from server for T0, it will rerun all inputs from T1 to T3?

urban shell
#

yep exactly

gleaming spade
#

thanks! so i guess that means everything required to calculate the position for a given tick as to be captured in the replication data? in another word client & server cannot really indenpendly track internal states?

urban shell
#

Yeah, things that would affect the movement need to be replicated too

gleaming spade
#

issue i'm facing is i'm using a acceleration & deceleration for my character controller movement, and the resulting simulation is not very smooth

#

so i guess my local interpolation is causing the issue... what's the best way to handle this situation though...

#

shall i just pass the velocity in the repl data?

#

ok thanks! is that a common practice? cuz i guess ppl can now cheat acceleration (ignoring movement inertia for example)

urban shell
#

Well, the code is still run on the server, so it shouldn't be able to be cheated

gleaming spade
#

hmm but if i can control my velocity which the server depends on to calculate my next movement, can't i just for example pass velocity = 0 or maxVelocity to instantly stop / accelerate to max speed?

#

(essentially, client's current velocity can't be trusted)

urban shell
#

I don't think you would pass velocity in, just inputs that would cause it

#

Although CSP isn't really my strong point

gleaming spade
#

ha np! thanks a lot for your help