DEV Community

Cover image for RESIDUES: A Terminal Game Inside the Dying Mind of Alan Turing
İclal Doğan
İclal Doğan

Posted on

RESIDUES: A Terminal Game Inside the Dying Mind of Alan Turing

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

⚠️ Content note: this game deals with suicide, chemical castration, and the slow breakdown of a mind. It's a story about the death of Alan Turing, told honestly.

What I Built

RESIDUES is a terminal-native narrative puzzle game, written in Rust, that runs entirely inside your terminal — no graphics window, no mouse, just 24-bit amber phosphor in the dark.

You are inside the failing mind of Alan Turing on the night of his death — Wilmslow, 8 June 1954. As his cognition collapses, he replays the entire lineage of computing as six interactive puzzles, each one rebuilding the real idea its pioneer gave the world. The principle behind every act is "Bright Puzzle, Dark Undertow": the puzzle in front of you is a clean, genuinely deep technical challenge, while underneath runs the human tragedy of the mind that invented it.

Act The Mind Year What you actually do
I Joseph-Marie Jacquard 1804 Punch an 8×8 bit matrix into modular cards — a continuous roll tears, a block-chain jams, only a looping deck survives.
II Charles Babbage 1837 Derive a baseline by the method of differences, then survive the carry crisis by staggering delay buffers so the carry travels as a wave.
III Ada Lovelace 1843 Write real assembly on a 3-register machine; overrun the linear cap to unlock loops, then compute a checksum with a loop that devours its own counter.
IV George Boole 1854 Steer a grid of logic gates to a target checksum while the displayed output starts lying — but the truth always holds beneath.
V Claude Shannon 1937 Assign prefix-free codes within a fixed channel capacity, then add a parity guard against bit-flip noise. Real information theory.
VI Alan Turing 1936 Operate a real Turing machine — a head over a tape, a transition table — stabilizing the five prior acts' corrupted residues until the machine reaches HALT.

And the puzzles are real — not reskinned button-presses. There's a working 7-instruction assembly interpreter, a genuine Turing machine with a complete transition table, real Shannon channel-capacity math, real carry-propagation. The puzzles ARE the history.

How it connects to the jam. The June solstice is the year's turning point — the hinge where light begins to lose to darkness. RESIDUES is built entirely on that hinge. Alan Turing was born in June; June is also Pride Month, and the jam itself names him — the father of the Turing Test, persecuted for who he was. Across every act the candle on the desk burns lower, the heartbeat speeds the metronome, and memory corrupts into noise. Light and darkness, the passage of time, a turning point — those are the jam's own words, and they are the game's three core systems.

A word before you play. Jacquard and Babbage ease you in — the opening acts are gentle, and we're warming you up on purpose. But fair warning: after that, the machine starts asking you to actually think. If you get stuck somewhere, don't be mad at us — some acts are deliberately demanding with little hand-holding. And if you don't get stuck? Then you already know this craft, and you have our respect.

On Turing's voice. Some of you will ask why we gave Turing such a broken, sick, dissolving voice. Here's why: the game dramatizes his final days — the drugs he was forced to take, and the very night he died. There was cyanide in the next room for his experiments and a half-eaten apple by his bed; whether it was an accident, an experiment, or a choice, no one will ever know. We didn't think a man would have a clear, beautiful voice on his last night — so we deliberately didn't give him one. The decay you hear is the point.

Video Demo

It's a full ~15-minute playthrough, so feel free to skip around — every act is in there. If you're short on time, the chapters in the video description jump straight to the key moments: Act III (writing real assembly), Act VI (the Turing machine), and the ending.

Code

GitHub logo miclaldogan / residuesTerminal

Residues: terminal edition — a true-color Rust/Ratatui TUI port (cinematic typewriter prelude, Braille portraits, Jacquard/Babbage acts)

RESIDUES — An Engine of Residual Minds

A terminal-native narrative puzzle game about the birth of computation, written in Rust.

"The most terrifying part is learning how to forget."

RESIDUES runs entirely inside your terminal — no graphics window, no mouse — rendering a truecolor (24-bit) amber-phosphor aesthetic. You are inside the failing mind of Alan Turing on the night of his death (Wilmslow, 8 June 1954). As his cognition collapses, he replays the entire lineage of computing as six interactive puzzles, each one rebuilding the actual idea its pioneer gave the world.

The design principle is "Bright Puzzle, Dark Undertow": every act is a clean, genuinely deep technical challenge, while underneath runs the human tragedy of the mind that invented it.


The Six Acts

Each act is a real computational toy — not a reskinned button-press. You don't read about the machine; you operate one.

Act Mind Year What

It's genuinely easy to run yourself:

git clone https://github.com/miclaldogan/residuesTerminal.git
cd residuesTerminal
cargo run --release
Enter fullscreen mode Exit fullscreen mode

Or zero-install:

curl -sSL https://raw.githubusercontent.com/miclaldogan/residuesTerminal/main/run.sh | bash
Enter fullscreen mode Exit fullscreen mode

Play with headphones, in a truecolor terminal. The audio is binaural — ghost whispers are hard-panned left and right, and the heartbeat sits under everything — so a lot of the experience is lost on speakers. (The game probes for mpv / ffplay / mpg123; if none is installed it runs completely silent but fully playable — no crash.)

How I Built It

RESIDUES is written from scratch in Rust (~10,400 lines, 65 passing tests) on ratatui + crossterm. The challenge wasn't drawing screens — it was making a terminal feel alive. A few systems do the heavy lifting:

  • A real assembly micro-compiler (LOAD/STORE/ADD/SUB/IF_Z/JMP/HALT) with its own error codes — Lovelace's act is genuinely a register-allocation puzzle, and a [REGISTRY ERROR] is the narrative trigger that unlocks loops.
  • A crate-free, lock-free audio engine that spawns detached OS players, layering an ambient score, rain, hard-panned binaural whispers, and synced voice-overs.
  • A live heartbeat that drives the world — the BPM readout isn't decoration; it physically speeds the background metronome, climbing as Turing's interrogation tightens and spiking into arrhythmia on a wrong answer.
  • A decay engine — as the chemical toxicity rises, the text on screen corrupts into glyphs in real time, so you watch the memory being erased.
  • A candle that is the only light source, with a radial light-degradation engine anchored on the flame, guttering from 100% down to a 5% flicker by the final act.
  • A PNG → truecolor half-block renderer for the cinematic portraits.

I used Google's Gemini as a brainstorming partner for the historical framing and act structure. The voice and whisper audio was generated with ElevenLabs (paid plan, commercial license).

Prize Category

Best Ode to Alan Turing. Turing isn't a tribute bolted on at the end — he's the gravity the whole game falls toward, across all three things the category asks for:

  • Mechanics. Act VI is a literal Turing machine: a tape, a moving head, a transition table, and corrupted residues you stabilize until it reaches HALT. You don't read about the Universal Machine — you run one.
  • Narrative. His full arc is the climax: breaking Enigma, the silence of the Official Secrets Act, the trial for "gross indecency," the chemical castration, and his last night. The ending — which I'm keeping out of this post on purpose — recontextualizes the entire descent. It's in the video.
  • Design. Five centuries of computing — Jacquard's cards, Babbage's gears, Lovelace's loops, Boole's logic, Shannon's entropy — are arranged as a pilgrimage that exists to deliver you to Turing's desk, in his birth month, in a jam built around the very turning point his life embodies.

Solo submission — built and designed by Iclal Doğan.

Top comments (1)

Collapse
 
iclaldogan profile image
İclal Doğan

I am waiting for your thoughts and improvement ideas!