and even if some idiot put every zombie npc in a database (or if you want to think of it that way), you wouldn’t just delete the rows! the bodies would disappear, so instead you would update that row like (npcState = KIL, bodyLocation = <some coords>) or something. Especially if you wanted to keep player stats
Maybe you would have an array of active enemies in RAM, and when enemies are killed they are removed from that array for example?
In a game like Minecraft for example, you definitely wouldn’t want to store every single dead entity and its location when there can easily be thousands created and destroyed in a single second
Definitely depends on the type of game, but it’s more likely the game stores data about which areas you cleared and then infer that the bodies of any permanently remaining enemy (like bosses) is to be displayed.
Can vary even more for procedurally generated levels. If the set of enemies is fixed and stay in calculated positions in a map generated randomly, then it might store an array or something tracking the enemies.
Procedurelly generated stuff is all about storing the differences from the procedural generation.
So for example minecraft saves don’t store the terrain, they store how it differs (due to player interaction) from the procedurally generated baseline.
(After all, all you need to recreate an untouched procedurally generate world are the bytes of the seed and nothing else)
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
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
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).
There for a minute when Dyson Sphere Program first went into open pre-release, something was wrong with their save file compression, and very quickly people were reporting multiple GB saves.
The opposite actually - rows are dramatically added to a database. In most games save files grow the longer you play.
and even if some idiot put every zombie npc in a database (or if you want to think of it that way), you wouldn’t just delete the rows! the bodies would disappear, so instead you would update that row like (npcState = KIL, bodyLocation = <some coords>) or something. Especially if you wanted to keep player stats
Isnt there this graveyard off map somewhere in Skyrim, where all the bodies get teleported?
Why would that even be necessary? Sounds like one of those “make a guy with a train for a hat and run up and down this hall” moves they like to do
Their code is literally spaghetti
l-… literally?
I wouldn’t be surprised if it is true though. Bethesda games are not exactly winning awards for coding elegance.
If they literally don’t have an object delete option then relying on render distance to make it go away is a ridiculous but simple solution
i can’t speak to that, but it sounds plausible. in that case the body location would be updated to those coordinates
Grab the source here before Bethesda DMCAs it.
npcState = KIL
no
Where was you when
I want the rows deleted. I’m going to market it as the first game with true AI/enemy permadeath. Dibs on the idea!
Maybe you would have an array of active enemies in RAM, and when enemies are killed they are removed from that array for example?
In a game like Minecraft for example, you definitely wouldn’t want to store every single dead entity and its location when there can easily be thousands created and destroyed in a single second
It obviously depends on the game though.
Definitely depends on the type of game, but it’s more likely the game stores data about which areas you cleared and then infer that the bodies of any permanently remaining enemy (like bosses) is to be displayed.
Can vary even more for procedurally generated levels. If the set of enemies is fixed and stay in calculated positions in a map generated randomly, then it might store an array or something tracking the enemies.
Procedurelly generated stuff is all about storing the differences from the procedural generation.
So for example minecraft saves don’t store the terrain, they store how it differs (due to player interaction) from the procedurally generated baseline.
(After all, all you need to recreate an untouched procedurally generate world are the bytes of the seed and nothing else)
*Noita file save on the 7th parallel world intensifies*
Also, it’s an unreasonably fast database. That makes lots of trade-offs that normal ones aren’t willing to do.
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
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
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).
There for a minute when Dyson Sphere Program first went into open pre-release, something was wrong with their save file compression, and very quickly people were reporting multiple GB saves.
Me in the matrix (so irl basically), holding a gun: “Don’t worry, I’m not deleting you!”