I’m working on a basic algorithm to generate a backrooms-type maze. While the algorithm is fine, when generating large maps it causes a major lag spike. While this typically wouldnt be an issue as there would be a loading screen during generation, it’s so harsh I’m worried it could crash mobile players. Is there any way to slow down the generation? Using task.wait() is TOO slow as it now takes like a solid minute to load the map. Any ideas?
1 Like
You could add a counter that increases each time and then like every time if the counter is a multiple of 10 or maybe 25 it will task.wait()
2 Likes
maybe try using RunService.Stepped?
1 Like
Not a bad idea! But I’ve found this works too. I just ran multiple instances of the generator at once.
Thank you though!
1 Like
If your map generation runs on the server, it wont crash or freeze client devices, as they are two different CPUs. You freeze in studio because both server and client run on the same CPU but if you try it on a real server on roblox you should be fine with a loading screen
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.