1040
you are viewing a single comment's thread
view the rest of the comments
[-] AdrianTheFrog@lemmy.world 2 points 1 year ago

I was looking at the savegames from the game control recently, it's kinda funny because you open them in notepad, you see a bunch of random gibberish from bad decoding (the game uses a proprietary save format) with the words "collected" "Collected" "unlocked" "available" "VariableRestoreHack" (??) "STATE_B_PUZZLE_SOLVED" "Powercore_Not_Attached" randomly interspersed

Like, surely there is a better way to store 2 state data other than an english word?

It does generally get longer as you play, but also "locked" just switches to "unlocked" for example when you unlock something

[-] SkaveRat@discuss.tchncs.de 5 points 1 year ago

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

[-] echodot@feddit.uk 2 points 1 year ago* (last edited 1 year ago)

I thought that enums were supposed to compile down to aa, ab, ac when you actually build the game.

[-] SkaveRat@discuss.tchncs.de 4 points 1 year ago

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

[-] Natanael@infosec.pub 1 points 1 year ago

Depends on optimization levels, data types, and whatnot. If it's a string to be fed into the API of a different binary then the compiler will often not optimize down that representation. Internal function names are likely to be optimized that way, with lookup tables holding original function names (at least for any externally exposed function).

this post was submitted on 12 Feb 2025
1040 points (100.0% liked)

Microblog Memes

10937 readers
2080 users here now

A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.

Created as an evolution of White People Twitter and other tweet-capture subreddits.

RULES:

  1. Your post must be a screen capture of a microblog-type post that includes the UI of the site it came from, preferably also including the avatar and username of the original poster. Including relevant comments made to the original post is encouraged.
  2. Your post, included comments, or your title/comment should include some kind of commentary or remark on the subject of the screen capture. Your title must include at least one word relevant to your post.
  3. You are encouraged to provide a link back to the source of your screen capture in the body of your post.
  4. Current politics and news are allowed, but discouraged. There MUST be some kind of human commentary/reaction included (either by the original poster or you). Just news articles or headlines will be deleted.
  5. Doctored posts/images and AI are allowed, but discouraged. You MUST indicate this in your post (even if you didn't originally know). If an image is found to be fabricated or edited in any way and it is not properly labeled, it will be deleted.
  6. Absolutely no NSFL content.
  7. Be nice. Don't take anything personally. Take political debates to the appropriate communities. Take personal disagreements & arguments to private messages.
  8. No advertising, brand promotion, or guerrilla marketing.

RELATED COMMUNITIES:

founded 2 years ago
MODERATORS