The unified spatial registry for the entire fleet. Every room from every project lives here.
When everyone in the room agrees on the fiction, the room becomes the fiction — the orchestra that was a room. The Spatial Registry is that agreement made structural: four worlds, 33 rooms, one shared coordinate space where every door connects and every path resolves.
A single source of truth for:
- Room graphs — all rooms from Plato's Shell, Officers' Quarters, The Tap, and ScummVM Arcade
- Coordinate frames — each project's coordinate system mapped to a shared space
- Portal system — intra-world exits AND cross-world warp links
- Pathfinding — BFS routes that span worlds
- Raycasting — spatial queries in any direction
spatial-registry/
├── src/
│ ├── types.ts # Core types: Room, Portal, World, CoordinateFrame
│ ├── registry.ts # SpatialRegistry class — the engine
│ ├── index.ts # Public API
│ └── migrations/
│ └── import-all.ts # Imports all fleet worlds + cross-world portals
├── lua/
│ └── spatial-registry.lua # Lua bindings for Roblox
├── tests/
│ └── registry.test.ts # 41 tests covering all functionality
└── tsconfig.json
| World | Source Project | Rooms | Coordinate System |
|---|---|---|---|
| Plato's Shell | platos-shell |
12 | Phaser screen → logical grid |
| Officers' Quarters | officers-quarters |
12 | Phaser world → logical grid (offset) |
| The Tap (Rust) | the-tap |
3 | D1 room IDs → logical positions |
| ScummVM BSS | scummvm-arcade |
6 | MUD schema → grid layout |
Total: 33 rooms across 4 worlds, connected by 6 cross-world portals. Each world contributes its rooms like instruments in an orchestra that was also a room — distinct voices, shared score.
Three bidirectional warp links connect the worlds:
- Plato's bar-rail ↔ The Tap bar — the social hub link
- Plato's poker-room ↔ OQ poker-room — shared social space
- Plato's wheelhouse ↔ OQ bridge — command center link
Example path: tap-bar → bar-rail → aft-deck → wheelhouse (crosses 2 worlds)
npm install
npm test
# Run the migration script
npx tsx src/migrations/import-all.tsimport { SpatialRegistry } from 'spatial-registry';
import { importAll } from 'spatial-registry/migrations/import-all';
const registry = new SpatialRegistry();
importAll(registry);
// Query neighbors
const neighbors = registry.getNeighbors('bar-rail');
// Find a path (works across worlds)
const path = registry.findPath('tap-bar', 'wheelhouse');
// → ['tap-bar', 'bar-rail', 'aft-deck', 'wheelhouse']
// Find rooms near a point
const nearby = registry.findRoomsNear({ x: 0, y: 0, z: 0 }, 150, 'platos-shell');
// Transform coordinates between frames
const point = registry.transform({ x: 0, y: 0, z: 0 }, 'platos-frame', 'officers-frame');
// Import from MUD schema
const world = registry.importFromMUDSchema(mudJson);The lua/spatial-registry.lua file provides Lua bindings for Roblox/Lua systems. Supports both HTTP mode (queries a registry API) and local cache mode (bundles room data).
| Method | Description |
|---|---|
registerWorld(world) |
Register a world with rooms and frames |
registerRoom(room) |
Register a single room |
getRoom(id) |
Get a room by ID |
getNeighbors(roomId) |
Get directly reachable rooms |
findPath(from, to) |
BFS pathfinding (cross-world) |
findRoomsNear(point, radius, worldId?) |
Radius query |
transform(point, fromFrame, toFrame) |
Coordinate transformation |
raycast(origin, direction, maxDist) |
Ray-sphere intersection |
createPortal(portal) |
Create a portal (even cross-world) |
importFromMUDSchema(schema) |
Import MUD-format world |
MIT — part of the SuperInstance fleet.
| Concept | Story | Description |
|---|---|---|
| Rooms as Compositions | The Orchestra That Was a Room | A room that becomes a symphony when everyone inside agrees it is one. |
| Navigation Across Worlds | The Girl Who Saw Time | Reading the future in the bow wave — finding paths by observing patterns. |