What is the best way to optimize a huge map?

Hello developers! I am working on a flight simulator with an insanely large map, the size isn’t currently 100% known but it is gonna be at least 32000 x 4 x 32000. I want the map to be extremely large to let the players fly for long periods of time and to allow for many different locations.

My problem is that this will cause a lot of lag and I don’t really know how I would go about reducing as much lag as possible

I have searched the developer forum for answers and I have have come across a few, some being that I should disable the CastShadow property for parts that the places won’t come very close too and to make the map as thin as possible. I have made this post to ask for more options as these answers were given to someone working on a 6400 x 150 x 3280 map.

Thanks for reading and please reply if you have any suggestions :+1:

3 Likes

If you want a map that large then your going to come across performance problems regardless, but I will offer a bit of advice.

One of my favourite games of all time is legend of Zelda breath of the wild, this has a huge open world map which can be fully viewed from places such as mountain peaks, through the use of glitches its also pretty easy to learnt a lot about how they manage a map of this scale with relatively low performance implications.

  1. Have high and low detail versions of a mesh, if you want the full map to be viewable its often a good idea to have both a high and low poly version of significant meshes, since from a distance detail is negligible so a low poly version will suffice, while close up the detail is important so you will need a higher poly version. Unfortunalty roblox Is hardly built to do this so what you gain in performance may be lost by the constant creation and destruction of assets.

  2. Render smaller items around the player, by smaller items I mean things such as rocks, bushes, potentially trees etc. having thousands of these covering the map is a performance nightmare, so instead load these assets around the player’s position, trying to reuse them as much as possible to once again save on creation / destruction performance costs, if you wanted a bigger area of the smaller probs to spawn then you could combine this with an adapted version of tip 1 so that the probs on the outskirts of the circle are lower poly ones.

  3. Only run checks that need to be checked, this has been discussed at great length in another topic before, however ill give a quick summary. If your map has 10,000 items which the player can either interact with / have some sort of program function related to them, Make sure you are only checking / executing code on objects which are close to the player. For example if you have 10,000 ‘Press E to pick up’ parts, instead of doing a magnitude check for all of them, divide your map into a grid and only run this check on maybe 50 assets within the current square the player is in.

In the end tho, if you want a map this large only the highest end computers will be able to run it smoothly, and if you plan to use terrain as a map base then thats only going to have worse performance implications. My honest reccomendation is to try and ‘fake’ the experience of flying around a map, loading a generated ‘chunk’ around the player as they fly.

6 Likes

Would using StreamingEnabled and LevelOfDetail help as well as the options you have listed?

Streaming enabled is pretty crap, but if your feeling lazy that is an alternative to rendering things around the player however its always more efficient to make a custom one designed specifically to your game.

Level of detail is a good alternative to the mesh changing I suggested, however personally never used it since its pretty buggy and I think its still in beta (Don’t quote me on that)

Given the size of your map, regular streaming enabled won’t help you much.

On top of any advice given, you may this talk from @Aotrou helpful.

It’s from RDC 2020. You can watch it @ Documentation - Roblox Creator Hub

7 Likes