AI should design a map program, not type its triangles.
A reproducible prototype for compiling semantic tactical-FPS layouts into brushes, CSG, exact CAD/B-rep, voxel/SDF, GLB/OBJ/STL, DXF, and engine-native primitives—with geometry and gameplay validation.
This is now implemented, and you can walk through it
The proposal below has been built: a LevelSpec schema, an eleven-pass deterministic compiler, geometry / movement / tactical validators, six exporters, and a first-person viewer. Six levels ship with it. Open the viewer → · README · the original contract
Measured by that implementation, on the levels it ships — every figure below this box is from the original study and describes different benchmark levels.
| Level | Solids | Compiled: coplanar / overlapping | Naive build of the identical spec | Navmesh baked from the geometry |
|---|---|---|---|---|
| Compiler Demo Hall | 175 | 0 / 0 | 214 / 214 | 100% reachable |
| Dust II (approximate) | 300 | 0 / 0 | 344 / 538 | 100% reachable |
| Cache (approximate) | 237 | 0 / 0 | 302 / 532 | 100% reachable |
| Clubhouse (approximate) | 386 | 0 / 0 | 446 / 446 | 100% reachable |
| Ring Arena (original) | 124 | 0 / 0 | 190 / 190 | 100% reachable |
| Three-Lane Two-Site | 179 | 0 / 0 | 217 / 256 | 100% reachable |
| Three-Storey Siege | 251 | 0 / 0 | 321 / 321 | 100%, 44% sealed |
| Vertical Stack Tower | 302 | 0 / 0 | 163 / 163 | 100% reachable |
| Broken By Design | 75 | fails 11 gates, as intended | 63 / 63 | 23%, 5 islands |
In every naive build each box is individually watertight, consistently wound, and contains its own centroid as a six-plane brush. The report panel in the viewer states this explicitly next to the failure counts.
Compiled floor plans
Drawn by the compiler from the same boundary records as the 3D geometry, so the plan cannot disagree with the level you are standing in.
Cache — approximate reconstruction
The least precise of the three reconstructions: the area set and adjacencies are right, several finer connections are a reasonable guess.
Dust II — approximate reconstruction
A topology reconstruction with the real callouts, not a measured copy. Accuracy needs an authoritative source as the LevelSpec input.
Clubhouse — approximate reconstruction
Basement, 1F and 2F on an aligned footprint, with soft walls, reinforcement slots and hatches as semantic roles.
Three-Storey Siege Benchmark
Three-Lane Two-Site Benchmark
Vertical Stack Tower
Ring Arena (original)
Central result — original study
Both maps are made from individually watertight, consistently wound boxes. Yet the Dust-style collection still contains 156 coplanar face pairs and 136 intersecting-volume pairs; the R6-style collection contains 304 and 259. Primitive validity does not imply collection validity. A deterministic ownership and Boolean/bake step is still necessary.
Reference topology studies from the original study
CS-style two-site layout
Approximate three-lane topology with an explicit elevated Catwalk layer and two stair links.

R6-style three-storey layout
Approximate legacy Clubhouse study with rooms, stairs, hatches, soft/reinforced walls, windows, and rappel entries.

Representation comparison
| Path | Dust-style | R6-style | Use |
|---|---|---|---|
| Separate primitives | 122 boxes / 1,464 tris | 229 boxes / 2,748 tris | Editable, not runtime-ready until internal/coplanar faces are resolved. |
| Quake brushes | 122/122 half-space tests pass | 229/229 pass | Excellent deterministic greybox format. |
| OpenSCAD union | 1,414 tris; watertight | 2,396 tris; watertight | Offline CSG bake. |
| CadQuery B-rep | Valid STEP; 1,414-tri tessellation | Valid STEP; 2,396-tri tessellation | Exact solids, curves, parametric CAD, validation. |
| Voxel/SDF | 162,908 tris; watertight | 188,840 tris; watertight | Robust repair/destruction fallback; high cost and quantization. |
| Gameplay graph | 2,233 nodes; 1 component | 1,342 nodes; 1 component | Connectivity and route metrics independent of rendering. |
Recommended architecture
brief / plan / reference
↓
AI edits a constrained LevelSpec
↓
schema + topology + solver checks
↓
deterministic compiler owns shared walls, openings, winding and axes
↓
static shell → robust brush/CSG/B-rep bake
runtime surfaces → separate soft walls, hatches, windows and rappel actors
↓
collision + nav + LOS + route timing + simulated playtests
↓
engine import and designer review
For exact private reconstruction, use an original/authorized source, official blueprint, or a validated decompile as the authority. For generation, create a new LevelSpec under the same route, timing, verticality, sightline, and destruction constraints.
Read and run
Research report
Failure taxonomy, survey of brushes/CSG/CAD/BIM/SDF/DSL/WFC/quality diversity/world models, and experiment results.
Open research_report.mdImplementation blueprint
A staged product design for Three.js, Unity, Godot, and Unreal.
Open implementation_blueprint.mdLevelSpec contract
The AI-facing schema, invariants, portals, layers, wall roles, and vertical connections.
Open LEVELSPEC.mdWhat the implementation added (1.1)
Rebuild and test
Run npm run compile to build and validate every level, and npm run check to typecheck, test and compile.