Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Tile maps

Discussion in '2D' started by PHOENIX33201, Aug 30, 2023.

  1. PHOENIX33201

    PHOENIX33201

    Joined:
    Apr 16, 2022
    Posts:
    6
    I have few questions about tile maps.

    I already know that i can create rule based tiles to make the job easier, but it can have just three rules (adjecent tile has to be there, cant be there, or I dont care) but imagine tileset containing land and water. I dont want land and water to be directly adjecent to each other I want to put some half land half water tile in between to make it transition seamlessly. Can I make rules like that?

    Can I somehow tell apart for example land and water, so player would not be able to fall into water or do i have to manually set triggers / hitboxes?

    Can i modify the tiles with some scripts as game continues?

    Can I make animated tiles?
    Or even somehow synchronize animation of the tile when player tries swimming?
     
  2. AngryProgrammer

    AngryProgrammer

    Joined:
    Jun 4, 2019
    Posts:
    435
    1. Don't put all tiles on one tilemap.
    2. Add tilemap water so you can animate it later on, you have the proper components for that task.
    3. Add tilemap land so you can use tile rules, so all outside tiles will look like the border between water and land (something like an island).
    4. Add another tilemap for hills with the same rules as above, but you get a border between land and land.
    5. Repeat how many times you need to add the next layers.