kfischer-okarin / hoard

Serialize/Deserialize arbitrarily complex values in your DragonRuby games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serialize big entities

kfischer-okarin opened this issue · comments

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

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.