How can I save the data of a really big world without having to wait along time?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jujumumu

So I have a world that is 5000 blocks by 1500 blocks which is a total of 7500000 blocks(a lot of blocks). My first idea was that when I wanted to save the game I would go through each of the 7500000 blocks and save it to a list which did not work for obvious reasons. My second idea is whenever I destroy or build a block it will update the data so when I exit it will already be saved. Is this a good idea? Or is there a better solution? I also need to define the data at the start so I need a list with 7500000 terms that are all -1. How can I do that??

:bust_in_silhouette: Reply From: rami-slicer

If it is generated from a seed, try only saving the blocks that are destroyed or placed by the player, and the seed.
Then when you reload the world just regenerate the world using the seed, delete the destroyed blocks, and add the placed ones.

What do you mean by seed?

jujumumu | 2019-09-22 15:49

A seed would only be relevant if you’re randomly generating your world. Is that what you’re doing? If you use the same seed, it’ll create the same random world every time, hence saving the seed instead of every tile to lower save time.

epark009 | 2019-09-22 18:00

I plan on generating the world with a seed but doing that every time I load the world will take some time(estimate time is about 30-45 seconds) and then saving all the edits would also take time. My solution is to just update the world data every time you edit it.

jujumumu | 2019-09-22 21:30