SCP Procedural Facility Generator

Hey everyone!

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!

Heres a video of it in action

Download:
scpProcedualGeneration.rbxl (1.3 MB)

10 Likes

Consider me speechless. It’s that good.

2 Likes

Very cool, Id try limiting the length of the hallway segments, it leads to a lot of space with nothing to do but just walk..

3 Likes

Appreciate it! I wasn’t sure how people would react, so hearing that genuinely made my night.

Thanks for the feedback! The hallway lengths come from two main factors

1. Rooms

See, in LCZ, we have a whole bunch of rooms
But in HCZ and EZ, there aint a lot and that because I didnt add all the rooms yet

2. segmentLengthMin and segmentLengthMax

these values are currently too high and I will reduce them for that “SCP” facility feel.

Update 0.01

Shortened segmentLengthMin and segmentLengthMax in LCZ Grammar.

Old: segmentLengthMin = 4, segmentLengthMax = 9,

New: segmentLengthMin = 2, segmentLengthMax = 5,

so now, it went from this:

to this:

The system will improve in the future, like for example, more HCZ and EZ rooms for better generation, same with LCZ

Download:
scpProcedualGeneration.rbxl (1.3 MB)

Ay dude, big fan of procedural map generations. Don’t have a lot of feedback on this but you sure did a hell of a job on it!

Thanks dude, means a lot! Procedural gen is something I’ve been deep into lately, so I’m glad it shows.

Update 0.02

Re-Introducing LOOPS

Loops is a feature where the main path of a zone branchs off and cycles forward, for example, it would branch off room 5 and go to room 12.

Seed 1457068409 without loops:

Seed 1457068409 with loops:

Two new config Values

Config.SeedYouWant

Config.VisualizeBounds

Config.EnableLoops 

New Fallback Mode

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.

Enjoy the new updates

Download:
scpProcedualGeneration.rbxl (1.3 MB)

1 Like

bump this resource :+1:

(STOP FLAGGING THIS ROBLOX)