Loading and Saving

Home --> Programming Projects --> Fractal Block Engine --> Loading and Saving
When changes are made to a chunk, the changes are stored in what is called a chunk changes object (or CC object for short). When the chunk is despawned, we will still hold onto the associated CC object. We only remove the CC object when we either save or all changes in the CC object are no longer relevant. Every change to the world will "revert" in a certain amount of time. Indeed, "permanent" changes to the world actually only last 100 thousand hours.

CC objects are saved to a database when we save the game. Each CC object is stored in what we call a chunk file.

As we explore the world and generate new chunks, we query the database for chunk files (which we then turn into CC objects which are used to generate the chunks). As we continually load the game when the player explores, the CC object changes are applied after procedural world generation of each chunk.

Chunk File Names How we determine the name of a chunk file.