Finding the changes between several Heightmaps.

Started by
2 comments, last by Tangletail 8 years, 2 months ago

This has been racking my brain, and jammed me up pretty good.

Starting with a base Heightmap for terrain, I have some number of other heightmaps derived from that one. They might even be some arbitrary piece of the old one that has changed, instead of being the entire map.

The idea is that the engine when loading up mod packages, will load up the landmass edits, and apply them.

So... I got one part of the pie working just fine. If the changed landmass is only a piece of the world, and no other changes has been made to it by other files, it will load in just fine.

The next part is what happens when two different edits has been made in the same tile? The way the engine is currently handling things... the last thing loaded in takes effect. So buildings and junk are now under ground... or floating above ground?

How would you go about blending that?

Or... am I just being stupid and making this more complicated than it has to be? In retrospect I am starting to wonder if I should just use a decal system...

Advertisement
Merge conflict.



This has to be resolved the same way any complex data gets resolved: with human decision making. Accept one version over another, or reject them all, or whatever; but someone has to intelligently make that call for each situation that arises. No amount of software magic has yet proven capable of reliably merging arbitrary data of this nature.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

If you mark the altered region of the modded heightmaps with a rectangle stored in the mod, you could keep track of altered regions and if a mod wants to alter a region already altered (rect->rect collision) you could display an error message ("warning: this might cause inconsistencies" or something), ask user to select which mod will take affect or whatever suits your engine best :)

I can't help thinking about Bethesda's Gamebryo engine, where the order of mods is very important (gamers often use https://boss-developers.github.io/ to solve those conflicts for them)..

.:vinterberg:.

True enough. Thanks both of you!

This topic is closed to new replies.

Advertisement