sbrl / Minetest-WorldEditAdditions

Extra tools and commands to extend WorldEdit for Minetest
https://worldeditadditions.mooncarrot.space/
Mozilla Public License 2.0
16 stars 3 forks source link

World diffs #110

Open VorTechnix opened 1 month ago

VorTechnix commented 1 month ago

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.

sbrl commented 1 month ago

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.