I'm using TilEd (https://mapeditor.org) to make maps, and so far have used the programs Terrain feature to create water/paths etc no problem.

I'm trying to create trees now, and I've been at it a whole day and cannot figure out what I'm doing wrong. Have tried countless variations of sizes but here's what i'm currently using:


enter image description here

Now here's the terrain setup, types TREES and GRASS enter image description here

Here's what it looks like in the map editor, close, but issues: enter image description here

Any tips on how to define the terrain in TilEd? Or maybe a link to a working trees terrain pattern so I can compare?

  • \$\begingroup\$ It looks like some tiles are incorrectly placed in places they shouldn't. What method are you using to generate the final result? \$\endgroup\$ Feb 12, 2019 at 9:39

2 Answers 2


Tiled's Terrain system appears to use what are called corner tiles.

That means it uses the following rule to identify what tile to place in each slot:

  1. Identify the type of terrain present at each of the four corners of the tile to be placed

  2. Find a tile in the tileset that has exactly this pattern of four corner types.

These rules are sufficient to handle tilesets like this one (from this guide):

Example of Tiled terrain setup

Notice here that each pattern of corners appears exactly once. Reading across the rows, and listing the corner values clockwise from the top-left of the tile:

  1. empty empty dirt empty
  2. empty empty dirt dirt
  3. empty empty empty dirt
  4. dirt dirt empty dirt
  5. dirt dirt dirt empty
  6. empty dirt dirt empty
  7. dirt dirt dirt dirt
  8. dirt empty empty dirt
  9. dirt empty dirt dirt
  10. empty dirt dirt dirt
  11. empty dirt empty empty
  12. dirt dirt empty empty 13 dirt empty empty empty

(You'll notice this forms a binary code we can use to uniquely look up a tile by an integer bitmask - which is how many of these autotiling systems work under the hood)

But that's not the case for the terrain tileset you've authored:

Sample of OP's tileset with two tiles marked

Note that from the perspective of the Tiled program, both these marked tiles have exactly the same corner pattern: grass trees grass grass.

So wherever Tiled sees a tile that needs "grass trees grass grass" it uses one of these, picked arbitrarily (maybe the first or last one it found in its internal ordering), without further deliberation about which tile might fit better.

In this case, you want it to pick the right-hand tile when the tile above it is "trees trees trees grass" and choose the left-hand tile otherwise - but Tiled's terrain system doesn't look further than the current tile's corners to make that selection.

If you want a more global rule to be used in selecting these corners, that will be left up to you.


You're using the wrong tiles. This here enter image description here (the corner) is taken from the "grass" tileset at coordinates (1; 1). Replace it with (4; 3) from the tree tileset.

Same thing with this edge

enter image description here

Don't mix the tilesets up. Use the tree tileset when you're creating a forest and the grass tileset, when you're creating an opening in it.

  • \$\begingroup\$ Yeah I'm not sure how to define the TERRAIN in TilEd program to make it do that. I can do it manually, but the point of the programs terrain feature is for it to handle all this :/ \$\endgroup\$ Feb 12, 2019 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .