Boids are objects that exhibit flocking behavior based on 3 rules.
- Separation: Avoid collision with others
- Alignment: Align with the average velocity (speed and direction) of the flock
- Cohesion: Move towards the center of mass of the flock
Clone this repository and open index.html
locally to see the boids and mess with the code.
- Add sliders to adjust separation, alignment, and cohesion factors.
- Add sliders to adjust number of boids, visual range, speed limit.
- Make different shaped boids.
- Have the boids land on the bottom of the screen and take off again.
- Allow collisions (maybe one absorbs the other).
- Be able to draw a path for the boids to follow (attraction).
- Be able to draw walls.