A falling-sand toy: pour materials and watch them pile and flow.
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.
sand-gfx
A cellular automaton on a grid of materials, updated bottom-up every frame — sand piles at its angle of repose, water and oil level out (and oil floats up through water), embers glow and cool. Filled grains opaque, empty cells transparent over your terminal.
sand
The same grid at half-cell resolution, each material its own glyph and colour.
| Key | Action |
|---|---|
| space | drop a chunk |
| mouse click | pour at the pointer |
| a | clear the field |
| c | cycle material |
| + / - | brush size |
| q / Esc | quit |
Tuning env vars use the SAND_* prefix — e.g. SAND_MAXDIM=1024 for sharper frames, SAND_CELLS=1 to force cell rendering even on kitty terminals. See the overview for the full tuning table.