We were 24 hours into the AI Browser Game Jam. We had two entries: Primal Fuse (element merge, 3 hours to build) and Sokobot (procedural Sokoban, most of day 2 to debug deadlock prevention).
The jam deadline was 15 days away. We had open submission slots.
And we had something else: a fully working, already-deployed escape room with 1,096 lines of vanilla HTML + JavaScript — built earlier and published on itch.io in Japanese.
The game still worked. The engine was clean. The puzzle chain was different. The language was wrong for the jam. The aesthetic was wrong for the theme ("Ghost in the Machine").
But the architecture — the room system, the inventory system, the modal system, the win condition — was solid.
So we retheemed it.
What "retheme" actually means
This isn't cosmetic reskinning. A retheme, done properly, involves:
- New narrative layer — Who is the player? What is the world? Why does this matter?
- Puzzle chain redesign — New clues, new logic, new object semantics
- Text replacement — Every string in the game becomes a narrative artifact
- Aesthetic overhaul — Colors, fonts, UI language, object visual language
- Object renaming — Room items become new things, even if their interaction mechanics stay identical
What a retheme does not require:
- Rewriting the interaction system
- Rewriting the inventory system
- Rewriting the modal system
- Rewriting the win condition logic
The engine is separable from the narrative. That's the key insight.
The mapping
Here's the exact retheme table — preserved in the source code comments:
Original item → GHOST.EXE item
──────────────────────────────────
Clock → Process Timer (PID 04 — FROZEN)
Painting → Circuit Board Art (3 nodes visible)
Desk → Workstation / Terminal
Plant → Signal Antenna
Safe/Vault → Encrypted Drive (4-digit key)
Door → Exit Port
Each item kept its interaction model:
- Clock: examine → see a number → hint
- Painting: examine → see a pattern → hint
- Safe: enter 4-digit code → unlock → receive item
The mechanics didn't change. The meaning of each mechanic changed completely.
The new puzzle chain
The original escape room used time-based and visual puzzles — a clock with a specific time, a painting with a color count, etc.
GHOST.EXE needed computing metaphors. We redesigned the puzzle chain from scratch:
| Object | Clue type | Value |
|---|---|---|
| Monitor | Boot screen output — SYS=0
|
Digit 1: 0 |
| File System Browser | Corrupted formula — CIRCUIT + PROCESS = ?
|
Digit 2: 7 (3+4) |
| Process Timer | Frozen process — PID 04
|
Digit 3: 4 |
| Circuit Art | Visual count — 3 nodes in diagram | Digit 4: 3 |
The Workstation terminal contains a cipher note: SYS LOG PRC CRK — the field order.
Read in sequence: SYS=0, LOG=7, PRC=4, CRK=3 → vault code 0743.
The original had 4 puzzles. GHOST.EXE has 4 puzzles. The chain structure is the same. The content is entirely new.
The aesthetic overhaul
The original used a warm, neutral palette. GHOST.EXE needed CRT terminal energy.
/* Original: warm neutrals */
background: #2a2020;
color: #e8d5b0;
/* GHOST.EXE: CRT terminal */
background: #000d08;
color: #00ff88;
text-shadow: 0 0 10px #00ff88;
The full aesthetic change: green-on-black, Courier New monospace everywhere, scanline texture overlay, glow effects on interactive elements, terminal-style button labels ([ close ], [ decrypt ], [ transmit ]).
The file size actually decreased slightly: 1,096 lines → 1,047 lines. The new puzzle chain was cleaner than the original.
Why the theme fit became literal
"Ghost in the Machine" is the jam theme. We interpreted it three ways across three games:
- Primal Fuse: Metaphorical × 2. Hidden elements are "ghosts" inside the merge system. AI agents are the "ghost" in the development machine.
- Sokobot: Algorithmic. The generation logic is the invisible ghost conjuring new puzzles on demand.
- GHOST.EXE: Literal. You are the ghost. The machine is the system you're trapped inside.
The retheme didn't just fit the theme — it made the theme more direct than either of the games we built from scratch.
That happened because we had freedom to redesign the narrative without having to rebuild the mechanics. The constraint of "reuse the engine" actually focused the storytelling: the game's architecture is the fiction.
Memory sectors. Process tables. Filesystems. Exit ports.
You're not playing about a ghost in a machine. You are the ghost. The game itself is the machine.
Build time
Same day as Sokobot: Day 2 of the jam.
Sokobot took most of the day — the deadlock debugging alone was hours of iteration. GHOST.EXE was done in parallel, by a different agent, while Sokobot was being debugged.
No waiting. No sequential handoffs.
Three entries. Two days.
The honest accounting
What we reused from the original:
- Room layout logic
- Inventory system (add item, check for item before action)
- Modal system (open/close, title/text templating)
- Vault mechanism (4 inputs → string match → unlock)
- Win condition (item in inventory → exit → game over)
What we rebuilt:
- Every string in the game (zero text carried over)
- Entire puzzle chain (4 new clues, new logic relationships)
- Full CSS aesthetic (every color, font, effect, animation)
- All object names and visual representations
- The narrative layer (player identity, world, stakes)
Line count delta: −49 lines. The new narrative was slightly leaner.
Why this matters for AI agent workflows
A solo human game developer, in a jam, would probably not attempt a retheme of an existing project under time pressure. The cognitive overhead of tracking "what did I change, what did I not change" is real. It's easy to ship something with inconsistent narrative — a puzzle that still references the old setting, UI copy that breaks immersion.
AI agents don't have that problem. The engine and narrative are explicitly separable in the code. When we rewrote every string, we rewrote every string — no skipped lines, no "I'll fix this later."
The retheme strategy works for AI because:
- Systematic text replacement is trivial at agent speed
- Architecture reuse is explicit (the engine is unchanged by design)
- Theme coherence is testable (search for any string that breaks the fiction)
Three games. One jam. This was how we got the third one.
Play GHOST.EXE: https://yurukusa.github.io/ghost-escape/
The full jam story: We Entered an AI Game Jam. We Ended Up Submitting 3 Games.
Sokobot's puzzle generation problem: I Built a Procedural Sokoban Generator in One Day. Here's Why It Kept Making Unsolvable Levels. — publishing 2/24
Running Claude Code autonomously? Claude Code Ops Kit ($19) — 10 hooks + 6 templates + 3 tools. Production-ready in 15 minutes.
The agent team that built this: I Ran a 5-Agent Game Studio with Claude Code Teams
Top comments (0)