mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.18k stars 1.76k forks source link

Compare map file changes #2694

Open Arcanorum opened 4 years ago

Arcanorum commented 4 years ago

I know this is a long shot, but is there a way to easily see a diff between 2 versions of a map data file (like what has been added, removed, or properties changed)?

I have an open source game that has one particularly big map that I am hesitant to let players make changes to and to accept those changes with their modified map file, as it is so easy for something malicious to be snuck in as I can't go and check every location/object/layer etc.

bjorn commented 4 years ago

Hmm, @stefanbeller once wrote a diff tool for Tiled maps. It only works for tile layers and it hasn't been developed since 7-8 years, but it's available on the following branches:

https://github.com/stefanbeller/tiled/tree/difftool https://github.com/stefanbeller/tiled/tree/difftool2

I think it's quite a big project to ship a polished diff tool, but I can definitely see it being useful, especially in your situation.

Since the main changes that are not visible in a text diff are the changes to the tile layers, maybe you could solve that part by saving both maps as image and using an image diff tool.