Crate bevy_ggrs

Source
Expand description

bevy_ggrs is a bevy plugin for the P2P rollback networking library GGRS.

See GgrsPlugin for getting started.

Re-exports§

pub use ggrs;

Modules§

prelude

Structs§

AddRollbackCommand
An EntityCommand which adds a Rollback component to an entity.
AdvanceWorld
Label for the schedule which advances the current world to the next frame.
Checksum
Represents a total checksum for a given frame.
ChecksumFlag
Flags an entity as containing a checksum for a type T
ChecksumPart
Represents a checksum value for a specific type, flagged by ChecksumFlag.
ChecksumPlugin
A Plugin which creates a Checksum resource which can be read after or during the SaveWorldSet::Snapshot set in the SaveWorld schedule has been run.
ChildOfSnapshotPlugin
Specialized snapshotting plugin for ChildOf components.
CloneStrategy
A Strategy based on Clone
ComponentChecksumPlugin
A Plugin which will track the Component C on Rollback Entities and ensure a ChecksumPart is available and updated. This can be used to generate a Checksum.
ComponentMapEntitiesPlugin
A Plugin which updates the state of a post-rollback Component C using MapEntities.
ComponentSnapshotPlugin
A Plugin which manages snapshots for a Component using a provided Strategy.
ConfirmedFrameCount
The most recently confirmed frame. Any information for frames stored before this point can be safely discarded.
CopyStrategy
A Strategy based on Copy
EntityChecksumPlugin
EntitySnapshotPlugin
A Plugin which manages the rollback for Entities. This will ensure all Entities match the state of the desired frame, or can be mapped using a RollbackEntityMap, which this Plugin will also manage.
GgrsComponentSnapshot
A storage type suitable for per-Entity snapshots, such as Component types.
GgrsConfig
A sensible default GGRS Config type suitable for most applications.
GgrsPlugin
GGRS plugin for bevy.
GgrsSchedule
GgrsSnapshots
Collection of snapshots for a type For, stored as As
GgrsTime
A Time type for use with GGRS. This time is guaranteed to be in-sync with all peers, and reflect that exactly RollbackFrameCount frames have passed at the RollbackFrameRate rate. Note that in the GgrsSchedule, this is the default time.
GgrsTimePlugin
This plugins provides Time<GgrsTime>, which is rolled-back automatically, and will also automatically replace [Time<()>] when accessed inside GgrsSchedule.
ImmutableComponentSnapshotPlugin
A Plugin which manages snapshots for a Component using a provided Strategy that works with immutable components.
LoadWorld
Label for the schedule which loads and overwrites a snapshot of the world.
LocalInputs
Inputs from local players. You have to fill this resource in the ReadInputs schedule.
LocalPlayers
Handles for the local players, you can use this when writing an input system.
MaxPredictionWindow
The maximum prediction window for this Session, provided as a concrete Resource.
PlayerInputs
ReadInputs
Label for the schedule which reads the inputs for the current frame
ReflectStrategy
A Strategy based on Reflect and FromWorld
ResourceChecksumPlugin
Plugin which will track the Resource R and ensure a ChecksumPart is available and updated. This can be used to generate a Checksum.
ResourceMapEntitiesPlugin
A Plugin which updates the state of a post-rollback Resource R using MapEntities.
ResourceSnapshotPlugin
A Plugin which manages snapshots for a Resource using a provided Strategy.
Rollback
This component flags an entity as being included in the rollback save/load schedule with GGRS.
RollbackEntityMap
A Resource which provides an [EntityMap], describing how Entities changed during a rollback.
RollbackFrameCount
Keeps track of the current frame the rollback simulation is in
RollbackFrameRate
Resource describing the rate at which the AdvanceWorld will run.
RollbackOrdered
A Resource which provides methods for stable ordering of Rollback flags.
SaveWorld
Label for the schedule which saves a snapshot of the current world.
SnapshotPlugin
This plugin sets up the LoadWorld, SaveWorld, and AdvanceWorld schedules and adds the required systems and resources for basic rollback functionality.
SnapshotSetPlugin
Sets up the LoadWorldSet and SaveWorldSet sets, allowing for explicit ordering of rollback systems across plugins.

Enums§

AdvanceWorldSet
LoadWorldSet
Set for ordering systems during the LoadWorld schedule. The most common option is LoadWorldSet::Data, which is where Component and Resource snapshots are loaded and applied to the World.
SaveWorldSet
Session
Defines the Session that the GGRS Plugin should expect as a resource.

Traits§

AddRollbackCommandExtension
Extension trait for EntityCommands which adds the add_rollback() method.
GgrsApp
exstension trait for App to add GGRS specific functionality
RollbackApp
Extension trait to ergonimically add rollback plugins to Bevy Apps
Strategy
Describes how to efficiently transform a Target into a Stored version, and vice versa. Any implementation for a Strategy should form a bijection between Target and Stored

Functions§

checksum_hasher
Returns a hasher built using the seahash library appropriate for creating portable checksums.

Type Aliases§

GgrsComponentSnapshots
Typical Resource used to store snapshots for a Component C as the type As. For most types, the default As = C will suffice.
GgrsResourceSnapshots
Typical Resource used to store snapshots for a Resource R as the type As. For most types, the default As = R will suffice.