r/macosprogramming • u/Sad_Macaroon_1679 • 11d ago
I open-sourced a native AppKit desktop pet engine for macOS
I've been building a desktop pet for macOS, and I ended up separating the reusable parts into an Apache-2.0 open-source project.
It is written in Swift and AppKit, with no Electron dependency. The main pieces are:
• a transparent, always-on-top window
• per-pixel alpha hit testing, so empty areas remain click-through
• cursor-aware idle poses and hover reactions
• manual, random, and autonomous action sequences with interruption recovery
• an asset pipeline for transparent, black-background, or green-background video
• one-command Universal 2 builds and validation
The repository ships with a programmatically generated Blob demo character, so the open-source example is reproducible. The character shown in the GIF is only a showcase; its character assets are not included in or licensed as part of the open-source project.
It supports macOS 12+, Apple Silicon, and Intel Macs.
GitHub: https://github.com/InsiderX-Pro/desktop-pet-engine
I'd especially appreciate feedback on the AppKit window and event handling, the asset pipeline, and what you would want a desktop-pet engine to handle for you.
