My crude implimentation of the Boids Algorithm, written in C++ using raylib.
Simulating flocking behaviour seen in birds or fish is surprising only based on 3 simple rules.
Each boid has a position, velocity, acceleration and a radius in which it can see nearby boids.
When this rule is applied, boids try not to crash into one another.
When this rule is applied, boids steer towards the center of mass of all nearby boids.
The rule helps the boids stay aligned with one another, i.e. match velocities (speed and direction) of nearby boids.
Inspired by Sebastian Lague's video on this algorithm.
