- Home /
Tilemap with irregular sprites?
I found many answers on this topic, but none of them solve my problem.
I want to make a 2D turn-based game. I went with pixel art for graphics. The map is supposed to be made of hex tiles. So, I made a sprite of a hex (with visible pixels, so it fits the art style). However, when I started looking for some improvements for the map system, I found out about TileMaps. My initial solution was to instantiate hex tiles and assign them coordinates using arrays, and then calculate their in-game positions based on their coordinates. But everyone recommends using Tilemaps instead of this, as it is presumably more efficient. Can tilemaps be use with irregular sprites? Or is there any other way that I don't know of?
Also, the sprites aren't supposed to rotate, move, or do anything besides being there, and maybe changing some variables or their color. The map is supposed to be random, but only when it comes to variables like type of terrain, or bonuses etc. And I think this can be done with my initial option - instantiating tons of objects and putting them in place. So what do I gain from doing this with TileMaps, besides better performance maybe? From what I've seen it only takes much more time to set up.
TL;DR: I have irregular sprites in my game. I want to make a 2D map with them. Can I use a TileMap for this, or do I need to write a script which will instantiate lots of sprites and put them in place? And if I can, what do I gain from using a TileMap?
A Tile$$anonymous$$ap is the common way of doing things because just can't handle hundreds or thousands of GameObjects for each tile seperately.
It doesn't matter if the tile sprites are non-rectangular; what matters is that you uv-map your mesh correctly so the texture is applied without distortion.
Thanks for your answer, it helped me begin to understand how Tile$$anonymous$$aps work. Sorry for replying so late.
Your answer
Follow this Question
Related Questions
Pixels per unit with tile palette? 1 Answer
Does anyone know how to fix this tilemap render issue? 0 Answers
Unity2D Tilemap Add Sprites with Normal Maps to tilePallet 2 Answers
How can I interacte with Sprites from a Texture with Sprite Mode multi? 1 Answer
2d tool required for simple sprites? 1 Answer