DEV Community

Om Shree
Om Shree

Posted on

I Built a Browser Puzzle Game About Alan Turing And It Taught Me Why He Was Unstoppable

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

What I Built

Alan Turing broke Enigma. Saved an estimated 14 million lives. Was chemically castrated by the government he saved. Died at 41. The world kept his name secret for 30 more years.

I wanted to build something that made people feel that — not just read it.

The Imitation Game is a browser puzzle where you do what Turing actually did. Five levels, five real cryptanalytic techniques from Bletchley Park, zero installation required. It runs in your browser as pure HTML, CSS, and JavaScript. The game ends with a typewriter cutscene about what happened to Turing after the war. That part is not comfortable. It shouldn't be.

The June Solstice is a moment of transition — the longest day, the turning point. Turing's entire life was a turning point for humanity. He turned the tide of a war. He turned a mathematical question into a physical machine. And then the world turned on him. This game exists at that intersection: celebration and grief, brilliance and injustice, a man the solstice would have suited perfectly.

Play it here: https://om-shree-0709.github.io/imitation-game/

Video Demo

Youtube Video Link

Code

🔒 THE IMITATION GAME

An interactive browser puzzle celebrating Alan Turing — the father of modern computer science. Five levels. Five real techniques that broke Enigma in World War II.


▶️ PLAY THE GAME

PLAY NOW


🔑 LEVELS

Level Name Real Technique
01 Caesar Cipher Shift-based alphabet substitution
02 Substitution Cipher Frequency analysis of letter patterns
03 Enigma Rotors Logical elimination of rotor settings
04 Crib Dragging Known plaintext attack on Enigma output
05 The Bombe Electromechanical constraint solving

📷 SCREENSHOTS

Level 1 — Caesar Cipher

Level 2 — Substitution Cipher

Level 3 — Enigma Rotors

Level 4 — Crib Dragging


🔑 HOW TO PLAY

  1. Caesar Cipher — Adjust the shift value using the plus and minus buttons until the sliding tape resolves the ciphertext EOHWFKOHB SDUN to BLETCHLEY PARK (Shift of 3).
  2. Substitution Cipher — Decrypt the message by mapping ciphertext letters to their correct plaintext equivalents in the substitution key table, utilizing frequency highlights.
  3. Enigma Rotors — Select the correct rotor configuration combination (T-U-R) from the…

How I Built It

Zero dependencies. That was the first decision. No React, no bundler, no node_modules. Three files: index.html, styles.css, script.js. Anyone can fork and have it live on GitHub Pages in under a minute. For a game about a man who valued elegant systems over complicated ones, shipping a bloated toolchain felt wrong.

I used Google Antigravity throughout the build process — it handled the heavy lifting on game logic generation, level design iteration, and debugging. What would have taken days of trial and error compressed into focused build sessions. The agent understood context across the whole project, which mattered because every level connects to every other level narratively and mechanically.

The five levels each teach a real technique:

1
Level 1 is a sliding alphabet tape — two rows of letters, the bottom sliding left as you increase the shift, with the ciphertext decoding live in real time. I originally built this as a circular SVG rotating wheel. It looked right and broke completely on anything below 900px. The sliding tape is what physical Caesar strips at Bletchley actually looked like. Found that out after scrapping the wheel.

2
Level 2 is frequency analysis. Click any cipher letter and every occurrence highlights across the message. Nobody tells you that the most common letter is probably E. You notice it yourself, or you miss it.

3
Level 3 is Enigma rotor selection. Four combinations, pick one, an electrical signal animation fires through the wiring diagram if correct. The right answer is T-U-R. That's the first three letters of TURING. It's been sitting there from the start.

4
Level 4 is crib dragging — the technique that actually broke Enigma at scale. You drag the word WETTER across a ciphertext. Enigma had one rule it could never violate: a letter cannot encrypt to itself. Every clash position flashes red. One position has zero clashes. The ciphertext here is procedurally generated on every page load using a constraint loop — it guarantees exactly one valid position at index 6. It cannot be hardcoded. Turing's technique worked because of mathematical certainty, not luck.

5
Level 5 is the Bombe. Six dials, six circuit constraints written as vintage diagnostic readouts. Spin until all six LEDs go green. The answer is TURING.

The visual design had one goal: 1941. Aged paper dossier on the left, deep navy terminal workspace on the right, amber text, CRT scanline overlay flickering at 0.15 second intervals. Every color decision went through one filter — does this feel like a wartime workstation or a webpage.

The end cutscene was written before any code existed. Four slides of typewriter text covering the secrecy, the conviction, the pardon, the £50 note. The final line: "He asked one question above all others: can machines think? We are still finding the answer." Everything else was built to earn that sentence.

Prize Category

Best Ode to Alan Turing

Every mechanic in this game is something Turing used or directly built — not inspired by it, not metaphorically related to it, but the actual historical method. Caesar shift, frequency analysis, rotor logic, crib dragging, the Bombe. The narrative doesn't treat him as a symbol. He was a person who was brilliant, who was catastrophically wronged, and who never got to see what his question became. The cutscene is uncomfortable on purpose.

Best Google AI Usage

This game was built using Google Antigravity as the primary development agent. Antigravity handled game logic generation, level mechanic implementation, iterative debugging across all five levels, and the procedural ciphertext generation algorithm for Level 4. The development workflow was fully agentic — describing the desired mechanic or fix, Antigravity implementing it, reviewing the output, iterating. Without it the build timeline would have been 3-4x longer. The tool understood the full project context across sessions, which was essential for keeping five interconnected levels mechanically consistent.

General Winner

The June Solstice is about transition — the longest day, the hinge point of the year. Alan Turing's life and work is the most significant hinge point in the history of computing. This game puts you inside his methods, his logic, and finally his story. Pride Month exists partly because of people like Turing — brilliant people destroyed by the same society they served. Building something that forces you to sit with that, after you've had fun solving puzzles, felt like the right way to mark this particular June.


Turing asked whether machines could think. He never got to see what they became. The least we can do is remember how he thought.

Play it: https://om-shree-0709.github.io/imitation-game/
GitHub: https://github.com/Om-Shree-0709/imitation-game

Top comments (4)

Collapse
 
iclaldogan profile image
İclal Doğan

Hey, it's really good- i like it!

Collapse
 
om_shree_0709 profile image
Om Shree

Thank you Sir!
Glad you liked it

Collapse
 
iclaldogan profile image
İclal Doğan

If I can finish the game in time, I'll compete against you in this Turing section, good luck!

Thread Thread
 
om_shree_0709 profile image
Om Shree

Game on Sir!