I recently upgraded my map generator to handle map sizes of up to 300*300, however in studio (which does however show up as more memory than would be for a normal client) it was at 10GB of memory . Which even though it’s not accurate for clients, it’s still insanely high anyways . What are ways to fix this?
The current solution I had was to create all data but not render it until players enter that area . This is only good for early-game, but as when players keep exploring: it doesn’t unload. It doesn’t unload blocks and nature since that uses more network to have to create and destroy and requires state management.
All map generation and creation is handled by the server .
Here’s a picture of a map from above (shape is a bit weird)
You should try these things to reduce the memory in your build.
Disable collisions, touches, and shadows where unnecessary
Use “imposter” models to heavily reduce triangles where the user wouldn’t notice the difference (they’re basically just a flat picture of the model)
Use greedy meshing (merges voxels of the same appearance to reduce triangles)
Use Workspace.StreamingEnabled if your map is big and doesn’t need to be all loaded at once to work
Reduce the amount of parts with opacity (0 < x < 1)
Try to reuse and recycle meshes, and try to use the same colors and textures. This will reduce drawcalls. The amount of triangles might be the same, but it reduces how much the CPU talks to the GPU, allowing the GPU to work more efficiently.