[SOLVED] Issues with Layered Tiling

Discussion in 'Programming' started by Stewart Evans, Jun 27, 2019.

  1. Stewart Evans

    Stewart Evans Member

    Joined:
    Nov 27, 2018
    Posts:
    25
    So I'm attempting to have a multi-layer map for a TBS game that draws terrain, then draws opaque tiles over it so that the individual squares are visible. So that the black edges of the squares are visible but not the tile itself, I changed the color of the tile from gray to transparent. When the code runs to color the transparent tiles, however, the tiles remain transparent. I've gone back to making the tiles gray so that they color properly, but even when turning the opacity way down the terrain looks very washed. What could I do to resolve this issue?
     
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,901
    Could you post some screenshots of the issue and maybe the code that you are using? I'm having a hard time visualising exactly what you describe...
     
  3. Stewart Evans

    Stewart Evans Member

    Joined:
    Nov 27, 2018
    Posts:
    25
    Yeah, here's shots of what I'm doing to mitigate things as much as possible now:
    [​IMG]

    [​IMG]

    And here's what happens when I have the alpha set to 0 of the tiles. This is what I would like the color of my landscape to look like.
    [​IMG]

    And this is the what the map looks like if it's just the tiles without the landscape.
    [​IMG]

    [​IMG]

    And finally, this is what it looks like if I have the body of the tiles set to transparent rather than white
    [​IMG]

    So what I would like to do is have the tiles change color when I select a character to display their movement, but to have that system be visible I have to make a layer with that data stored in it seperate from the landscape (since it is a lot easier to just paint over it with landscape tiles). When I leave it as is with the alpha turned down, the map looks faded. If I make the tiles have a transparent body, the map looks correct but then the color of the range will not display because it can't blend transparent with the colors the range tiles need to display. I understand why this won't work at the moment, but I also don't know what I need to do to work around this so I can have my desired result of having the tiles be colored normally while still being able to display the range of the selected character.
     
    Last edited by a moderator: Jul 3, 2019
  4. Stewart Evans

    Stewart Evans Member

    Joined:
    Nov 27, 2018
    Posts:
    25
    A potential solution I've thought of is to make the tile outlines separate sprites from the tile bodies and change the alpha of the colored tiles every time I select a unit to display their range, but it seems a bit inefficient to be doubling up on sprites like that and also still bleaches the color of the tiles slightly.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice