I’ve been working on a procedural SCP facility generator because it interested me, and I wanted to share it for free.
The idea is simple: every time you play, the game creates a completely new facility from scratch. It generates corridors, SCP chambers, checkpoints, exits, and more. No two runs are the same.
Here’s how it works:
The generator runs as a pipeline on the server. First, it lays out a grid-based graph of rooms, creating a main path through each zone with branches and loops so it doesn’t feel linear. Then it selects room templates that fit each location. For example, a corner cell gets a corner room, and a dead end gets a dead-end room. It solves the positions so every door aligns perfectly with its neighbor before finally building everything in the workspace.
There are three zones that generate in this order:
Light Containment (LCZ) — where most SCPs live
Heavy Containment (HCZ) — more complex with more loops
Entrance Zone (EZ) — leads to Gate A or Gate B
I DO WANNA MAKE ONE THING CLEAR
The HCZ and EZ is not done yet, so if you see worse generation on HCZ and EZ than LCZ, I will add more rooms in the future.
anyways continuing on.
The zones connect through checkpoint rooms. SCP-939 gets special treatment with a separate chamber accessed by an elevator.
Everything is modular. Each stage of the pipeline is its own script, making it easy to add new rooms or adjust generation. There’s also a debug visualizer that color-codes rooms by their function, which is helpful for spotting issues.
The entire system is seed-based. If I want to recreate a layout for debugging, I can simply reuse the same seed. It also validates itself after generation. It checks for connectivity and ensures reserved rooms are placed, among other things.
I would love to hear your thoughts. Thanks for reading!
Fallback happens when either the map spends all of its 35 retries to build, and exhausts, so to fix this, im adding Fallback mode
Fallback mode builds the map like how it should be without exhausting
(For clarification)
I tryed this myself, completely new seed, it only exhaused due to loop misallignment, so it went to Fallback mode or “Relaxed” mode and generated 211 rooms without any collision.