← Back to Games

Donkey Kong DK-52 Game & Watch

Published Last updated

I wanted to see if Codex could turn a photo of my orange, folding Donkey Kong DK-52 from Nintendo’s Game & Watch series into a game other people could play in their browser. The idea was to use the photo itself as the playing surface and make both LCD screens look like the original.

Choose Game A (1) or Game B (2). Press JUMP or Space to start.

On a keyboard, press 1 for Game A or 2 for Game B. Use Space to start and jump, and the arrow keys to move Mario. Press P to pause.

On a phone, tap the buttons on the console just as you would on the original. Choose Game A or Game B, then tap JUMP to start.

From a photo on the table to a game in the browser

I opened the console, laid it on the table and took a photo from above.

The open orange Donkey Kong DK-52 console photographed from above on a light wooden table.
The original photo of the console on the table. Photo: Glenn Meling.

Before building anything, Codex and I looked at how the original worked. We chose MAME, an emulator that recreates the behaviour of the console’s electronics. That meant Nintendo’s original program could still control the jumps, barrels, scoring and sound. We used the original manual as a reference to understand and check how the game behaved. MAME · Original manual

I also took a close-up of each LCD screen. Codex used the photos as references to restore the fixed backgrounds with its built-in image generator. The first attempt looked too much like an illustration. After a couple of rounds, the screens looked closer to the grey-green originals. Codex placed the backgrounds inside the screen openings in the photo. MAME then drew Mario, the barrels and the score on top using two SVG files, one for each screen. DK-52 files on Planet Emulation

Close-up of the upper LCD with blue buildings and red platforms, framed by the orange console.
Upper LCD, original photo.
Restored upper background with clearer blue buildings and red platforms against a grey-green surface.
Upper LCD, restored background used in the game.
Close-up of the lower LCD with red girders and ladders and a burning barrel in the bottom left.
Lower LCD, original photo.
Restored lower background with clearer red girders, ladders and a burning barrel.
Lower LCD, restored background used in the game.

Codex placed invisible touch areas over the buttons in the photo and connected them to the emulator, so you can play by touch or with a mouse. When I tried the game on my phone, the direction buttons were hard to hit. We cropped out the table so the console could appear larger and made the touch areas bigger. Playing with my thumbs still feels a bit fiddly. I think the game works best with a keyboard on a computer.