Inspiration
Every cipher in history was a physical object first: Caesar's letter wheel, the Renaissance cipher disk, the three steel rotors of an Enigma machine. Crypto is usually taught as formulas on a whiteboard, and I wanted people to hold the machines instead. In VR your hands can do what codebreakers' hands did: turn a wheel one notch at a time and watch nonsense become a sentence.
What it does
Cipher Hands is a seated, hands-first puzzle game that takes you through five real historical messages in about 10 minutes:
- Rome, 47 BC. Caesar's own shift of three. Turn the wheel and the message becomes VENI VIDI VICI.
- The Rubicon, 49 BC. No hint this time. Find the shift yourself.
- The Senate, 44 BC. Only 26 possible keys, so Caesar is easy to break.
- The Babington Plot, 1586. A keyword cipher on four colour-coded wheels, one per key letter. The key is MARY, and this message sent Mary, Queen of Scots to the block.
- Bay of Biscay, 1941. A rotor-accurate Enigma I (rotors I-II-III, reflector B, including the double-step). The codebook page is torn: G ? Q. You find the middle rotor the way Bletchley Park did, using the crib that U-boat weather reports always began with WETTER.
Each Caesar wheel computes \( c = (p + k) \bmod 26 \), and the keyword cipher gives each letter position its own wheel: \( c_i = (p_i + k_{i \bmod m}) \bmod 26 \). Wheel colours match letter colours on the board, so you can see which wheel controls which letters.
How hands work
- Point at a wheel and it glows amber, so you know it's targeted.
- Pinch and it glows brighter, so you know it's grabbed.
- Turn your hand around the wheel like a dial. It snaps to letter notches when you let go.
- The board decodes live as you turn. When the message is right it turns green, a chime plays, and the next scene begins.
No controllers, no menus, no locomotion. Everything sits within comfortable seated reach, and the scene places itself at the player's eye height.
How I built it
- Meta's Immersive Web SDK (IWSDK) with Three.js, WebXR and an ECS architecture, written in TypeScript and built with Vite. It runs in the Meta Quest Browser with nothing to install.
- Ring letters are drawn on high-resolution canvas textures with anisotropic filtering, so they stay sharp at an angle in the headset.
- The Enigma engine is written from scratch and verified against the standard test vector (AAAAA → BDZGO at AAA).
- I tested with the IWSDK emulator and its automation CLI, which can script an emulated Quest headset with tracked hands. The pinch-and-turn in the demo video is driven that way.
Challenges
- Wrist twist vs. dial. My first version rotated the wheel with the grabbing hand's roll. In practice, twisting your wrist while pinching is awkward and imprecise. I replaced it with a custom pointer-driven dial: the wheel follows the angle of your hand around its centre, then snaps to a letter.
- Readability. Letters on a small rotating ring blurred in VR. I fixed it with 2× texture resolution, anisotropic filtering, a bolder serif and a 2×2 wheel layout.
- Hand models from a CDN. The default hand meshes load from a public CDN, which is blocked on some networks, and the hands disappeared. The game now bundles its own hand models.
What I learned
Hand interaction lives or dies on feedback. A glow on point and a brighter glow on pinch did more for usability than any tutorial text. I also learned that the history sells the puzzle: players care about the shift once they know whose message it is.
What's next
More historical machines (the Jefferson wheel cypher, the Japanese Purple machine), a free-play Enigma sandbox, and a classroom mode that teachers can run straight from a link.
Built With
- github
- hand-tracking
- html5
- immersive-web-sdk
- iwsdk
- javascript
- meta-quest
- three.js
- typescript
- vite
- webxr