{"id":15676978,"url":"https://github.com/johanhelsing/bevy_roll_safe","last_synced_at":"2025-04-15T05:52:44.566Z","repository":{"id":194001542,"uuid":"689897428","full_name":"johanhelsing/bevy_roll_safe","owner":"johanhelsing","description":"Rollback-safe implementations and utilities for Bevy Engine","archived":false,"fork":false,"pushed_at":"2024-12-19T21:06:34.000Z","size":44,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T16:37:58.832Z","etag":null,"topics":["bevy","deterministic","game-development","rollback"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johanhelsing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-11T06:21:24.000Z","updated_at":"2025-01-04T02:42:25.000Z","dependencies_parsed_at":"2024-02-23T15:28:34.010Z","dependency_job_id":"765934cd-4a8f-4651-8470-c17e9d070de7","html_url":"https://github.com/johanhelsing/bevy_roll_safe","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"e269223c5c591c2f73ae3274686e42dfd0e70f2d"},"previous_names":["johanhelsing/bevy_roll"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fbevy_roll_safe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fbevy_roll_safe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fbevy_roll_safe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fbevy_roll_safe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanhelsing","download_url":"https://codeload.github.com/johanhelsing/bevy_roll_safe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248379716,"owners_count":21094199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","deterministic","game-development","rollback"],"created_at":"2024-10-03T16:07:54.133Z","updated_at":"2025-04-15T05:52:44.547Z","avatar_url":"https://github.com/johanhelsing.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy_roll_safe\n\n[![crates.io](https://img.shields.io/crates/v/bevy_roll_safe.svg)](https://crates.io/crates/bevy_roll_safe)\n![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)\n[![docs.rs](https://img.shields.io/docsrs/bevy_roll_safe)](https://docs.rs/bevy_roll_safe)\n\nRollback-safe implementations and utilities for Bevy Engine.\n\n## Motivation\n\nSome 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.\n\n## Roadmap\n\n- [x] States\n  - [x] Basic freely mutable states\n  - [x] `OnEnter`/`OnLeave`/`OnTransition`\n  - [ ] Sub-States\n  - [ ] Computed states\n  - [ ] Roll-safe events\n- [x] FrameCount\n- [ ] Events\n\n## States\n\nBevy states when added through `app.add_state::\u003cFooState\u003e()` have two big problems:\n\n1. They happen in the `StateTransition` schedule within the `MainSchedule`\n2. If rolled back to the first frame, `OnEnter(InitialState)` is not re-run.\n\nThis crate provides an extension method, `add_roll_state::\u003cS\u003e(schedule)`, which lets you add a state to the schedule you want, and a resource, `InitialStateEntered\u003cS\u003e` which can be rolled back and tracks whether the initial `OnEnter` should be run (or re-run on rollbacks to the initial frame).\n\nSee the [`states`](https://github.com/johanhelsing/bevy_roll_safe/blob/main/examples/states.rs) example for usage with [`bevy_ggrs`].\n\n## Cargo features\n\n- `bevy_ggrs`: Enable integration with [`bevy_ggrs`]\n- `math_determinism`: Enable cross-platform determinism for operations on Bevy's (`glam`) math types.\n\n## Bevy Version Support\n\n|bevy|bevy_roll_safe|\n|----|--------------|\n|0.15|0.4, main     |\n|0.14|0.3           |\n|0.13|0.2           |\n|0.12|0.1           |\n\n## License\n\n`bevy_roll_safe` is dual-licensed under either\n\n- MIT License (./LICENSE-MIT or \u003chttp://opensource.org/licenses/MIT\u003e)\n- Apache License, Version 2.0 (./LICENSE-APACHE or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n\nat your option.\n\n## Contributions\n\nPRs welcome!\n\n[`bevy_ggrs`]: https://github.com/gschup/bevy_ggrs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanhelsing%2Fbevy_roll_safe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanhelsing%2Fbevy_roll_safe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanhelsing%2Fbevy_roll_safe/lists"}