boids

source code

left click and right click to interact with the boids, or just watch their flocking patterns!

double click to cause an explosion.

middle click to toggle this menu.

press space to pause, and use . to advance one frame.

boids

visual settings

boid movement

? turn off all flocking forces, making boids move like particles affected only by noise, drag, and human input.

movement accuracy ? the maximum number of boids in vision that each boid interacts with; higher values can cause lag with more boids.

boid vision

alignment force

alignment bias ? values greater than 1 cause boids to align more with those facing the same direction, while values lower than 1 cause boids to align more with those facing different directions.

cohesion force

separation force

steering force

min speed

max speed

drag

movement randomness

debug info

fps

arrow