Crates.io | bevy_roll_safe |
lib.rs | bevy_roll_safe |
version | |
source | src |
created_at | 2023-11-14 08:10:17.153892+00 |
updated_at | 2024-12-19 21:06:27.754956+00 |
description | Rollback safe utilities and abstractions for Bevy |
homepage | |
repository | https://github.com/johanhelsing/bevy_roll_safe |
max_upload_size | |
id | 1034486 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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
/OnTransition
Bevy states when added through app.add_state::<FooState>()
have two big problems:
StateTransition
schedule within the MainSchedule
OnEnter(InitialState)
is not re-run.This crate provides an extension method, add_roll_state::<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).
See the states
example for usage with bevy_ggrs
.
bevy_ggrs
: Enable integration with bevy_ggrs
math_determinism
: Enable cross-platform determinism for operations on Bevy's (glam
) math types.bevy | bevy_roll_safe |
---|---|
0.15 | 0.4, main |
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!