๐Ÿ  Homeโœจ Features๐ŸŽฎ Modes๐Ÿงฉ Daily Puzzle๐ŸŒˆ Themes & FX๐ŸŽจ Puzzle Editor๐Ÿ† Achievements๐Ÿ’ฌ Supportโœ‰๏ธ Contact๐Ÿ“ Blog โฌ‡๏ธ Download

When you tap SHARE in the Circuit Trace editor, you get back something like this:

CT-D04B5-2Y9G0-C2EGT-V0000-00000-0000B

Thirty characters after the CT- prefix, in six blocks of five. That is a complete puzzle: grid size, every colour pair, every diode and a checksum. Here's how we got there โ€” and why we didn't just stuff a URL into the share sheet.

The problem with URLs

The obvious first instinct is to share a link: circuittrace.app/puzzle?data=.... That works, but it has three annoying failure modes:

  • WhatsApp strips URL parameters. Not always, but often enough. If a preview-scraper rewrites your link, your puzzle data goes with it.
  • No app, no puzzle. If your friend doesn't have Circuit Trace installed, a URL opens a browser instead of the game. They need to install, come back, re-click.
  • URLs look ugly. A 60-character blob with equals signs and percent-encoding isn't something you WhatsApp to your mum.

We wanted a code you could say out loud over the phone if you had to. A code someone could type by hand from a screenshot. A code that would survive copy-paste through five different apps.

Step 1: what's in a puzzle

A Circuit Trace puzzle is a surprisingly small amount of data:

  • Grid size (5ร—5 to 8ร—8) โ†’ 2 bits
  • Number of colour pairs โ†’ 3 bits
  • Up to 5 colour pairs, each a 3-bit colour plus two cell positions โ†’ 5 ร— (3 + 6 + 6) = 75 bits (6 bits is enough to address all 64 cells of an 8ร—8)
  • Number of diodes โ†’ 3 bits
  • Up to 5 diodes, each with colour, direction and position โ†’ 5 ร— (3 + 2 + 6) = 55 bits
  • 8 reserved bits, and a 4-bit checksum to catch typos

Total: exactly 150 bits.

Step 2: Crockford Base32

150 bits รท 5 bits per character = exactly 30 characters. The alphabet matters as much as the length.

Standard Base64 uses A-Z a-z 0-9 + /. Terrible for sharing by voice ("capital B? or lowercase?"), terrible for OCR ("is that a lowercase L or a 1?"), and the + and / characters break in URLs anyway.

We use Crockford Base32 instead. Douglas Crockford's variant is 32 characters chosen specifically to be unambiguous when humans copy them:

  • Uses all uppercase only โ€” no capitalisation confusion
  • Drops I, L, O, and U entirely โ€” removes every character that looks like a digit
  • Decoder accepts I and L as 1, and O as 0 โ€” forgiving if someone mistypes
  • Also accepts lowercase in the decoder โ€” forgiving if someone shout-types or auto-corrects

Net effect: a human can read a code over the phone and the person on the other end types it correctly on the first try.

Step 3: one fixed length for everyday puzzles

Every normal puzzle code has the same length. Unused pair and diode slots are filled with zeros, which is why a code for a small puzzle ends in a run of 0s, like the one above. A fixed length makes a code easy to check at a glance: if a block is missing, you can see it.

Bigger puzzles don't fit in 150 bits: more than five pairs, portals, stars or checkpoints. Those get a second format that only stores what the puzzle uses, so its length depends on the puzzle. The app tells the two apart by length: a normal code is always exactly 30 characters. Every puzzle that fits the original format keeps it, so older versions of the app can still play it. We then insert dashes every 5 characters for readability. Dashes are stripped during decoding; they're purely for human eyes.

Step 4: the CT- prefix

Every code starts with CT-. Not just branding โ€” it's the format marker. If someone copies a Base32 string from somewhere else, the editor can tell immediately it's not a Circuit Trace code and show a helpful error ("that doesn't look like a Circuit Trace puzzle") instead of garbling a decode attempt.

The prefix also lets us scan for codes in the clipboard: when you open the editor's "PLAY SHARED CODE" screen, we peek at the clipboard, and if it starts with CT-, we offer to paste it automatically. One less tap.

Step 5: the checksum

The last character of a normal code is a 4-bit checksum: the 5-bit groups before it, added up. If a character gets mangled during paste, the sum almost always stops matching, and the app shows an error instead of a broken puzzle. The longer format for big puzzles uses a stronger 8-bit checksum.

We don't need cryptographic integrity (nobody's attacking a puzzle code). We just need "did a character get mangled during paste." A simple sum does that for essentially zero cost.

What this means for the player

Zero of this is visible from the outside. The player taps SHARE, pastes a code to a friend, and the friend taps it to play. That one code is the entire user experience.

But every one of those design decisions โ€” Crockford Base32, the fixed length, the CT- prefix, the checksum, the 5-char dash grouping โ€” exists because someone, somewhere, is going to copy that code wrong, or auto-correct it, or dictate it over FaceTime, or screenshot it and OCR it. The point of the format is to not break in any of those cases.

Boring engineering. Visible as the absence of problems.


If you want to see share codes in action โ€” install Circuit Trace, open the Puzzle Editor, and build something.

Try our other apps

Free for Android ยท by Grounded Studio