Issues with terrain tool when using 9 tiles

I am making a platformer and want to use tiled to make the levels. I have a 3x3 tile sheet for my platforms

When I go into the Terrains I configure the terrain how I think I should based on a couple tutorials

image

But when I actually try and use the terrain brush it does not behave as expected. It works perfectly fine making straight horizontal or vertical lines but breaks when making complex shapes

The expected outcome that I hand did after would look like this:

Is there something I need to change and configure differently?

Your terrain is incomplete because you’re missing the inside corners, so the tool tries to work around that omission when you create scenarios that require those tiles, and gives you incorrect results.
You’d need to make inside corner tiles, even if they’re just duplicates of the solid dark purple tile.

Another possibility is to set up automapping rules where you paint using the solid tile and it automatically adds the edges for you. It would be more work to set up than terrains (especially if you want to use automapping while drawing, rather than executing it once manually after you’ve drawn your shape), but it would avoid the need for extra tiles.

Edit: I’m pretty sure the tileset you’re using (https://aamatniekss.itch.io/lava-caves-tileset ?) has inside corners and more built in already, make sure you mark those with your terrain too!

2 Likes

Yes this is an example using that tileset this was just the one I was working with at the time, others I have do do not have inside corners, and the principal applies. Quick example of some stone pillars Since they are not natural they would not have inner corners.

image

It seems like it would make sense that as you mentioned, if the rule isn’t found it would include the center tile. The other issue with copying the center tile in this case would that it would prevent flood filling of the center as technically the inside corners would be different tiles so you’d have to manually change update the inner corners after the center.

I do wonder if it’d be “easier” to instead of drawing the shape, assign the role of the tile more similar to how like wang tiles work, but while being able to mark a single tile as “this is both a corner and inside corner” or something.

image

This would also allow for a couple new tiles that I don’t think are possible right now such as integrating a 1x1 tile into the terrain brush so the terrain doesn’t have to be minimum 2x2 to work. I do get that you could always just switch to a tile brush, but this would make the workflow for terrain a bit faster if configured this way.

Similarly this would enable single tall or single wide tiles.

image

Anyway, thanks for the help that makes some sense now, for now I can just use a copy of the inside for ones that it doesn’t work for.

Being able to assign multiple “roles” to a single tile is something I’ve asked for before, but it doesn’t seem likely since it makes the logic for placing tiles much more complicated, due to the fact that on the map itself, these roles aren’t stored. For what you want, automapping’s the only way I think, as with automapping you can specifically deal with the ambiguous scenarios that arise and make assumptions that Tiled’s tools can’t.

1 Like