Build & Verify
The flagship cross-tool workflow: Director builds a room, Spectator verifies a player can navigate it.
This example demonstrates the build → run → verify → adjust loop — the most powerful pattern in Theatre. An AI agent constructs a section of geometry, then uses spatial queries to verify that:
- The player can navigate through the area
- All passages are wide enough
- No geometry blocks intended pathways
- Enemy spawn points have valid paths to player-reachable areas
The task
Build a corridor room connecting two larger chambers. The corridor must be:
- 2m wide (player radius 0.4m × 2 + 1.2m clearance = 2m minimum)
- 2.5m tall
- 8m long
- Have two guard positions (enemies that should be able to patrol the corridor)
- Have a locked door at the far end (StaticBody3D, removable at runtime)
Phase 1: Build with Director
Create the room
Add walls
Place guards
Phase 2: Verify with Spectator
Press F5 to run the game.
Verify basic navigation
Verify guard positions
Check corridor width against agent radius
Verify guard patrol paths
Phase 3: Detect and fix an issue
The complete loop in summary
| Phase | Action | Tool |
|---|---|---|
| Build | Create scene structure | Director batch |
| Build | Place geometry | Director batch |
| Build | Instance enemies | Director batch |
| Build | Configure exports | Director batch |
| Verify | Check navmesh connectivity | Spectator path_distance |
| Verify | Check corridor width | Spectator spatial_query radius |
| Verify | Check patrol routes | Spectator path_distance |
| Fix | Adjust wall position | Director node_set_properties |
| Verify | Confirm fix | Spectator spatial_inspect |
This loop — build, run, verify, adjust — is what Theatre is designed for. Neither tool alone is sufficient: Director can build the geometry but cannot verify navigability; Spectator can verify navigability but cannot build geometry. Together, they close the loop.