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§
Structs§
- An
EntityCommand
which adds aRollback
component to an entity. - Label for the schedule which advances the current world to the next frame.
- Represents a total checksum for a given frame.
- Flags an entity as containing a checksum for a type
T
- Represents a checksum value for a specific type, flagged by
ChecksumFlag
. - A
Plugin
which creates aChecksum
resource which can be read after or during theSaveWorldSet::Snapshot
set in theSaveWorld
schedule has been run. - A
Plugin
which will track theComponent
C
onRollback Entities
and ensure aChecksumPart
is available and updated. This can be used to generate aChecksum
. - The most recently confirmed frame. Any information for frames stored before this point can be safely discarded.
- A
Plugin
which manages the rollback forEntities
. This will ensure allEntities
match the state of the desired frame, or can be mapped using aRollbackEntityMap
, which thisPlugin
will also manage. - A sensible default GGRS Config type suitable for most applications.
- GGRS plugin for bevy.
- Collection of snapshots for a type
For
, stored asAs
- A
Time
type for use with GGRS. This time is guaranteed to be in-sync with all peers, and reflect that exactlyRollbackFrameCount
frames have passed at theRollbackFrameRate
rate. Note that in theGgrsSchedule
, this is the default time. - This plugins provides
Time<GgrsTime>
, which is rolled-back automatically, and will also automatically replace [Time<()>
] when accessed insideGgrsSchedule
. - Label for the schedule which loads and overwrites a snapshot of the world.
- Inputs from local players. You have to fill this resource in the ReadInputs schedule.
- Handles for the local players, you can use this when writing an input system.
- Label for the schedule which reads the inputs for the current frame
- Plugin which will track the
Resource
R
and ensure aChecksumPart
is available and updated. This can be used to generate aChecksum
. - This component flags an entity as being included in the rollback save/load schedule with GGRS.
- Keeps track of the current frame the rollback simulation is in
Resource
describing the rate at which theAdvanceWorld
will run.- Label for the schedule which saves a snapshot of the current world.
- Sets up the
LoadWorldSet
andSaveWorldSet
sets, allowing for explicit ordering of rollback systems across plugins.
Enums§
- Set for ordering systems during the
LoadWorld
schedule. The most common option isLoadWorldSet::Data
, which is whereComponent
andResource
snapshots are loaded and applied to theWorld
. - Defines the Session that the GGRS Plugin should expect as a resource.
Traits§
- Extension trait for
EntityCommands
which adds theadd_rollback()
method. - Extension trait to add the GGRS plugin idiomatically to Bevy Apps
Functions§
- Returns a hasher built using the
seahash
library appropriate for creating portable checksums.