#`bevy_save` - a framework for saving and loading game state in Bevy

8 messages · Page 1 of 1 (latest)

wind garden
#

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_save is primarily built around extension traits to Bevy's World.

While Bevy's DynamicScene only allows you to save entities and components, bevy_save enables you to save everything, including resources.

bevy_save automatically 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_save is 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

GitHub

A framework for saving and loading game state in Bevy. - GitHub - hankjordan/bevy_save: A framework for saving and loading game state in Bevy.

rugged pelican
#

I don't have the energy to review this right now, but I'm very glad this exists and will give you feedback once I start using it in my game

#

I really like the compatibility table! And the README is excellent

#

Very happy to see it support both save games and networking use cases (since these are fundamentally the same)

#

Ultimately I'd like to see something like this get upstreamed once it's more mature

peak inlet
#

gonna take a look at this later interesting to see how this works with other crates

wind garden
arctic canopy
#

this sounds awesome, good work. Does this work similarly to this plugin https://github.com/johanhelsing/bevy_pkv? Im currently using this but... what you have here sounds much better, excited to play around with it in my game

GitHub

Cross-platform (including wasm) persistent key value store plugin for rust games/apps - GitHub - johanhelsing/bevy_pkv: Cross-platform (including wasm) persistent key value store plugin for rust ga...