Boids Simulation

@vanflux

A fun simulation where little triangles move together like birds or fish.

This simulation shows how simple rules can make entities move in groups, just like flocks of birds.

How it works

  • Cohesion - Boids try to stay close to their neighbors.
  • Alignment - They align with the direction nearby boids are flying.
  • Separation - Boids avoid bumping into each other.
  • Enemy boids - Red enemy boids make others run away from them.
  • Mouse interaction - Click anywhere to make boids avoid your cursor.
  • Wall avoidance - Boids automatically steer away from the walls.