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

Hello, I am having a similar problem to the OP, however no solutions are working for me as mentioned here or in similar posts or documentation. I seem to have a fundamental misunderstanding of terrain tiles and if in fact they can/should be utilized for platformer style levels.

  1. Do tiles on the tileset bitmap need to be arranged in a specific way?
  2. Is “Corner” the correct type for this in the Terrain Set?
  3. In a top-down map example and in documentation, two kinds of terrain are seen (sand, grass, etc). Are two terrains still required when there is no transition to another tile type?
  4. Is terrain mode simply not ideal for creating platformer style levels in Tiled?


  1. No, the tiles don’t need to be arranged in any particular way in the tileset image.
  2. Yes, this should be a Corner tileset, and it looks like you labelled it correctly. The results you’ve gotten make no sense at all.
  3. No, you can have just a single terrain that transition to empty, like you have.
  4. Terrains can’t handle slopes well, but blocky, non-sloping platformer ground can work just fine with Terrains. It depends on the tileset. This one seems fine for use with the Terrains tool.

How did you draw that shape? It looks more like you’re just randomizing tiles rather than using the Terrain Brush. Make sure you’re using the Terrain Brush, and selecting the terrain from the Terrain Sets panel.
image
The “terrain fill mode” on the stamp brush is a type of random mode, it is NOT the tool you want to use for this.

I copied your tileset image and made a tileset with it and labelled the tiles exactly as you did, and got correct results with the Terrain Brush:
image
(It just has those extra lines on it because of the terrain labels in your screenshot.)

Okay – I had been confusing the Terrain Brush with the Terrain Fill Mode, and feel quite foolish about it now.

Thank you for your quick and detailed response, this greatly speeds up level creation.


1 Like