Hi everybody,
Almost every video game implements saving and loading in exactly the same way. I wanted to build a framework that captures this in the simplest way possible for Bevy.
This framework is inspired by Ren'py 's save/load/rollback system - I think it would be very useful for anybody creating a visual novel.
bevy_saveis primarily built around extension traits to Bevy'sWorld.While Bevy's
DynamicSceneonly allows you to save entities and components,bevy_saveenables you to save everything, including resources.
bevy_saveautomatically uses your app's cargo package name to create a unique, permanent save directory in the correct place for whatever platform it is running on.
bevy_saveis not just about save files, it is about total control over game state. Rollback allows you to keep multiple snapshots of game state in memory and scroll through them in real time.
It leverages Bevy's built-in Reflection to do just about everything.
Saving / Loading is implemented internally with rmp-serde, but the library also supports serializing/deserializing game state with any serde serializer/deserializer.
It includes a tedious backport of PR bevy_reflect: Fix deserialization with readers (#6894) for Bevy 0.9.1 in src/scene.rs, allowing DynamicScene to be deserialized with an arbitrary deserializer internally.
I am mainly looking for tips on improving ergonomics, organization, and performance, but of course any and all feedback is welcome.
PS - You might have to build the docs yourself (blame docs.rs).
Please let me know what you think!
https://github.com/hankjordan/bevy_save
https://docs.rs/bevy_save
https://crates.io/crates/bevy_save