Expand description
The InputBuffer contains a history of the ActionState for each tick.
It is used for several purposes:
- the client’s inputs for tick T must arrive before the server processes tick T, so they are stored
in the buffer until the server processes them. The InputBuffer can be updated efficiently by receiving
a list of
ActionDiffs compared from an initialActionState - to implement input-delay, we want a button press at tick t to be processed at tick t + delay on the client. Therefore, we will store the computed ActionState at tick t + delay, but then we load the ActionState at tick t from the buffer
Structs§
- Input
Buffer - Buffer that stores a value (usually Inputs) for the last few ticks.
Enums§
- Compressed
- We use this structure to efficiently compress the inputs that we send to the server