Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple terrains can't share tiles #1364

Open
BananaIguana opened this issue Sep 21, 2016 · 10 comments

Comments

@BananaIguana
Copy link

commented Sep 21, 2016

In release version 0.17.0 (using a Mac), I defined a terrain 'B' that uses a tile defined in the terrain 'A'. When assigned in B, it cancels the association in the terrain A.

In my use case, I have two terrains defined which use unique corner pieces but share the same edge pieces. Is it possible to update the terrain tool to share tiles between different terrain settings?

@bjorn

This comment has been minimized.

Copy link
Owner

commented Sep 25, 2016

Hmm, this is not possible currently and I don't see a nice way to add it. You would just have to duplicate the shared tiles.

@omnipoof

This comment has been minimized.

Copy link

commented May 26, 2019

I'll second this issue since I ran into it in my project. Having a duplicate tile doesn't solve the issue in my scenario. I have grass, dirt, path, and water tiles and have three terrains for grass/dirt, grass/path, and grass/water. I've filled in a layer with grass and then use the terrains to draw in the dirt, path, and water sections. If I duplicated the grass tile, it makes the grass area filled with one or the other grass tiles which can interfere with the other terrains.

My workaround is to switch back to the tilemap when I'm going to use one of those terrains and associate the grass tile with whatever terrain I'm wanting to use.

@bjorn

This comment has been minimized.

Copy link
Owner

commented May 28, 2019

I have grass, dirt, path, and water tiles and have three terrains for grass/dirt, grass/path, and grass/water.

It sounds like you should have 4 terrains: grass, dirt, path, and water. Why have terrains for transitions?

@omnipoof

This comment has been minimized.

Copy link

commented May 28, 2019

Sorry, I miscommunicated that; I have six terrains and thus three pairs of terrains that work together to form a dirt area, path area, and water area on top of a grass area. For example, the grass/water terrain pair is set up as follows:

  • Grass-to-Water Terrain: Solid grass tile, grass/water tiles (grass side)
  • Water-to-Grass Terrain: Solid water tile, grass/water tiles (water side)

Because the grass terrain of each terrain pair requires the solid grass tile in addition to the grass/X tiles, it means that three of my terrains are dependent on the same tile (i.e. all four corners added to the terrain). Since Tiled currently limits each corner of a tile to only belong to a single terrain, it means I need to re-add the solid grass tile to the particular grass terrain I need to use each time.

@bjorn

This comment has been minimized.

Copy link
Owner

commented May 29, 2019

@omnipoof I still don't understand the problem. You should only have one "grass" terrain, right? So why would you need to assign different terrains to your solid grass tile? Maybe showing an image would help?

@omnipoof

This comment has been minimized.

Copy link

commented May 30, 2019

Sure, here are some screenshots of my terrains:

The Grass-to-Dirt Terrain:
image

The Dirt-to-Grass Terrain:
image

The Grass-to-Path Terrain:
image

The Path-to-Grass Terrain:
image

I defined the Grass-to-Dirt and Dirt-to-Grass terrains first, then defined the Grass-to-Path and Path-to-Grass terrains second. Notice that the Grass-to-Dirt and Dirt-to-Grass terrains do not have the solid grass tile and solid dirt tile on the middle left of the tilemap like the Grass-to-Path and Path-to-Grass terrains do. This is because since the Grass-to-Path and Path-to-Grass terrains were defined second, their use of the solid grass tile and solid dirt tile overrode the definition in the previous two terrains. What would be great to have is the ability to include the solid grass tile and solid dirt tile in multiple terrains at once.

Thanks for your help!

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jun 1, 2019

@omnipoof I still do not understand why you have a "Grass-to-Dirt" terrain. In the documentation I wrote about using the Terrain Tool, you'll see that there should be a terrain type for each terrain, not for each transition. If you would have Grass, Dirt and Path terrains, then it should also be clear that the solid grass tile can't be marked anyway else than with just the Grass terrain.

Now, I'm not sure if your tiles are actually compatible with the way the terrain tool works. The terrain tool requires that each tile has a well-defined terrain type at each of its corners, and that the transition between these terrain types happens between the corners. I don't really see this being the case in your tileset. I also do not understand how the ability to share a solid grass tile would make this scenario work.

@omnipoof

This comment has been minimized.

Copy link

commented Jun 14, 2019

Thanks for the advice! I went back and recreated the terrains based on each being unique and covering all of the appropriate edges with other terrains:

image

There still is a scenario where multiple terrains should be able to share tiles, though. In the image above, the upper left and upper right have tiles that contain both grass and dirt, but the transition those tiles represent are different (I consider the upper left one my path tiles because of the defined edges between grass and dirt and the upper right one my dirt tiles because it's a rougher/"grassier" transition). In this case, I would want a solid dirt tile in both terrains but when I select the "path" terrain it draws the more defined edges between grass and dirt and when I select the "dirt" terrain it draws the rougher edges between grass and dirt. Would this be possible?

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jun 29, 2019

In this case, I would want a solid dirt tile in both terrains but when I select the "path" terrain it draws the more defined edges between grass and dirt and when I select the "dirt" terrain it draws the rougher edges between grass and dirt. Would this be possible?

It's not possible because Tiled does not store terrain information on the map. The tool derives from the tiles that are placed the terrain at each location, which would not be possible if a tile is shared between multiple terrains.

I think with the current system we don't get around to duplicating the tile in this case.

With the Wang tiles system it would be possible, because each Wang set can reuse any tiles that are also part of another Wang set, and there's not the above problem because you use only one Wang set at a time. Unfortunately the Wang Brush still needs some work to be broadly usable.

@omnipoof

This comment has been minimized.

Copy link

commented Jul 8, 2019

Ok, that makes sense. I guess this issue can just be left open in case it ever becomes a bigger priority to implement. I have sufficient workarounds right now to do what I need to do, so this isn't blocking. Thanks for your help investigating if this is a possibility!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.