| Crates.io | bevy_roll_safe |
| lib.rs | bevy_roll_safe |
| version | 0.6.0 |
| created_at | 2023-11-14 08:10:17.153892+00 |
| updated_at | 2025-10-25 11:32:21.449947+00 |
| description | Rollback safe utilities and abstractions for Bevy |
| homepage | |
| repository | https://github.com/johanhelsing/bevy_roll_safe |
| max_upload_size | |
| id | 1034486 |
| size | 111,806 |
Rollback-safe implementations and utilities for Bevy Engine.
Some of Bevy's features can't be used in a rollback context (with crates such as bevy_ggrs). This is either because they behave non-deterministically, rely on inaccessible local system state, or are tightly coupled to the Main schedule.
OnEnter/OnLeave/OnTransitionPlaybackModesBevy states when added through app.init_state::<FooState>() have two big problems:
StateTransition schedule within the MainScheduleOnEnter(InitialState) is not re-run.This crate provides an extension method, init_roll_state_in_schedule::<S>(schedule), which lets you add a state to the schedule you want, and a resource, InitialStateEntered<S> which can be rolled back and tracks whether the initial OnEnter should be run (or re-run on rollbacks to the initial frame).
If you are using the rollback schedule plugin as well. Adding a rollback safe state is a simple as app.init_roll_state::<YourState>().
See the states example for usage with bevy_ggrs.
RollbackSchedulePlugin adds rollback-specific alternatives to the schedules in Bevy's FixedMain/Main schedules.
The plugin takes a parent schedule as input, so it can easily be added to the ggrs schedule or any other schedule you want.
RollbackAudioPlugin lets you easily play sound effects from a rollback world without duplicate sounds playing over each other. It depends on the RollbackSchedulePlugin, or you need to add the maintenance system in a similar order to your own schedules.
audio: Enable rollback-safe wrapper for bevy_audiobevy_ggrs: Enable integration with bevy_ggrsmath_determinism: Enable cross-platform determinism for operations on Bevy's (glam) math types.| bevy | bevy_roll_safe |
|---|---|
| 0.17 | 0.6, main |
| 0.16 | 0.5 |
| 0.15 | 0.4 |
| 0.14 | 0.3 |
| 0.13 | 0.2 |
| 0.12 | 0.1 |
bevy_roll_safe is dual-licensed under either
at your option.
PRs welcome!