Re:Bevy 0.3: game engine built in Rust
by vlmutolo on Wednesday November 04, 2020 @01:27AM
(#24986794)
Not sure about bevy specifically, but I know the rapier physics engine (which integrates with bevy) can serialize all of the physics state.
Plus, in Rust, if you mark types as Serialize you can serialize nearly anything you want. And it seems like Bevy makes full use of the powerful Rust type system.
So I’d guess “yes, you can probably easily serialize the game state in most cases”.
Re:Bevy 0.3: game engine built in Rust
by reitzensteinm on Wednesday November 04, 2020 @02:02AM
(#24986929)
To do edit and continue with it you're really going to want full serialization, so if you eg model events as a closure instead of plain data, you're toast (coming from an outsider's perspective).
If the base engine supplies you with full serialization support for the inbuilt features and a list of rules to follow to maintain it, you're golden.
If it were possible, your iteration times could be ridiculously low. Play the game until the bossfight you're iterating on. Dump it out to disk. Edit the code, recompile and run from saved state in a couple of seconds? That sounds amazing.
Unity has pretty good edit and continue for simple stuff, but it quickly falls apart once you start doing non trivial things.