Prediction
Easel uses rollback netcode as a way to reduce the perceived input latency in multiplayer games. This page details how to prepare your game to work well with rollback netcode. To learn more about how rollback netcode works in Easel, see Rollback Netcode.
Enabling rollback netcode
Rollback netcode is automatically enabled for all multiplayer games in Easel. You do not need to do anything special to activate it.
Configuring input delay
Easel automatically attempts to minimize the input delay experienced by players in your game. See network.toml for more details on how to configure the input delay settings for your game.
Rubberbanding
Easel uses rubberbanding to smooth out the differences between the predicted game state and the actual game state. Instead of sudden jumps which may be jarring, characters will smoothly move to their correct positions. These corrections sometimes are so subtle they become unnoticeable.
To ensure Easel can rubberband all graphics in your game,
make sure to assign an Entity with a Body, rather than a Vector,
to the pos parameter when using Spark, Streak or Swoop.
This way the graphics can track the position of the entity which may be smoothed out by Easel.
Slotted random
Instead of having one global random number generator, Easel has one per-entity, and you can even explicitly define more if you want. This makes it less likely that order-of-execution will affect the random numbers generated, and more likely the prediction will be correct if the inputs change due to a rollback. The entity is automatically discovered from context and so you normally do not need to think about this.
See Random for more details.