Minetest-WorldEditAdditions icon indicating copy to clipboard operation
Minetest-WorldEditAdditions copied to clipboard

World diffs

Open VorTechnix opened this issue 1 year ago • 1 comments

Problem

We need to be able to track changes in worlds for undo functions and replay support.

Solution

Implement a github-like diff system to store block and other state changes sequentially.

Additional context

We should make sure to approach this implementation minimalistically to ensure that the generated files won't bloat too badly.

VorTechnix avatar May 10 '24 16:05 VorTechnix

We're already halfway there to this. We have a changeset file implementation that is halfway there that stores the old and the new version of a given region of the world with run-length encoding. This is the more efficient way to store complex changesets to a given world region. Storing in a sparse format isn't something that's implemented yet, but it can be done later and added on.

Once this is done and we can store a changeset on command, we'll need this commit-like system to wrap the changeset files w/metadata and allow the //undo / //redo commands to work.

sbrl avatar May 10 '24 16:05 sbrl