Search Unity

Tilemap(s) Best practices

Discussion in '2D' started by ccioanca, Mar 21, 2019.

  1. ccioanca

    ccioanca

    Joined:
    Nov 12, 2018
    Posts:
    4
    The Problem & Idea:

    I'm using the tilemap system in unity (2D), and its been working great, but I have a few concerns regarding my particular usage. What I'd like to have is multiple "battle maps" that will get instantiated when the battle scene is switched to. My current idea is to just make each type of battle map a prefab (prefab on the grid, since the tilemaps are just layers), and then instantiate the grid when the scene loads in.

    Is this best practice or is there any better way? Does having 10 maps vs 200 maps make a difference?

    Other Things I've Considered:

    Would it be a better idea to make one huge tilemap with all of the battle maps drawn a distance away from each other and just restrict the camera to moving only within the "current" battle map? The absolute max size i could see a map being is, let's say 30x20 tops, probably closer to half that though.

    An earlier idea was to use small pixel map images to render the maps in. This was before I found out about Unity's tilemap system, which, admittedly, I'd rather use because its so much simpler to visualize, and less work to develop.

    The Scenario:

    For simplicity's sake, lets assume the game has 2 scenes, a main menu, and a battle scene. Basically the idea is to enter the battle scene and have a random battle map be spawned out of what's available. The character(s) get placed, and any additionals also get placed, say, items, or what have you.



    Is what I proposed above best practice? And should I consider any other other two systems I've also described? Or is there something I'm not thinking of that would be even better?

    I don't believe that any of the above ways wouldnt work, I'm just curious if any of them are the best way to go about doing this.