I’ve been using Tiled for a few months now while I prototype my game in HaxeFlixel, and I love it! My game has a Metroid-type feel to it, so the collidable tiles form sort of “blobs”. The terrain tool works great, but is not flexible enough for the type of look I’m going for. For instance, I can’t have 1-tile-high or 1-tile-wide terrain. Since I’m not using the outside edges for transitions, all of the edges are baked into the different tiles.
Here is an example of that uses 47 tiles, to account for inside corners as well. Basically I would like to set a tile of a certain type, and then it would look to see what adjacent tiles are set to that type, and then lookup which tile image to use for the tile I just set and any adjacent tiles.
I’m sure I could set this up painstakingly using the auto-tile feature, but I wanted to see if anyone else has had any luck using Tiled? It seems like a simple enough use case that I’m surprised this isn’t possible.
Maybe I have missed an obvious solution. Of course I can do this in-game, but I’d like to have it happen in the editor so I can see what it looks like at design time.
Using the sides instead of the corners (or even both in combination) is an extension to the terrain tool that would certainly make sense, but indeed it hasn’t been implemented yet.
Here I’ve tried to shift the tile graphics in the example you referred to, to make it work with a corner-based selection rather than a side-based selection, but you’ll notice that I had to change some corner graphics slightly. This is because either approach misses support for certain situations.
Original side-based method
Attempt at adjusting the tiles to work with Tiled’s corner-based terrain tool
Anyway, i totally agree both approaches should be supported in Tiled, as well as being able to combine them for even more variations (up to 256 in this case, though you’d generally only use a subset then). You’re referring also to an example with 47 tiles, but I can’t see it. Did something go wrong there?
If you want to increase the chance that I may get around to implementing this, please consider supporting me on Patreon, even if it’s just a little bit.
Thanks for the reply! I will absolutely support Tiled on Patreon. Regardless of whether this feature gets added, it’s invaluable to me at this point, even though my game is in its infancy. It lets me visualize things and prototype level designs very efficiently.
Oh, it looks like I forgot to paste the link to the example with the 47 types of tiles.
This shows the different combinations formed based on whether the 8 adjacent tiles are the same type. However, I think the 0 in this example should be an island with coasts on all sides, not water.
And thanks for the example! I agree that that would work visually, but it would mess up the collision system since I’m doing collisions based on tiles. Will there be support for 3rd party plugins or scripting via Lua? This kind of thing might be a good use case.
I think the algorithm for re-mapping the tiles is fairly simple, so I will consider doing this in my level loading code for now.
Regarding the tile collisions, you would just need to shift your collision tile layer by half the tile size to have it align properly again.
I’d certainly like to add scripting support for automating operations or implementing custom tools, but it’s also something I will need quite a bit of time for.
I believe it being just water is correct. The idea behind this set is that it is based on a 2D binary input field, where apparently 0 means water and 1 means land. And when you apply this binary system on it it will generate thin brown stretches of land for narrow 1-tile wide lines and when some land cells are adjacent it will create the grassy looking fill.
So when that tile would be a small island with coast on all sides, you’d never get a large area of water but rather a grid of small islands.