I am developing a 2D tile-based top-down game. It is currently instantiating square objects with a sprite renderer to procedurally generate the map.
Each floor and wall is a 1-unit wide object.
I have two issues with that:
- The memory usage is quite high and it is not efficient (generating maps that are more than 300x300 become really slow)
- There are lights glitches when I have multiple lights in the scene. The borders of the squares become visible as seen in the picture:
- Is it possible to combine all my static elements (floor and wall tiles) in a Mesh object, or another adequate object for that?
- The floors items do not have colliders, as the walls have a box
collider. Does it cause an issue?