project

Neko

A Go reimplementation of the classic desktop cat that chases your cursor, with original sprites, sound, and a transparent window powered by Ebitengine.

1 related articles GitHub

Neko is the cat that chases your cursor across the desktop. The original is from 1989, by Masayuki Koba, and got ported to so many platforms that it’s part of the cultural memory of anyone who used a Mac or X11.

I reimplemented it in Go with Ebitengine. I used nothing from the original code – only the sprites and sounds, which I reused directly. The rest is a rewrite from scratch, with no commitment to matching the exact behavior of the old version.

Neko chasing the cursor
Neko in action

I did it out of nostalgia, but also because I wanted a good example for the Go Study Group with a few real difficulties: a transparent window, animated sprites, global cursor position capture, configurable scaling. Small things you don’t think about until you try to implement them.

The engine underneath is Ebitengine, a Go game library that provides windowing, events, audio, and a render loop without getting in the way. For Neko the fit is exact – nothing more, nothing less.

Runs on macOS, Linux, and Windows. Requires CGO, a dependency Ebitengine pulls in.

export CGO_ENABLED=1
go install github.com/crgimenes/neko@latest
neko -scale 3 -speed 2

Flags: -scale adjusts the cat’s size, -speed how fast it moves, -quiet disables sound, -mousepassthrough lets the cursor pass through Neko’s window when needed.