Codebreaker

Overview

This is an interactive built for MathCity London. MathsCity teach mathematical concepts through interactive learning.

Codebreaker is an electronic version of the classic code breaking game where you try to guess a four colour code. 🔴 🔵 🟡 🟡

You start by selecting easy or hard mode (4 colour or 6 colours). Then a random colour code is decided by the computer. Use the dials to change the colour of each light above. When you're happy press the 🟢 Go! button to submit your guess.

After each guess two numbers are shown. The first is how many lights are the correct colour and in the right position. The second tells you how many are the correct colours but in the wrong position. So if you guess all four correct you will see 4-0. Below is a video of me playing the game (badly).

How it's Made

It is a plywood construction covered in a vinyl wrap for the graphics and then perspex over this for protection. Exposed edges are covered with a rubber strip to complete the retro arcade athestic.

The electrical system has an arduino to control everything and the game is programmed in C++. Each light is a RGB adressable LED with seven segment displays to show the score. The addition of game sounds really makes the play experience more engaging.

The seven segment display had to be custom made as I could not find a suitable off the shelf part. The PCB was designed to fit two large size displays controlled by an i2c I/O expander chip. These fit into a 3D printed housing with red perspex.

The graphics on the side are inspired by blank VHS cassette tape boxes from the eighties/nineties.




One interesting finding whilst having friends play test the game is that it is cooperative. This makes for a really fun play experience as everyone is involved as noone knows the correct sequence.