I am making a game with a large map and I need help optimizing it. The map is currently a large island with many trees and rocks. There is a large amount of parts and meshparts due to this. I’m not sure how to go about optimizing this many parts because most of my previous projects take place on a smaller map. Server lag is currently not an issue but I plan to add more areas to the map so I want to optimize the game now. Are there any ways to reduce server lag?
Some notes about this map:
The base island is made up of a bunch of randomly generated wedges.
There are about 40,000 wedges making up the island.
Trees, rocks, items are made of MeshParts.
All island parts and resources are anchored and have collision turned on.
Steaming enabled is turned on
I cannot reduce the number of wedges in the island or the number of resources.
Well it seems the odd factor is here is clearly the 40,000 wedges
You should check how many draw calls are being called to verify this, or otherwise if check if the bottleneck is cpu or gpu-oriented.
In the case the wedges are the issue, then there don’t seen to be a great many solutions since (from what I understood) the map is procedurally generated in-game I’d assume. If so, you could try alternative methods to generate these islands, E.g. using editablemesh.
One fun little optimization, especially for large tree-dense scenes, is to replace trees from a distance with simple flat images, some sort of BillboardGui or the such.
I don’t think there is a big issue with my game right now but I want to optimize it now before I add more content. I don’t think there is a bottle neck with my pc because I have pretty good specs on it. I’m not sure if having 40,000 wedges is great for performance so I will look into editable meshes.
Oh yeah and I ran a check to verify the amount of parts that make up the island and it is indeed 40,000