Release 0.22.0
Release 0.22.0
Upgraded rollback detection
Previously there was only one way we could rollback: if we received a new state update on the Confirmed entity which did not match the prediction history.
Now we have separate a RollbackMode for state replication and input replication; the possible values are Always (rollback whenever we get a new state or input), Check (rollback whenever we get a new state that doesn't match the predicted history, or a new input that doesn't match the input history), Never.
The Always mode can be useful to force trigger rollbacks and to check if your game can handle a certain amount of rollbacks.
But the main benefit is that this change allows for deterministic replication; a networking model where only inputs are replicated (instead of state).
Deterministic Replication
Lightyear now supports deterministic replication! In this mode you can choose to replicate only inputs; each client should receive the inputs from all other clients and use that to deterministically simulate the game.
The API is extremely similar to state replication: instead of Predicted you need to add the DeterministicPredicted component!