{"repo":"benfrankel/pyri_state","free":true,"listed":false,"github":"https://github.com/benfrankel/pyri_state","clone":"git clone https://github.com/benfrankel/pyri_state.git","description":"A flexible `bevy_state` alternative","language":"Rust","stars":39,"topics":["bevy","ecs","game-development"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"pyri state pyri state is a bevy state alternative offering flexible change detection & scheduling. See the examples and documentation for more information. Comparison to bevy state State pattern-matching In pyri state , state pattern-matching is directly supported: There are a few ways to do this using bevy state : 1. Add a system for every possible matching state. 2. Use a custom substate. 3. Use a custom schedule. Note that option 1 is prohibitively expensive when the pattern has too many matches, like Level(x) if x % 2 == 0 . Options 2 and 3 add a confusing layer of indirection and boilerplate, hiding the actual pattern-matching in the SubStates implementation or the run my schedule exclusive system. Even worse, option 2 is subtly broken: if you transition from state A to B where both states match the pattern, bevy state will silently discard the substate's transition because it's a same-state transition. State refreshing In pyri state , state refreshing is supported out-of-the-box: The equivalent in bevy state requires building your own custom schedules (e.g. OnReExit , OnReTransition , OnReEnter , OnChangeExit , OnChangeTransition , OnChangeEnter , etc.) and hooking them into the state transition internals, as in this example. This is a seriously discouraging amount of boilerplate for something that should be a basic feature. And more - Custom storage: In pyri state , the next state can be stored in any custom data structure. For example, you can store the next state in ","default_branch":null,"files":null,"tree":[],"storefront":"/r/benfrankel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/benfrankel/pyri_state/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}