demo 11 of 17

🐦boids

An emergent flock that swirls, splits at a predator, and re-forms.

Recordings

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.

kitty graphics — 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 in kitty graphics mode
boids — kitty pixel mode
ASCII cells — boids

Each boid becomes a directional arrow glyph coloured by speed.

boids in ASCII cell mode
boids — ASCII cell mode

Controls

KeyAction
spacescatter the flock
mouse clickattractor at the pointer
atoggle a predator
ccycle colour scheme
+ / -flock size
q / Escquit

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.