DEV Community

Cover image for Bletchley — A Codebreaker Game About Winning the War and Losing the Man
Cristian Rubio
Cristian Rubio

Posted on

Bletchley — A Codebreaker Game About Winning the War and Losing the Man

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

What I Built

Bletchley is a web codebreaking game set at Bletchley Park, 1939–1945. You play as an anonymous codebreaker in Hut 6. Your job: decrypt intercepted Enigma messages by adjusting mechanical rotors before time runs out.

The game spans 4 levels across two cipher types — Caesar and rotor permutation. Early levels introduce the mechanics with a single rotor and generous time. By level 4, you're working with three rotors (two already solved by your colleagues), 90 seconds on the clock, and a hint you have to earn by clicking.

The hint system mirrors a real codebreaking technique: cribs — words known to appear in the plaintext. Players use them as anchors, sweeping the rotor until the word surfaces in the decrypted output. That's exactly how Turing's team worked.

Between each level, the screen goes quiet and a narrative fragment appears. No UI, no score — just text. Together they tell Alan Turing's story in chronological order: his arrival at Bletchley in 1939, breaking Naval Enigma in 1941, the classified silence after the war, and then 1952. The game doesn't end on victory. That's intentional.

Theme connection: The game honors Turing on two registers — the mechanics recreate the known-plaintext attack his team developed, and the narrative tells his full story, including the parts history preferred to forget. June is also Pride Month. That's not incidental.

Video Demo

Note on the video: Due to a dental procedure, I wasn't able to record a voiceover. The narration was AI-generated. The gameplay, code, and everything else in the demo are entirely my own work.

Code

GitHub logo cristianrubioa / bletchley

Web codebreaking game inspired by Alan Turing and the Enigma machine

bletchley — A Turing Tribute

preview

Codebreaking game · June Solstice Game Jam 2026 · Best Ode to Alan Turing


You are a codebreaker at Bletchley Park. Decrypt intercepted messages by adjusting Enigma rotors before time runs out.

4 levels · 2 cipher types · historically accurate cribs

Run locally

npm install && npm run dev
Enter fullscreen mode Exit fullscreen mode

Stack

Phaser 3 · Vite · Tone.js · Vercel




Live: bletchley.crubio.fyi

How I Built It

Stack: Phaser 3 · Vite · Tone.js · Vercel

Cipher engine (src/logic/enigma.js) — built from scratch, no external crypto libraries. Each rotor applies its own independent transformation to a different segment of the message — so solving one rotor doesn't help with the others. Mechanically: Caesar cipher with segmented offsets, and a permutation cipher using 26-element arrays applied in sequence via letter offset. The engine generates ciphertext from plaintext + rotor config at build time via src/logic/levels.js, so no pre-computed values are hardcoded.

Audio — 100% procedural with Tone.js. Rotor click (typewriter synth), background radio static (noise + filter), success chime (sine + envelope), timeout alarm. No audio files bundled — the entire soundscape is generated at runtime.

Scene flow: BootScene → MenuScene → BriefingScene → GameScene → NarrativeScene → (loop) → EndScene

Visual: Dark modern minimalist — deliberately not retro 1940s. JetBrains Mono for ciphertext and rotors, Inter for briefing and narrative. Rotors are circular dials with smooth tween rotation; clicking the upper half increments, lower half decrements.

One decision worth mentioning: The hint system isn't "here's a clue." It surfaces a crib — a word the codebreaker already knows should be in the message. Players instinctively lock onto it and sweep the rotor until it appears in the decrypted output, highlighted green. The mechanic teaches the player something true about how Enigma was actually broken.

Prize Category

Best Ode to Alan Turing

The tribute works on two levels.

Mechanics: Players use the known-plaintext attack (cribs) that Turing's team at Bletchley pioneered. The game isn't just themed around his work — the core interaction models it.

Narrative: The game tells Turing's story honestly, in order, without softening the ending. After solving the final intercept, the player reads what happened in 1952: the arrest, the chemical castration, the revoked clearance. Then 1954: found dead at forty-one. Then the final line.

He saved the world. The game doesn't let you forget what the world did to him in return.

Top comments (0)