this post was submitted on 05 Jun 2024
187 points (100.0% liked)

Games

32426 readers
822 users here now

Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.

Weekly Threads:

What Are You Playing?

The Weekly Discussion Topic

Rules:

  1. Submissions have to be related to games

  2. No bigotry or harassment, be civil

  3. No excessive self-promotion

  4. Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts

  5. Mark Spoilers and NSFW

  6. No linking to piracy

More information about the community rules can be found here.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 9 points 5 months ago (1 children)

Agreed. JSON solves:

  • the 'versioning' problem, where the data fields change after an update. That's a nightmare on packed binary; need to write so much code to handle it.
  • makes debugging persistence issues easy for developers
  • very fast libraries exist for reading and writing it
  • actually compresses pretty damn well; you can pass the compress + write to a background thread once you've done the fast serialisation, anyway.

For saving games, JSON+gzip is such a good combination that I'd probably never consider anything else.

[โ€“] cactusupyourbutt 3 points 5 months ago

protobuf does all of these (well, except compression which you dont need)