Skip to content

nu1lptr's Blog

Playing Chromatron Again, Twenty Years Later

Play now · free

Chromatron 1–4, in your browser

All four games, no install, phones included. The same engine runs natively on Apple Silicon.

Around 2006, my dad and I played a little puzzle game called Chromatron. You get a few lasers, some mirrors and color filters, and a board of targets that light up when the right color of light reaches them.

The version we played was not Sean Barrett's original, though. It was a Flash port by Hawkpeng79, and it only covered the first Chromatron, split into two Flash games of 25 levels each. That is why, for twenty years, I never knew there were three more.

Recently I wanted to play it again. Sean Barrett's site still has all four Chromatron games up for download, but none of them would open on my Mac. So Claude Code and I brought them back, in three parts:

  1. Reverse engineering the original programs, since there is no source code.
  2. Porting them to one Rust engine that runs natively on Apple Silicon and, as WebAssembly, in any browser.
  3. Redesigning the look, with the classic one kept a switch away.

Claude Code wrote all of the code. I set the direction, made the calls, and played every build. By the next evening I was playing all four games, and the early levels of the first one came back as pure muscle memory.

The trailer. Its puzzles were made new for the video, not taken from the original levels.

# The game in one picture

Diagram: a white laser passes a red filter and turns red, a mirror bounces it onto a target, and a green laser hits the same target, which lights up yellow because red and green light add up to yellow.
Steer colored lasers with mirrors and filters, and mix the light so every target gets exactly its color.

Each level gives you some fixed pieces and a toolbox of movable ones. You drag them onto the grid and turn them in 45° steps. Light mixes the way light does, so red and green make yellow, and a target only lights up when it gets exactly its own color. A level is solved when every target is lit at the same time. Each sequel adds stranger pieces: twisters in Chromatron 2, quad-benders in 3, logic gates and teleporters in 4.

# Reverse engineering

The Mac versions came out in 2003 and 2004, built for PowerPC. Apple moved to Intel in 2006 and kept PowerPC apps running through Rosetta until Mac OS X Lion dropped it in 2011. On an Apple Silicon Mac today, they are icons that refuse to launch.

We set two ground rules. Everything comes from our own reading of the original programs, not from anyone else's port. And no game data goes into the repository: the build reads it from the originals, downloaded from Sean's site and pinned by their SHA-256 hashes.

What we found inside:

We ran Ghidra headless to decompile the PowerPC code into C. Subagents read the output and wrote notes on how each game works, about 6,200 lines in all. Only Chromatron 2 was read against the first game; 3 and 4 were read against 2, by comparing their code with the addresses masked out, so only real changes showed. The decompiler was not always right. It dropped arguments from a system call and turned a byte swap into a meaningless mask, so we checked such spots against the raw disassembly in radare2.

The best check came from the data itself. Every level stores its movable pieces in their solved spots, and the game sweeps them into the toolbox when the level opens. So each level is its own test: all of them win from their stored placement, except Chromatron 1's level 16, whose mirror is stored a little off.

Along the way we found things I would never have known about otherwise:

Lately a project called REA (Reverse Engineer Anything) has been trending on GitHub. It connects coding agents to Ghidra, IDA Pro and Hopper so they can take a program apart and rebuild it. We did not use it; Claude Code drove Ghidra from the command line. But it is the same idea: an old program you can no longer run does not have to be the end of it.

# Porting: one engine, two platforms

Diagram drawn as a Chromatron board: white light from the original PowerPC app passes through Ghidra and Claude Code into the Rust engine, a prism that splits it into a red beam lighting the four Mac apps and a blue beam lighting the browser version. A green beam runs from the browser to me and from me back to Claude Code.
Drawn as a Chromatron board: the original game is the white light, the Rust engine is the prism, and the green beam is me.

This was never only a port from PowerPC to Apple Silicon. The same Rust engine is built twice: as four native apps for Apple Silicon Macs, and as WebAssembly for the browser. It is split into layers:

The browser version is the full game, not a lite edition. The WebAssembly is 252 KB compressed, and the whole page, all four games included, is under 300 KB. Saves and copied solutions keep the original formats, so a solution copied in the browser pastes straight into the Mac app. One small catch on the way: Rust's standard clock panics in the browser, so the shells pass the time in instead.

We worked the way a careful team would: a design first, then plans split into tasks, each built by one Claude subagent and checked by another. The first game was playable on my Mac the same night. All four Mac apps shipped the next evening, and the browser version the morning after that.

# Redesign: a new look

A few days after the first release, we gave the remake a new look built around the light, starting from the style of our trailer. Beams sweep out from their lasers, targets flash as they light up, and pieces lift and turn as you move them. It runs in the browser and in the Mac apps, with a light theme that follows your system.

The classic look is still one switch away, the way I remember it: View ▸ Classic Look on the Mac, Actions ▸ Classic look in the browser.

# Thank you, Sean

Chromatron is Sean Barrett's game. The design, the levels, the graphics and the text are all his, from Silver Spaceship Software, and you can still get the originals from silverspaceship.com/chromatron. Thanks also to Hawkpeng79, whose Flash port is how I found the game in the first place.

Chromatron Remake is an unofficial, independent port. It is not affiliated with or endorsed by Sean Barrett or Silver Spaceship Software. If he would like it taken down, I will take it down.

If you played Chromatron back then too, give it a try. Your hands might remember more than you expect.