Thursday, September 29, 2022
HomeGame Developmentunity - How to create terrain manufactured from small tiles?

unity – How to create terrain manufactured from small tiles?


Whether efficiency is a matter is dependent upon the scale and amount of the tiles. If the surroundings is 10×10 tiles, there should not be any efficiency points. If the surroundings is 1000 x 1000 tiles, spawning 1 million tiles directly might be going to kill efficiency.

If the map could be very massive (by way of variety of tiles) however solely a small portion of it’s seen at a time (e.g. as a result of a top-down digital camera angle), you need to use a pooling system. E.g. say the map is 1000 x 1000 tiles however solely 10 x 10 tiles are seen directly. You may spawn a 12 x 12 block of tiles, which provides you 1 row of padding on either side. When the digital camera strikes in direction of one fringe of the display, you progress the tiles from the other fringe of the display over to create the brand new row of tiles that is coming into view.

Here’s a diagram with a 2×2 viewable space and 1 row of padding round every edge.

enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments