This is a dynamic physics demo of a theater exercise I did once and wondered about. Each little disc randomly choose one other disc to be its "enemy" and a different other disc to be its "protector". The disc tries to move itself to put its protector between it and its enemy. But the disc itself is the protector and/or enemy of other discs, which are also constantly moving in an attempt to optimize their own local situation.
It typically coalesces into a state where all the discs are smeared against the boundaries of the arena (as with the exercise in real life), though occasionally a disc may be forced far enough out of equilibrium to send the whole system scattering again.
This was also practice with ECS, inspired by Bob Nystrom's Roguelike Celebration 2018 talk and a tutorial by Austin Morlan.
This was my home page from to .