Closed frnsys closed 2 years ago
So this is actually more complicated than I thought, since the engine was designed around one way serialization (we originally didn't intend to have game saves).
Possible workaround: use serde_json
and define a Saveable
trait that has a save
method which returns a JSON value and a load
method which takes a JSON value and modifies the struct's data accordingly.
Just a simple save system in case e.g. someone closes the browser or something accidentally.