Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)LO
loffiz @vlemmy.net
Posts 1
Comments 12

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
Why does Lemmy feel so fresh compared to Reddit?
  • Agree on all your points! Not trying to sound arrogant here but I think content gets a lot more "bland" with more users, or at least in communities without great passion. It's much more personal here and posts generally puts interesting thoughts in my head as opposed to reddit.

  • how do you use your screen space?
  • Using workspaces is great (at least in linux), otherwise lookin into other window managers could be beneficial. I use i3-gaps on my small laptop, and gnome on desktop and I frequently swap and split up everything I do into workspaces.

  • Defederation with Instances that Allow Loli and Shota
  • I joined this instance because I don't have the need of someone else controlling the content I see. But, in cases like these (distasteful stuff like shota, loli), I have no strong opinion, and I can also move on if I ever think the "defederation" has gone too far.