An emergent flock that swirls, splits at a predator, and re-forms.
Both captures below are real iTerm2 sessions running the demo — the same binary renders at pixel resolution where the terminal speaks the kitty graphics protocol, and as ASCII cells everywhere else.
boids-gfx
A few hundred boids run Reynolds' separation / alignment / cohesion rules; each is an additive glow coloured by heading, drawn into a framebuffer that decays instead of clearing — so the flock trails motion-blur ribbons.
boids
Each boid becomes a directional arrow glyph coloured by speed.
| Key | Action |
|---|---|
| space | scatter the flock |
| mouse click | attractor at the pointer |
| a | toggle a predator |
| c | cycle colour scheme |
| + / - | flock size |
| q / Esc | quit |
Tuning env vars use the BOIDS_* prefix — e.g. BOIDS_MAXDIM=1024 for sharper frames, BOIDS_CELLS=1 to force cell rendering even on kitty terminals. See the overview for the full tuning table.