Boids is an algorithm developed by Craig Reynolds in 1986. It aims to emulate the flocking behavior of birds by applying three simple rules: separation, alignment, and cohesion. In this video, we go over the process of building a boids simulation in Unity. The code for this project, and links to any references I used, are available in my GitHub repository.
Code -
Twitter -
GitHub -
Website -
== [ Resources ] ==
Boids by Craig Reynolds -
Ben Eater's Boids Simulation -
Daniel Shiffman's Boids Simulation -
Sebastian Lague's Boids Coding Adventure -
Catlike Coding's Creating a Procedural Mesh Tutorial -
David Zulic's Custom Debug Draw Tutorial for Unity -
== [ Timestamps ] ==
00:00 Boids Explained
00:49 Separation Algorithm
01:16 Separation Code
01:51 Demo 1
02:14 Alignment Algorithm
02:36 Alignment Code
03:10 Demo 2
03:50 Cohesion Algorithm
04:10 Cohesion Code
04:40 Demo 3
05:09 Performance Optimization
06:09 Demo 4
06:44 More Optimizations
07:24 Compute Shaders Code
08:09 Demo 5
== [ Tags ] ==