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 the [Component
]C
onRollback Entities
and ensure aChecksumPart
is available and updated. This can be used to generate aChecksum
. - A [
Plugin
] which updates the state of a post-rollback [Component
]C
using [MapEntities
]. - 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 this [Plugin
] will also manage. - A storage type suitable for per-[
Entity
] snapshots, such as [Component
] types. - 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.
- The maximum prediction window for this
Session
, provided as a concrete [Resource
]. - 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
. - A [
Plugin
] which updates the state of a post-rollback [Resource
]R
using [MapEntities
]. - 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. - A [
Resource
] which provides methods for stable ordering ofRollback
flags. - 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 where [Component
] and [Resource
] snapshots are loaded and applied to the [World
]. - 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.
Type Aliases§
- Typical [
Resource
] used to store snapshots for a [Component
]C
as the typeAs
. For most types, the defaultAs = C
will suffice. - Typical [
Resource
] used to store snapshots for a [Resource
]R
as the typeAs
. For most types, the defaultAs = R
will suffice.