Hello
I tryed to make a terrain generator which generates 20x20x20 chunks of land in a radius of 5 around the player.
This works, but when the player moves from one to another chunk, there is a huge lag.
What i mean with “huge lag”, is that the game freezes and doesn’t react to anything until it has not finished terrain generation. The lag is caused by a for loop which needs to calculate 8000 blocks per chunk with the Mathf.PerlinNoise function.
Is there anyway to keep 60 fps and slowly generate the terrain in background? (like Minecraft)
Does anyone have experience with it?
Thanks for reply!