Skip to content

C++ implementation of boids (flocking simulation) with SFML

License

Notifications You must be signed in to change notification settings

EndaHealion/Boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Boids (flocking simulation)

C++ implementation of boids using SFML.

Controls:

  • Left mouse: Adds a boid to the screen at the cursor location.
  • Escape: Closes the window.

What you are looking at:

  • This is a simulation developed by Craig Reynolds which simulates the flocking behaviour of birds.
  • Since every boid in a flock tends to have a similar direction, I gave each boid a colour depending on its direction to try and show the flocks more clearly. Some flocks may flash between two colours. This is because their direction is close between the cut-off point of one colour and the start of the next.
  • The boids can wrap around to the other side of the screen, however the distances used in the calculations do not take this wrapping into account. This means that flocks that partially wrap around to the other side of the screen are essentially broken up into a new flock.

About

C++ implementation of boids (flocking simulation) with SFML

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages