Viewing a single comment thread. View all comments

dmootzler t1_iy8wknr wrote

How do player-initiated changes to the world get persisted? Is it just as some kind of diff relative to the generated world?

1

RevaniteAnime t1_iy8z652 wrote

The "chunks" that have been modified in Minecraft get saved to the storage. So, the more you start changing things in a Minecraft world the bigger the save file gets.

9

Shaddaa t1_iy8yuax wrote

Yes that's how it is usually done. Either you simply store any chunk the player made changes to and just load that again, or you only store the changes and apply them after generating the untouched state of the world.

4

[deleted] t1_iy8xwei wrote

[deleted]

−2

dmootzler t1_iy8yp7m wrote

That doesn’t sound right.

Finding the seed that yields a specific world plus a specific set of user changes would require a brute force search of all possible seeds, which is completely infeasible.

Even if you could do it, the encoding would be no more space-efficient than an optimally-compressed diff.

5

Fwahm t1_iy9tegi wrote

No, as there are many world-states that don't correspond to any seeds because not all possible states can be baseline in a seed.

It's more like keeping the title of the story the same, but you also hand them a piece of paper with instructions for them to apply modifications to the story after they finish generating it. "Change John's name to Joe", or "Megan died of influenza instead of pneumonia", for example.

3

Shaddaa t1_iy8zaqq wrote

If I got your analogy than that is not true, not every possible world has an associated seed, there are far more possible worlds than there are possible seeds.

2

[deleted] t1_iy90ag4 wrote

[deleted]

−2

Shaddaa t1_iy90w2d wrote

To me your analogy sounds like changes to the world (=story) are saved by changing the seed (=title) to a seed which generates the changed world. But there is no seed that will generate a world with my oak plank house in it. Maybe I just got your analogy wrong, I believe we both mean a similar thing.

3

dmootzler t1_iy9azry wrote

Ahh I think you misunderstood my original question. I wasn’t asking about how user-specified seeds are handled.

What I meant was, when I mine/build/craft, altering the state of the world, how is that new world state persisted (since the results of my actions would not be present in the procedurally generated chunk)?

2