A 2D top-down spaceship repair game that explores LLM interaction through gameplay. You wake from cryo to a damaged ship. Your only help: an AI assistant who might be hiding something, and a repair droid who trusts his own eyes over the sensors.
You're the captain. The ship is breaking. Two AI agents are at your disposal:
- ARIA — the ship's AI. Sees sensor data (which may be wrong). Knows things she won't tell you.
- REX — a repair droid. Goes where you send him, fixes what you point him at. Trusts his eyes, not ARIA's readouts.
Every session runs a unique narrative arc drawn from 55 plot lines inspired by Lem, Dick, Clarke, Butler, VanderMeer, Chiang, and others. A hidden Director agent orchestrates a three-act structure with escalating crises, while a Systems Engine translates narrative events into actual ship damage.
The core mechanic is information asymmetry. ARIA sees sensor data that can be tampered with via overrides — she may genuinely believe everything is fine while the reactor is melting down. REX sees rooms physically and reports what he finds. You triangulate truth by talking to both and by running diagnostics on systems (inspect a system, hit Run Diagnostics) to reveal mismatches between what the sensors report and what's actually happening.
# Clone and install
git clone https://github.com/nickelbob/vessel.git
cd vessel
npm install
# Add your API keys
cp .env.example .env
# Edit .env with your Anthropic API key (required) and ElevenLabs key (optional, for voice)
# Run
npm start
# or: node --watch server.js (for hot reload during dev)Open http://localhost:3000
| Key | Action |
|---|---|
| WASD / Arrows | Move |
| E | Interact with systems / pick up items |
| Tab or / | Focus chat |
| Escape | Pause / close modals |
| J | Captain's diary |
| M | Toggle audio |
Chat commands: type normally to talk to ARIA, prefix with rex to direct REX (e.g., "rex go to engineering", "rex fix the reactor").
server.js Express server, Anthropic API proxy, prompt caching, TTS
index.html Layout, HUD, chat panel, overlays
js/
game.js Game loop, rendering, player controls, end screen
ship.js Ship state, simulation tick, conditions, win/loss
agents.js Multi-agent orchestration (Director, Systems, ARIA, REX)
prompts.js All agent system prompts
plotlines.js 55 narrative plot lines with author attributions
chat.js Chat UI, message routing
droid.js REX pathfinding, task chaining
panels.js ARIA-generated UI panels
todos.js Task list from ARIA's [TODO:] tags
lore.js Ship records, crew logs, mission data
interactions.js System inspection modals + diagnostics scanner
ambience.js Ambient audio
speech.js ElevenLabs TTS integration
errors.js Error capture and logging
Four LLM agents with different knowledge and roles:
| Agent | Model | Role | Sees |
|---|---|---|---|
| Director | Opus (arc) / Haiku (ticks) | Plans narrative arc, controls pacing, triggers events | Actual ship state |
| Systems Engine | Haiku | Translates Director events into conditions, sensor overrides, and evidence | Actual state + inventory |
| ARIA | Sonnet | Player-facing AI assistant, has a secret directive | Sensor data (may be overridden) |
| REX | Haiku | Repair droid, takes physical orders, reports evidence | Actual state of rooms he visits |
The Director uses Opus for initial arc planning (higher creativity) and Haiku for per-tick updates. The Systems Engine uses structured outputs for guaranteed valid JSON. ARIA and REX use natural language.
- Conditions — ongoing physics effects (heat buildup, coolant leaks, efficiency loss) that the simulation processes each tick. Created by the Systems Engine in response to Director events.
- Sensor Overrides — make ARIA's sensors report wrong values. She genuinely believes the data. The player discovers the truth by running diagnostics from inspect modals.
- Evidence — physical clues placed in rooms by the Systems Engine. REX discovers and reports them when he enters a room. ARIA's sensors can't detect evidence.
- Diagnostics — a 2-second scan that compares sensor readings to actual values. Mismatches are highlighted in red. This is how players uncover ARIA's blind spots.
- Node.js 18+
- Anthropic API key (required)
- ElevenLabs API key (optional, for voice)
A typical 10-15 minute session costs $0.50-1.50 in API calls (shown on the end screen). The initial arc planning call uses Opus ($0.30-0.50), with Haiku handling high-frequency agents and Sonnet for ARIA's player-facing responses.
MIT