Terrain incomplete warning and default tile

I’ve been playing with the terrain tool for a while now. Much confusing behavihour turned out to not be bugs, but the terrain definition not being complete. My fault, I know, but it’s kind of frustrating double checking every terrain again and again.

Thus my suggestion:
Could you please mark a terrain as complete when every corner combination is defined at least once?

What I mean is that for painting every possible map with one terrain, you need at least…

  1. every surrounding tile has same terrain
    2-5. one corner connects to different terrain (for every corner)
    6-9. the tile next to this one has different terrain (up, down, left, right)
    10-11. the diagonal tiles are of same terrain (upper left to lower right, lower left to upper right)
    12-15. only one corner connects to the same terrain (for every corner)
  2. no surrounding tile has the same terrain (how do I even define this?)

(Please correct me if I missed combinations. But as 4² is 16, I should have them all.)

So when all 16 combinations exist at least once, the terrain is complete and it would help if it was marked as such.

When using an incomplete terrain, it would help when as default tile, the preview picture is used.

That way, assuming no major screw-up, you can easily see what tile has which terrain and what combinations are missing.
(Updating the terrain tiles after aditing the terrains would be the next helpful feature, but that’s really just a nice-to-have for me)


Discussion on terrains and possible combinations is here: Neighbour aware tiles without terrain tool
Basically there are 81 possibilities, but only 48 are supposed to make sense. There is no way to define them, though. Implementing that is another suggestion. Don’t save the terrain information in the corners, but on the entire tile. The 8 neighbours will tell you what picture to use.

One problem here is that there is no clear definition of what is “complete”, especially when more than two terrain types are used. For example if you have 5 terrain types, the complete set could be 5^4 = 625 tiles. Whether you really need that many depends on which combinations you actually want to use, but Tiled can’t know this unless it would somehow analyze all the different combinations made with the terrains.

Now, of course there could be some basic completeness check that disregards what combinations are made with other terrains, but that would not avoid a lot of problem scenarios once you try to use the terrain.

My idea is rather to try and improve the Terrain Brush itself, so that it will try to find the smallest area to change, and for it to give up when this area grows too large.

I’m not sure that actually works (even though I wrote this as well in the thread you linked). When using a blob tileset, you need to use a higher resolution grid to decide which blob tile to choose. Just look at the small blue areas for example, there’s no way to determine whether to show that there or not based on the 8 neighbors.

Man, this is complicated :thinking:

My intuitive definition of “complete” would be “if there is one combination of terrains, all possible combinations of the involved terrains are supposed to exist”. But I see your point, there is no universal rule.

You’re right, the little blue dots wouldn’t be possible with what I suggested… I wasn’t expecting the terrain tool to be able to do this automatically. Usually I only want to quickly define the rough shape of my terrains, then fine-tuning it manually by inserting “edge islands” like that. The terrain tool goes the other way around: I can only assign the terrain to the edges. So for me, usage is a little counter-intuitive.
But there is a way to allow both ways of thinking. What if you divided one tile in 9 parts instead of 4? The four corners, the four edges and the center. That would allow you to define all possible combinations and draw them to the field.

Yes, but the problem with that is that it creates way too many possibilities. Hence the blob pattern that reduces it to a meaningful subset of 47 tiles. For such blobs, a special tool could be written that allows you to either paint or erase the blob, but it will probably need to work on a more detailed grid, yet somehow deal with the fact that not all combinations are possible.