Crate lightyear_prediction

Source
Expand description

Handles client-side prediction

Modules§

correction
This module provides the ability to smooth the rollback (from the Predicted state to the Corrected state) over a period of time instead of just snapping back instantly to the Corrected state. This might help hide rollback artifacts. We will call the interpolated state the Visual state.
despawn
diagnostics
Collect diagnostics for the prediction systems.
plugin
pre_prediction
Module to handle pre-prediction logic (entities that are created on the client first), then the ownership gets transferred to the server.
predicted_history
Managed the history buffer, which is a buffer of the past predicted component states, so that whenever we receive an update from the server we can compare the predicted entity’s history with the server update.
prelude
prespawn
Handles spawning entities that are predicted
resource_history
There’s a lot of overlap with client::prediction_history because resources are components in ECS so rollback is going to look similar.
rollback
server
spawn
Logic to handle spawning Predicted entities

Structs§

Predicted
Component added to client-side entities that are predicted.

Enums§

PredictionMode
Defines how a predicted or interpolated component will be replicated from confirmed to predicted/interpolated

Traits§

SyncComponent
Trait for components that can be synchronized between a confirmed entity and its predicted/interpolated counterpart.