Pug’s Hunt: A Webcam-Controlled Duck Hunt Built with Hand Tracking
Mar 2026

Pug’s Hunt is a browser game inspired by the classic NES Duck Hunt, controlled entirely through your webcam using hand tracking and facial gestures. Players aim by pointing their finger and shoot by opening their mouth, recreating the physical feel of the original light gun experience directly in the browser.
Play the game:
https://pugshunt.com
Concept
The original NES Duck Hunt relied on a physical light gun aimed at a CRT screen. For this project I wanted to recreate that physical interaction using only a webcam and modern browser APIs.
Instead of tracking a controller, the game tracks the player’s hand position and facial gestures in real time. This allows the browser to translate natural movements into gameplay actions.
Controls:
- Point with your index finger to aim
- Open your mouth to shoot
- Dual mode where two hands can control two guns
Because the input is camera-based, the interaction feels surprisingly close to the arcade experience.
Technical Highlights
Pug’s Hunt runs entirely in the browser and combines several real-time systems:
- Webcam video processing
- Hand tracking for aiming
- Face detection for shooting gestures
- Game logic and rendering running in sync with camera input
The challenge was keeping the interaction responsive while running computer vision models in the browser.
Latency and gesture stability were key factors to make the gameplay feel natural rather than gimmicky.
Technology Stack
The project combines modern web technologies with real-time input processing.
Main technologies used:
- Next.js for the application framework
- Webcam API (getUserMedia) for camera access
- Hand tracking models (MediaPipe style) for gesture recognition
- HTML Canvas for rendering the game scene
- Tailwind CSS for UI styling
The entire game runs client-side in the browser without plugins or downloads.
Features
Compared to the original Duck Hunt, several additional mechanics were added:
- Dual Mode where two hands control two guns
- Two-player mode on a single webcam
- Mobile support so the game can run on phones
- High score tracking
- Retro pixel UI
The dog character is inspired by my own pug, and some of the sounds used in the game come from recordings of my dog Rambo.
Why I Built This
This project started as a weekend experiment to see if it was possible to recreate the feel of the NES Zapper using only a webcam and browser-based computer vision.
It quickly turned into a small but complete browser game that combines:
- computer vision
- real-time gesture detection
- classic arcade gameplay
The result is a playful demonstration of how modern browsers can combine physical interaction and games without additional hardware.


