#ecs #bevy #game

pyri_state

A flexible bevy_state alternative

2 unstable releases

new 0.2.0-rc.0 Jun 18, 2024
0.1.0 May 23, 2024

#56 in #ecs

Download history 82/week @ 2024-05-19 5/week @ 2024-05-26 1/week @ 2024-06-02 94/week @ 2024-06-16

113 downloads per month

MIT/Apache

87KB
1.5K SLoC

Flexible game states

License Crates.io Downloads Docs

pyri_state is a bevy_state alternative offering flexible change detection & scheduling.

#[derive(State, Clone, PartialEq, Eq)]
struct Level(usize);

app.add_systems(StateFlush, state!(Level(4 | 7 | 10)).on_enter(save_progress));

Read the documentation or check out the examples folder for more information.

Bevy version compatibility

bevy version pyri_state version
0.14 0.2
0.13 0.1

Remaining tasks

  • Unit tests
  • How does flushing states once per frame interact with FixedUpdate?
  • Component states?

Dependencies

~9–12MB
~212K SLoC