Bold of you to assume the data in save files is packed binary and not something like JSON where { “x”: 13872, “y”: -17312, “z”: -20170 } requires 40 bytes of storage.
It’s not really laziness. Storing as JSON solves or prevents a lot of problems you could run into with something bespoke and “optimally packed”, you just have the tradeoff of needing more storage for it. Even then, the increased storage can be largely mitigated with compression. JSON compresses very well.
The problem is usually what they’re storing, not how they’re storing it. For example, The Witcher (first one) has ~20MB save files. These are mostly a bespoke packed binary format, but contain things like raw strings of descriptions in multiple localisations for items being carried, and complete descriptors of game quests. Things that should just be ID values that point to that data in the game files. It also leads with like… 13KB of zero-padding for some reason.
Bold of you to assume the data in save files is packed binary and not something like JSON where { “x”: 13872, “y”: -17312, “z”: -20170 } requires 40 bytes of storage.
Agreed. JSON solves:
For saving games, JSON+gzip is such a good combination that I’d probably never consider anything else.
protobuf does all of these (well, except compression which you dont need)
That’s excusable in My First Game™ but surely professional AAAAA game would never cut corners and code something so lazily, eh?
It’s not really laziness. Storing as JSON solves or prevents a lot of problems you could run into with something bespoke and “optimally packed”, you just have the tradeoff of needing more storage for it. Even then, the increased storage can be largely mitigated with compression. JSON compresses very well.
The problem is usually what they’re storing, not how they’re storing it. For example, The Witcher (first one) has ~20MB save files. These are mostly a bespoke packed binary format, but contain things like raw strings of descriptions in multiple localisations for items being carried, and complete descriptors of game quests. Things that should just be ID values that point to that data in the game files. It also leads with like… 13KB of zero-padding for some reason.
Good points!
looking at you x3
and rimworld