PC A question regarding destruction

4sheetzngeegles

Well-known member
@faatal or anyone that may have the answer would be welcomed.

Does destruction, meaning felled trees, punched plants, destroyed blocks, add or decrease the cache size in the save?

Logical instant answer is decrease, but, i'm not so sure. Each model or block has a certain amount of memory allocated

for it so does the garbage collector or another monitor remove it periodically or does it stay the same or only increase

as you build?

I'm curious because of some modifications I have done, and because it seems that if there are only additions it could become

a memory regulator for limited console memory, or lower ram limits.

 
My understanding is that any change to the map will increase the save because it has to track all those changes since your world itself stays the same.

 
Thanks for the reply.

I did a mod for grass destruction, prior and it would glitch out after a certain amount of activity.

It answers my main question.

It would be nice if it lowered the overhead since there would be less in the world.

an example

In a cityscape chunk  of 40X40 if there are 4 buildings and random visual objects cataloged, and a player or players remove all blocks and objects

the only thing left is air blocks, and terrain. So does that also mean that even though you kill the entities their info is perpetual also. If not then if this

could be tied to garbage and removal of artifacts it might help with cpu\gpu load and memory management. sort of like the older format of individual files per

square division. Since airblocks are non interactive they could be set to null or 0 yes or no.

It also explains a few posts I read, about ghost buildings in the distance. If a scanner were set to the most recent active chunks, or most active it could

possibly lower load and increase performance in those areas. Or am I thinking incorrectly?

 
decrease the cache size in the save?
You're talking of a lot of things at once; file size, memory, cpu & gpu ... these are all differently affected by things.

Save files are essentially delta files; the world exists separately, and whatever you change in the world gets recorded in save files. The smallest file size is when you've not touched anything in the world. Save size makes very little difference in your game; it'll take a moment to load when entering a chunk, but that's it.

If you want to save on drawing load, you'll remove anything that can cause a shadow or a reflection  ... or drop your resolution.

If you want to save CPU on AI pathing, you remove everything the zeds can destroy, having flat terrain only so the AI routine runs the smoothest...

If you want to save memory, you remove all non-terrain blocks (or all blocks above bedrock, but I think terrain is "simplified" to only exist as the top layer) ..

Not that any of those are "actually good advice", just examples of different effects. For most optimizations "less is more" will always work, but you want stuff in your game. I just don't know what you're looking for..? :)

"Ghost buildings" .. the world outside of your loaded chunk is merely an automatically generated simple 3D image. If you delete a building, but don't update the image, the building will remain in the image, showing up in the world until you load the chunk with the building, replacing the image with the "reality". Updating the image is somewhat expensive, so I think the updating is off by default, except for land claim areas.

 
Thanks for the reply.

I did a mod for grass destruction, prior and it would glitch out after a certain amount of activity.

It answers my main question.
I don't know this for certain, but I have a feeling grass or other biome decorations are different.  Those are not part of your actual map unless they are part of a POI or tile.  So I think removing those would actually reduce the save size until a chunk is reloaded and they are regenerated.

 
Think of it this way. The map was created with every object/material instanced. Once you remove that object instance, it has to insert a value to indicate a change from the OG map creation was made. The more changes you make.

A POI might have a very small value if it is a preset referenced elsewhere, but the moment you destroy part of that POI, the reference has to be modified. Ie the reference gets larger to account for the changes. The more references it has to log to ensure all players experience the same game world, the larger it will become.

 
Last edited by a moderator:
I'm blessed with all of your responses. Thank You. It cleared it up for me. My original thought was of a database, or more simply a ledger

sheet, that calculated xyz of all existing blocks. So I thought that a rescan would show less blocks thus less to load. But it's more like a

voice activated recorder that never turns off until the chip is full. I don't have my game to regen anything, basically there is more than

enough to find to keep me occupied until I start a new play through. I also disabled trees and plant, 4 stage growth, and removed seed drops.

My grass is scaled to 2 meters for the tall grass, so I can't see what's coming. I also had set tall grass to be destroyed when walked on so running

through it, and entities doing the same, made it feel a little more creepy, walking on grass and dirt does not affect heat, walking on gravel paths and streets

does. I added and lowered the light parameter for trees and grass, to coincide with stealth. If you stand by a big tree  and position it between you

and the sun it lowers the light level, artificially making it a place to hide when being chased.

Either way thank you all. I will still keep modding.

 
I'm blessed with all of your responses. Thank You. It cleared it up for me. My original thought was of a database, or more simply a ledger

sheet, that calculated xyz of all existing blocks. So I thought that a rescan would show less blocks thus less to load. But it's more like a

voice activated recorder that never turns off until the chip is full.
Nope.  As mentioned above, it's basically a delta file.  That means that it shows changes to the world and not the entire world.  Otherwise, the save would be the size of the world... at least initially.  That wouldn't be a good thing.  Instead, it works kind of in reverse.... it starts small and grows as you make changes, including adding or removing blocks.  Every change gets added to the save and then the game compares the original map with the changes and that determines what the save game map looks like.  The only things that may be a little different, as I mentioned, are decorations.  Since those are created when you start a new game and updated/randomized when resetting a chunk, rather than being part of the world itself, those are probably all added to the save file and then as you destroy them, your save gets smaller as it doesn't need to track decorations that aren't there anymore.  But that's just my guess.

 
Last edited by a moderator:
Back
Top