BACK TO PROJECTS

WEB GAME

Pencil Whiskers

A browser game where you draw shapes in the air with your fingers in front of the webcam to send household threats away from a napping cat.

ROLE
Game Developer
YEAR
2026
TIMELINE
4 days, Nov 16 to 19, 2026
TEAM
Solo project

PROJECT DEMO · 0:23

0:00 / 0:23

01 — OVERVIEW

ABOUT THE PROJECT

Thomas the cat is napping, and household threats creep toward him: a grumpy vacuum, a spray bottle, a cucumber, a thunder cloud, a bathtub. Each one is thinking of a shape. You pinch your thumb and index finger in front of the webcam and draw that shape in the air to send it packing. There is a mouse mode too, and everything runs in the browser with no backend, no accounts and no analytics, so the camera image never leaves your device.

The game is inspired by Thomas, the real pet cat of a woman I love and am courting as I write this. I wanted to make something small and warm for her out of the thing she is fondest of, so the cat on the screen is hers and the whole game is built around keeping him asleep.

Under the hood, a Web Worker runs MediaPipe hand tracking so the 60+ fps render loop never waits on the camera. Pinches are detected with hysteresis (separate on and off thresholds, so the pinch does not flicker) and smoothed with a One Euro filter, and a $1-style template matcher recognizes the shapes, tuned on real recorded camera strokes. The game rules are pure and seeded, so a run can be replayed exactly. All the art and sound are generated in code.

ROLE
Game Developer
CLIENT
Personal
YEAR
2026
DURATION
4 days, Nov 16 to 19, 2026
STATUS
Shipped

02 — FEATURES

KEY FEATURES

  • 01

    Draw in the air

    Pinch thumb and index finger and draw the shape each threat is thinking of. No camera, or prefer a mouse? Hold the button and drag instead.

  • 02

    Shape recognition

    A $1-style template matcher with per-shape rotation and corner rules, tuned on real camera strokes, plus a calibration screen, Teach Thomas my shapes, that learns your own handwriting.

  • 03

    Waves, a boss and power-ups

    Waves of threats get faster, then the Bath Time boss asks for every shape on the tub. Falling gifts are caught by drawing their shape, then spent with a spiral, an infinity loop or an arch.

  • 04

    Private and offline

    Hand tracking runs fully in the browser with the model bundled locally. A service worker caches everything, so after one visit with the camera on it also works offline.

  • 05

    Replayable and tested

    Seeded game rules mean ?seed=123 replays the same game, and the test suite replays real recorded camera strokes through the recognizer.

  • 06

    Hand-made feel

    A solid orange cat on a soft pink background, with the art, particles and sounds all generated in code using Canvas and Web Audio.

03 — GALLERY

SCREENSHOTS

SCREENSHOT 01 · THOMAS NAPPING ON THE TITLE SCREEN
SCREENSHOT 01 · THOMAS NAPPING ON THE TITLE SCREEN01 / 04

04 — TECH USED

BUILT WITH

  • TypeScript
  • Vite
  • MediaPipe
  • Canvas
  • Web Audio
  • Vitest

05 — SOURCE CODE

GITHUB REPOSITORY

github.com/seejjaay/pencil-whiskers

TypeScript + Vite, with MediaPipe hand tracking in a Web Worker. npm install, then npm run dev. Needs desktop Chrome or Edge with a webcam.

  • TypeScript
VIEW ON GITHUB