I’m trying to make a random map generator and I’m not really sure how to, It’s a recreation of SCP:CB where there’s corridors and rooms, I think how they do it is divide each section into grids and see what rooms are compatible to “match” onto it, leaving some blanks squares. Though, I don’t actually know how to do this.
I few problems I’ve encountered are stuff like script exhaustion from checking ~20 possible matches for each door on a grid (Probably around 5000 checks they do for each map) and that’s basically where I’m currently stuck at. Does anyone know how to fix this?
That doesn’t solve the issue - As I said it needs to run ~5000 times, even with the lowest possible wait (29 milliseconds) will take too long. I also said I’m stuck on that part and never got any closer to the goal.
Script exhaustion is where a script runs too much code in a short amount of time, and the script stops running because of it. This is a safeguard setting defaulted by Roblox and can be turned off (it’s primarily used to tell you that something is wrong)