186
submitted 1 year ago* (last edited 1 year ago) by Goronmon@lemmy.world to c/games@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] FeelzGoodMan420@eviltoast.org 19 points 1 year ago* (last edited 1 year ago)

A heavily modded Skyrim/FO4 save with hundreds of hours on it can easily go above 200mb.

[-] smeg@feddit.uk 13 points 1 year ago

That's insane, what's making up all that data?

[-] Daxtron2@startrek.website 19 points 1 year ago

Poor optimization of save files probably

[-] smeg@feddit.uk 3 points 1 year ago

Must be, if there's no real limit then why would they bother?

[-] FeelzGoodMan420@eviltoast.org 15 points 1 year ago

Most games never hit anywhere near that, but some large open world rpgs like Skyrim track the location of every single object in the game world. Like you can drop a piece of cheese on the bottom left corner of the map, come back 500 hours later, and it'll still be there. now imagine all of the objects you're buying and selling and manipulating over those hundreds of hours. Now add in a shit ton of script mods and other stuff that may add even more objects. And add in all of the quest data and interaction data that gets saved etc etc, and your save file can easily hit multiple gigabytes, with each file approaching 200mb.

[-] smeg@feddit.uk 7 points 1 year ago

It still feels like it should be orders of magnitude less. For example, if each piece of cheese has an ID number that maps to cheese, an ID for what area it's in, three coordinates for where exactly it is, and maybe a few more variables like how much of it you've eaten. Each of those variables is probably only a couple of bytes, so each item is probably only 20B or so, which means that even if you interacted with a million different items and there was no compression going on then that's still only 20MB of save data.

[-] vithigar@lemmy.ca 14 points 1 year ago

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.

[-] addie@feddit.uk 9 points 1 year ago

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@lemmy.world 3 points 1 year ago

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

[-] smeg@feddit.uk 2 points 1 year ago

That's excusable in My First Game™ but surely professional AAAAA game would never cut corners and code something so lazily, eh?

[-] vithigar@lemmy.ca 5 points 1 year ago

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.

[-] smeg@feddit.uk 1 points 1 year ago
[-] cactusupyourbutt@lemmy.world 1 points 1 year ago

looking at you x3

and rimworld

[-] tehevilone@lemmy.world 9 points 1 year ago

Save bloat is more often related to excess values not being properly discarded by the engine, if I remember right. So it's not that the objects themselves take up a lot of space, but the leftover data gets baked into the save and can end up multiplying if the same scripts/references/functions get called frequently.

It was a lot worse with Skyrim's original engine, and got better in Fallout 4 and Skyrim SE. The worst bloat happens with heavy modlists, of course, as they're most likely to have poor data management in some mod.

[-] smeg@feddit.uk 3 points 1 year ago

Aha, so unexpectedly it's bad/inefficient code that's ultimately to blame

[-] iegod@lemm.ee 4 points 1 year ago

I wouldn't say bad, but inefficient might be fair. Unoptimized I think is more representative.

[-] tehevilone@lemmy.world 3 points 1 year ago

Inefficient/unoptimized would be an accurate description. I think it's important to add, for bethsoft games specifically, that the save includes all changes to objects, even if the player themselves didn't interact with them(e.g. Physics interactions, explosions moving things, npcs bumping stuff around), and also includes all NPC changes. Master files(ESMs) get loaded, then the save loads the changes it has baked in to the databases. So, when you load up a save that has traveled the world and loaded a lot of things into save memory, the engine has to sit there and reconcile all the changes with the ESMs, which can add up quick if you're playing modded.

[-] wax@feddit.nu 5 points 1 year ago

Each object also needs the orientation, possibly also velocity and angular rates.

[-] smeg@feddit.uk 1 points 1 year ago

Yeah that's why I rounded up a bit. But even if there's triple the amount of cheese data then a million cheeses is still only 60MB

[-] Kolanaki@yiffit.net 2 points 1 year ago
[-] smeg@feddit.uk 2 points 1 year ago

Of course! But wouldn't it save space if these variables used zeroes instead of ones?

[-] Kolanaki@yiffit.net 1 points 1 year ago

They would remain 0 until flipped. They did say heavily modded, so like if you added more quests to the game, these all need some way of knowing what legs have been completed. The more modded quests completed, the bigger the save. And that's just for one thing that a save would keep track of.

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

Games

39537 readers
798 users here now

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

Rules

1. Submissions have to be related to games

Video games, tabletop, or otherwise. Posts not related to games will be deleted.

This community is focused on games, of all kinds. Any news item or discussion should be related to gaming in some way.

2. No bigotry or harassment, be civil

No bigotry, hardline stance. Try not to get too heated when entering into a discussion or debate.

We are here to talk and discuss about one of our passions, not fight or be exposed to hate. Posts or responses that are hateful will be deleted to keep the atmosphere good. If repeatedly violated, not only will the comment be deleted but a ban will be handed out as well. We judge each case individually.

3. No excessive self-promotion

Try to keep it to 10% self-promotion / 90% other stuff in your post history.

This is to prevent people from posting for the sole purpose of promoting their own website or social media account.

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

This community is mostly for discussion and news. Remember to search for the thing you're submitting before posting to see if it's already been posted.

We want to keep the quality of posts high. Therefore, memes, funny videos, low-effort posts and reposts are not allowed. We prohibit giveaways because we cannot be sure that the person holding the giveaway will actually do what they promise.

5. Mark Spoilers and NSFW

Make sure to mark your stuff or it may be removed.

No one wants to be spoiled. Therefore, always mark spoilers. Similarly mark NSFW, in case anyone is browsing in a public space or at work.

6. No linking to piracy

Don't share it here, there are other places to find it. Discussion of piracy is fine.

We don't want us moderators or the admins of lemmy.world to get in trouble for linking to piracy. Therefore, any link to piracy will be removed. Discussion of it is of course allowed.

Authorized Regular Threads

Related communities

PM a mod to add your own

Video games

Generic

Help and suggestions

By platform

By type

By games

Language specific

founded 2 years ago
MODERATORS