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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

RPG Maker Autotiles with Tilemap

Discussion in '2D' started by OccularMalice, Dec 1, 2017.

  1. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    167
    Hi guys,

    After watching and playing around with the new Tilemap features I'm pretty sure that you can get 100% RPG Maker type map editing using just the out of the box Tilemap and a script (similar to the Terrain Tile from the extras code).

    Going off of an article on the anatomy of an autotile (http://blog.rpgmakerweb.com/tutorials/anatomy-of-an-autotile/) if you treat a 32x32 tile as really 4 16x16 minitiles you can match things up.

    I'm just not certain how to adapt something like the terrain tile script for something like this. The problem is that an "autotile" from RPG Maker isn't a 32x32 static tile, it's 4 16x16 tile parts that are dynamically assembled depending on neighbors. So I think the terrain tile is close but needs that last bit to be able to pick the 4 parts of the tile based on neighbors in order to render. Like I said I'm still trying to figure out how to adapt what the linked article calls a minitile to Unity's Tile object.

    If anyone has already done this using the Tilemap system (there are some great 3rd party assets like CreativeSpore's RPG Map Editor that do this) then I'd like to get a copy of the code. Like I said I'm pretty sure the terrain tile from the 2d extras code could be adapted for this, just needs some tweaks and I'm not familiar enough with the tilemap system yet.

    Thanks
     
  2. zhuxianzhi

    zhuxianzhi

    Joined:
    Mar 30, 2015
    Posts:
    121
    Hi guy, is there a solution to share?
    Thanks in advance
     
  3. vsprogramme_unity

    vsprogramme_unity

    Joined:
    Nov 17, 2019
    Posts:
    2