Question about infinite generation

I want to have an infinitely generated map which could cause lag if I were to keep each chunk of the map in the game as the players moves. An obvious solution to this is to remove the chunk if you are not within distance to see it.

(Chunks need to save if you move away and then come back, do not need to save after rejoin)

My question is, Is this necessary? If so, would I put unloaded chunks in replicated storage?

Thank you.

You could just delete and clone the chunks. Also, have a render distance setting so it’s not limited for people with more powerful computers.

You definitely need a render system, and I would suggest saving chunk data in a string (if you use a bunch of values such as ints, booleans, etc. it helps to use json encoding), because you can then save that data to a datastore or something to always load the same chunk features

This isn’t necessary if you use the same random seed for perlin-noise generation.


It’s not much of an issue with your current loading/unloading solution. Make sure the rendering is on the client, though.

2 Likes

Sorry for the lack of detail, but I need to be able to change what is in each chunk, so deleting it would not work.