Inspiration: I wanted a desktop pet, but I also wanted it to be annoying. There have previously been pets such as bonzi buddy and clippy, which were chaotic and stupid and people loved them. Nothing like that exists anymore because software got "good." I wanted to make software that was bad on purpose.
What it does: lil chungus is a small blue creature that lives on your mac. Most of the time it just chills, walking around the bottom of your screen doing nothing. Then every 30 seconds or so (randomized so you can never predict it), it locks onto your cursor and charges at it. If it catches you, it hijacks your mouse and sticks on it for a bit. Then it walks away satisfied.
How I built it: the tech stack is Swift, AppKit, and SpriteKit. The app runs as a status bar utility with no dock icon. There's a single transparent, borderless, always-on-top window covering the full screen that's click-through, so you can use your computer normally underneath. SpriteKit handles the sprite animation, and a state machine drives the behavior: idle, wander, alert, chase, attack, and satisfied.
Cursor hijacking uses CGWarpMouseCursorPosition, which needs accessibility permissions (which was a challenge to figure out). The sprite sheets are 42x42 pixel frames rendered at 3x with nearest-neighbor filtering to keep the pixel art crisp.
I wrote a relatively detailed spec and built the whole thing with the help of Claude.
Challenges I ran into: The transparent click-through window was very hard to get right. It needs to be non-opaque, clear background, no shadow, click-through, and always on top, and some of those properties fight each other. Getting SpriteKit to render with transparency on top of the desktop took a few tries. Cursor warping also needed some care. Accessibility permissions have to be requested at launch, and if they're denied the app falls back to a visual-only attack instead of crashing.
What's next: Wall walking. lil chungus should be able to walk up the sides of your screen and across the ceiling, with gravity rotating to match whichever edge it's on.
Built With
- appkit
- cgwarpmouseposition
- claude
- sprite-kit
- swift
Log in or sign up for Devpost to join the conversation.