Level Generator

The level generator generates levels randomly in Baldi's Basics Plus.

Steps

 * 1) The level generator chooses a seed to start working with.
 * 2) It creates the border surrounding the map.
 * 3) It generates a special room.
 * 4) The generator starts off by generating some plots to create rooms in and deletes some hallway spots to generate different halls.
 * 5) It generates the halls surrounding the plots.
 * 6) It deletes the plots and the border.
 * 7) It adds unique/different hallways to random spots in either other hallways or deleted hallway spots.
 * 8) It generates the rooms where the plots used to be.
 * 9) It generates the walls and door.
 * 10) It selects a random texture to put on the walls, floor, and ceiling and adds the textures onto the planes (floors, walls, ceiling).
 * 11) It gets the masks ready.
 * 12) It adds some swinging doors, windows and decorations.
 * 13) It sets spawn points for all the characters but only selects a few characters for the specific seed and floor.
 * 14) It creates the  (Basically, where characters can move towards. Without it, characters cannot move.) and adds the player.

Trivia

 * In Baldi's Basics Kickstarter Exclusive Demo, the player can see placeholder textures when winning or losing a floor. These textures do not appear when completing floor 3.

Glitches

 * There needs to be some optimizations done to the generator, since it takes around 5–30 seconds to generate before the "Play!" button shows up. It typically takes a lot longer, or just as long to generate mazes too.