

Duck Hunter on a Breadboard
A 60-second score attack on an Arduino Mega and a tiny OLED, five big arcade buttons, and honestly way too much jumper wire
Overview
The original is Tiny Duck Hunt ↗ by Danko, built for a NodeMCU board and written up on Hackaday ↗. Danko shared the code in that thread, so I ported it to a Mega 2560 with my own button circuit and had something playable in an afternoon. It is a 60-second score attack: birds fly across the screen, four buttons move a crosshair, the big red one shoots.
One round in action. The score gets up around 150 before the clock runs out.
The circuit
Everything lives on one breadboard:
- A 0.96 inch OLED screen on I2C, four wires: power, ground, SCK and SDA.
- Four direction buttons on the left in a D-pad layout, one big red shoot button on the right.
- Each button gets a pull-down resistor, so the pin reads low until pressed.
The wiring was the slowest part; five buttons’ worth of crossing jumper wires make the breadboard look messier than it is. When the screen lit up with “DUCK HUNT, Press fire to start!” it felt worth it.
The gameplay
Press fire, wait through the loading bar, and you get 60 seconds. Birds of different sizes fly across the screen, each size worth different points. The score and the clock sit at the top so you can see both fall apart in real time.
In the clip above I mostly camped the crosshair in the middle and spammed fire. There is no dog in this version, so nothing laughs at you when you miss. That alone makes it better than the NES original.
Porting it to Arduino
The original ran on a NodeMCU, an ESP8266 board with 3.3 V logic and dedicated I2C pins. RAM is why I moved it to a Mega and not an Uno: the SSD1306 driver keeps a full 128x64 frame buffer in memory, 1 KB before the game stores anything, and the ATmega2560’s 8 KB of SRAM absorbs that plus the sprites and game state. On a Raspberry Pi a GPU and the OS hand you a framebuffer; here it is a kilobyte of my SRAM, a contrast the embedded classes only half prepared me for.
The display library became Adafruit’s SSD1306 driver ↗ with its GFX ↗ graphics API. The NodeMCU has fixed I2C pins; on the Mega, SDA and SCL live on pins 20 and 21, so the whole bus moved. The OLED took some persuading: the sketch needed the right I2C address, 0x3C or 0x3D depending on the module, and the pull-ups on SDA and SCL needed sorting before the bus would talk.
Then it was about holding the frame rate. The ESP8266 pushes frames from an 80 MHz core; the Mega runs at 16 MHz, a fifth of the speed, and the full-buffer redraw showed it. The bird sprites moved into flash with PROGMEM, and each loop now only rewrites what changed. The game logic carried over as is; the buttons were five digital reads.
I want to build an automated water pump system for my uncle, with the tank level on a small display that reads friendly, not like a debug console. A game loop fighting for frame rate on a 128x64 panel is good training for cheap redraws on a small screen.
Links
- Tiny Duck Hunt on r/arduino ↗, the original by Danko
- Tiny Duck Hunt Looks Like Big Fun ↗, the Hackaday write-up