Search Unity

Advanced rule tile options? Combining rules?

Discussion in '2D' started by Marscaleb, Nov 15, 2019.

  1. Marscaleb

    Marscaleb

    Joined:
    Jan 7, 2014
    Posts:
    1,037
    I'm starting to work with the rule tiles for tilemap, and there's a couple things I'm wondering about.

    First of all, is there a way to combine weighted random tiles with the rule tile? So I can paint a tile and have it automatically change to be an edge/corner/side/etc but also have it randomly use some of my variant tiles.
    I'd also be interested in combining other special tiles, like animated tiles with rule tiles.

    Second of all I'm wondering about creating some advanced patterns for rules. I've made some tiles that form larger patterns. Like, instead of having one tile that is 4 units by 4 units, it is actually four tiles that are 2 units by 2 units, positioned together to make the larger 4x4 square. Like this:

    AB
    CD

    Other patterns I've used are things like staggered grids, like:

    ABCD
    CDAB

    or

    ABAB
    BABA

    I'd like to make a rule tile that understands and works with these patterns, so I can have it use edge A or edge B according to its offset within the grid.
    Is there such an option? Nothing I'm looking at seems obviously relevant to this.

    And finally, is there any way I could "freeze" a rule tile sequence I have created and then treat them like regular tiles? So I could paint in all the various shapes I need, and then adjust individual tiles to be something special? In the current form if I try to set a specific tile all the adjacent rule tiles change as if there was nothing in that space. Honestly this makes the rule tile almost useless. If there is any spot anywhere in my map that needs to be different, the whole map can't be made with rule tiles.

    Honestly the ideal workflow would be if I could create a set of rules (like the rule tile, weighted random tiles, pattern, etc) and have it apply to an entire palette, and when I paint simply have an option to follow/ignore those rules. When the rules are being followed, any tile directly adjacent to the one I'm painting will be altered to meet its requirement for those rules. Then if I disable the rule I can paint the tilemap to change individual tiles.
    Altogether, the current workflow is problematic because it makes rules for individual tiles, when it truth the rules need to apply to the brush, and the brush will change tiles according to specified rules when desired.