r/Simulated • • Sep 01 '26

Proprietary Software [OC] 137,500 starlings, each one steering only by its neighbours.

This runs live on an Apple silicon GPU.

Every bird reacts only to the ones near it. Nothing choreographs the shape and nothing is keyframed, so what you are watching falls out of 137,500 of them following local rules at once.

It is a GPU flock on an atomic spatial hash, which keeps neighbour lookups linear instead of quadratic at that count. Each bird steers on a bounded turn rate and banks into its turns, and the banking is what makes the flock flicker as they roll.

Based this on starling literature rather than plain boids, mostly Cavagna's work on scale-free correlations in real flocks and Couzin on spatial sorting. Cool thins is that the same system with one flag flipped runs a bait ball instead: change the attractor from polarised streaming to milling and the sheet becomes a rotating sphere.

Built in Swift and Metal as part of TideGlass, a small Mac app I make where worlds like this run on a second monitor while you work. Happy to answer anything about the sim.

394 Upvotes

23 comments sorted by

View all comments

1

u/Brie9981 Sep 01 '26 edited Sep 02 '26

I could see this leading to tales of dragons