Skip Navigation

Serialization/deserialization recommendations

I'm developing my own game from scratch, and up until now I've been using json (nlohmann) for de-/serialization. My game generates a lot of objects procedurally (think of it as Minecraft in size) and objects load/unload pretty slow and occupies a lot of disc space. I've seen lots of people recommend creating your custom serialization instead of using something like protocol buffers, but I cannot find much on the subject in terms of general guidlines and principles.

What I'm looking for:

  • Highly performant (probably a format that translates directly from and to the objects themselves?)
  • Simple to extend existing classes with serialization/deserialization instructions
  • Serialization of objects with nested objects
  • Handling of arrays/vectors and primitive types

I might be thinking wrongly on these wishes, please tell me if so =)

I've been pondering and searching for guidance but not finding anything concrete. I thought that there's probably some of you smart people that have experience with this!

4
4 comments