kfischer-okarin / hoard

Serialize/Deserialize arbitrarily complex values in your DragonRuby games.
MIT License
2 stars 0 forks source link

Serialize big entities #2

Open kfischer-okarin opened 3 years ago

kfischer-okarin commented 3 years ago

Not quite sure yet how to go about it but I suppose

  1. checking the serialized string length of the entity
  2. and if it's too big (more than 20.000 characters-ish?) then use a more complex split-up serialization logic
logankoester commented 3 years ago

I've run into something like this limit before (with drgtk, but not with hoard).

My solution for it was something like an attribute exclusion list (some of the larger attributes didn't need to be persisted, like tile grids that could be rehydrated by loading the map file instead).

And also by separating entity class names by file.

I didn't end up with a perfect implementation of that idea, as it was just an experiment in debugging from a saved game state during a gamejam. But that might be something to consider if it fits.