3 ms·
Can you easily serialize/deserialize the game state with your ECS system? I haven't looked closely at it. If it were possible, your iteration times could be ri
by reitzensteinm 6y ago
Can you easily serialize/deserialize the game state with your ECS system? I haven't looked closely at it.
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.
- vlmutolo 6y agoNot 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”.
- reitzensteinm 6y agoTo 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.