1000 procedural cats swarming your desktop. They chase your mouse, play together, nap in clusters, and keep their personal space.
View on GitHub
Cats render on top of everything via DirectComposition. Fully click-through -- they never block your work.
Curious cats notice your cursor and chase it. The more curious the personality, the more likely the chase.
Idle cats near each other start playing -- hovering and jittering around their partner with playful energy.
Lazy cats join sleeping neighbors to form cozy nap piles. The lazier the cat, the more it naps.
Energetic cats chase others. Skittish targets flee at high speed. It's a whole ecosystem.
Each cat has laziness, energy, curiosity, and skittishness traits that shape all their decisions.
Data-oriented design. GPU-driven rendering. Zero allocations in the hot path.
The overlay is a borderless always-on-top window with WS_EX_TOOLWINDOW style.
Transparency comes from wgpu's DxgiFromVisual swapchain mode combined with
PreMultiplied alpha compositing via DirectComposition. Each frame clears to fully
transparent and draws all cats with premultiplied alpha blending.
All 1000+ cats are drawn in a single instanced draw call. Each cat is a procedural signed distance field (SDF) with 3 poses -- sitting, walking, and sleeping -- evaluated entirely in the fragment shader. The CPU uploads a 24-byte-per-cat instance buffer each frame.
Simulation runs at a fixed 60Hz timestep with interpolated rendering. A spatial hash grid (128px cells, 1024 buckets) enables O(1) neighbor queries. Cat-to-cat interactions use a two-phase read-then-write pattern with a snapshot cache -- all neighbor lookups are pure array indexing with zero ECS overhead in the hot path.
git clone https://github.com/TrentSterling/catswarm cd catswarm cargo run --release