Level Generation

Level Procedural Generation
Levels will all be procedurally generated, providing a unique layout for each playthrough. Each level type (pizza joint, museum, etc.) will have a set of pre-made rooms that can be connected together to create the level. Rooms will have nodes on their exits/entrances where other rooms will be connected. Individual rooms will be mutated, so that some will have counters, walls, or other objects to create variety. Once the rooms have been placed, the level will be filled out with the obstacles. Obstacles will be chosen based on the criteria of the level (pizza joint can't have laser tripwires, for instance) and placed appropriately throughout the level. A group of rooms like the one in the example would be created as part of a level. They would be attached door to door in a way that they would not overlap. Then, tables and other room scenery would be placed, like the red pieces in the example. In most cases not all of the pieces would be used, and a random selection would be used instead. Then obstacles would be placed, like the green pieces in the example. Again, not all would be used, but a random selection would be chosen and placed in predetermined locations.