jyanar / Boids

An implementation of the Boids program using C++ and the SFML library.
MIT License
33 stars 13 forks source link
boids cpp hacktoberfest sfml simulation

Boids

This project attempts to simulate flocking behavior, through the creation of simple entities called boids (birdoids). Boids, which exist on a two-dimensional plane, function through three simple rules -- alignment, cohesion, and separation.

These three simple rules cause complex behavior to emerge, which is what makes the boid simulation interesting. The algorithm was originally formulated by Craig Reynolds in the 1980s.

Running the simulation

Install SFML (Simple and Fast Multi-Media Library) in order the run the program.

Then cd into the src folder and run make to produce an executable file called boids-sim.

./boids-sim

to run the simulation. Exit with the esc.