This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
Buffering commands
Pre-release
Pre-release
This release adds two buffers to the Simulation (one local, one remote). Commands are stored into the remotebuffer (adding lag compensation) and will be executed when the input from server arrives. Input that arrives later than the current local tick will not be executed which may lead to desyncs (in other words: the lag was higher than the lag compensation).
The next steps are:
- rolling back to the received input and fast forward the simulation to the current local tick
- the buffer from the server was removed but should be added again because: if a client receives an input he should be sure that it contains the input from all other clients for the given frame. this way the prediction for one frame can only miss once