Using multiple tile systems and performance?

xdotcommer
Member
Registered: 2014-06-25
Posts: 11

Topic

I am creating smaller tilesets that I then stitch together in my game - I could have as many as two dozen tilesystems loaded (each relatively small - maybe 40x40).  I'm wondering if this is going to cause performance issues.

If so, is there anyway to "render out" a tile system?  To a prefabbed image and collider?  I know it's a long shot.

Thanks,
Mike

Lea Hayes
Rotorz Limited
From: United Kingdom
Registered: 2014-03-04
Posts: 638

Response 1

If each of the tile systems were going to be 40x40 then I would suggest having a chunk size of 40x40 so that there is just 1 data chunk per tile system.

In terms of performance your mileage will vary depending upon the complexity of your tiles and the number of instances along with other complexity in your scene. As always with performance you will need to create some tests and profile them to get realistic measurements for your specific use case.

You could copy the tile data from the smaller systems into a larger one using the TileSystem.SetTileFrom method. When setting a large number of tiles I would highly recommend using the bulk editing mode feature.

If you didn't want to use prefabs for these tile system building blocks; then what you could do is to create a custom data format along with a custom editor script that exports all of the relevant data to this custom data format.

I hope that this helps with your questions.

xdotcommer
Member
Registered: 2014-06-25
Posts: 11

Response 2

Great, thank you for the quick response!