2D customizable boids simulation in JavaScript

GitHub: https://github.com/LelsersLasers/Boids

What are Boids?

Boids refers to a computer simulation developed by Craig Reynolds in 1986 that models the flocking behavior of birds. The term "boids" is a combination of the words "bird" and "oid," meaning "bird-like." The simulation attempts to replicate the collective motion observed in flocks of birds, schools of fish, and other group behaviors in nature.

The Three Rules

In the boids simulation, individual entities, or boids, are governed by three simple rules:

Separation

Boids try to avoid collisions with nearby boids to maintain personal space and prevent overcrowding.

 

Alignment

Boids attempt to align their direction and speed with nearby boids, resulting in a cohesive movement.

Cohesion

Boids are attracted to the center of mass of nearby boids, encouraging them to stay together as a group.


By following these rules, the boids create visually appealing flocking patterns where they move together in a coordinated manner. The simulation can be applied to various scenarios beyond birds, such as simulating the behavior of fish schools, swarming insects, or even crowd dynamics.

Main Resources Used

StatusReleased
CategoryTool
PlatformsHTML5, Windows, macOS, Linux, Android
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorLelsersLasers
GenreSimulation
Tags2D, boids, customizable, javascript, js
Average sessionA few seconds
LanguagesEnglish
InputsKeyboard, Mouse
AccessibilityConfigurable controls, High-contrast, One button, Textless
LinksSource code, GitHub

Download

Download NowName your own price

Click download now to get access to the following files:

Web Build.zip 8.9 kB
Source Code.zip 6.2 MB

Leave a comment

Log in with itch.io to leave a comment.