3D Flocking

Flocking-3d

The Aim of this project was to teach myself how to use Unity and create larger scale games.

Within the 3D world each colour boid flocks with their own colour but also avoids other colours to avoid collisions.

In the demonstration below there are 3 Flocks each consisting of 250 members. The larger flock sizes would normally cause issues with the speed of the simulation but I have implemented a Spatial Hash system which allows the boids to only interact with those in it's local space reducing the number of calculations needed.

The simulation slows down around 2,500 boids interacting with each other but with more optimisation this number will likely increase.