The Picard Maneuver@lemmy.world to Microblog Memes@lemmy.worldEnglish · 11 days agoSure, if you put it like that...lemmy.worldexternal-linkmessage-square74fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkSure, if you put it like that...lemmy.worldThe Picard Maneuver@lemmy.world to Microblog Memes@lemmy.worldEnglish · 11 days agomessage-square74fedilink
minus-squareSkaveRat@discuss.tchncs.delinkfedilinkEnglisharrow-up0·11 days agoEh, really depends They are likely just serializing a bunch of data objects. And set states and flags with humans readable enums Enums make code a lot easier to read, especially if you use it to check stuff all over the place Using to a couple bytes more storage is worth it
minus-squareEcho Dot@feddit.uklinkfedilinkEnglisharrow-up0·edit-211 days agoI thought that enums were supposed to compile down to aa, ab, ac when you actually build the game.
minus-squareSkaveRat@discuss.tchncs.delinkfedilinkEnglisharrow-up0·11 days agoDepending on the language, they are. Lots of games also use data structures derived from tables/csv at runtime to configure things like stats. So they would also need these (human readable) values in the save files Hard to tell from speculation and not having the data
Eh, really depends
They are likely just serializing a bunch of data objects. And set states and flags with humans readable enums
Enums make code a lot easier to read, especially if you use it to check stuff all over the place
Using to a couple bytes more storage is worth it
I thought that enums were supposed to compile down to aa, ab, ac when you actually build the game.
Depending on the language, they are.
Lots of games also use data structures derived from tables/csv at runtime to configure things like stats. So they would also need these (human readable) values in the save files
Hard to tell from speculation and not having the data