Long ask about server authorative and movement of charactere controller :
Attached ressources :http://www.gabrielgambetta.com/entity-interpolation.html
Until now, was simply transmit position and interpolation between two position tick.
was easy, but will be more complicate to have precise simulation of movement, specially with gravity
so (after reading a lot of stuff), still got some issue.
Now, i send a vector of direction and rotation of the charactere over the network
(for a charactereController on unity, with Move function).
if my tickrate is “infinite”, mean everyframe we send all the input, it work perfectly, even in bad network condition
the client sim fit always with the server sim(modifié)
but, if i add a “updaterate” systeme, like send and receive position only every 100ms.
(the RTT if i’m correct)
starting to be tricky, and don’t know exactly how to handle this
should i :
A) send a big package with all the input was push in ? (and looking like it will be hard to simulate the movement of the player with this solution)
B) send press and release button ? (but looking same issue above, adding the fact if there is a variable ping, it can lead to bad sim on server)
and if i send all the position, or button, this don’t gonna be too heavy ?
and for the end, my last idea and probably the simple :
Don’t go with CC, but with a simple kinematic rigidbody. Let input (of movement ofc) to the client who only send position at regulary intervals.
we receive position on the server, check the speed and interpolate, checking also walls
we never send back position to the authorative client, only if a movement is impossible (to high speed).
if there is a desync, or a sim mismatch, we handle the case with the check of the speed.
with this, we don’t need to store position (only the last), and should handle many case, it’s just a (bit more) permissive for cheating (even with a check of the path, in some case, people we be able to TP behind a wall.
What do you think about this last idea ? thanks.