Skip to content

FuriousSnail331/boids

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boids

Winter of Open Source

made-with-javascript Winter of Open Source

Boids is an interactive browser-based flocking simulation that demonstrates emergent behavior from simple rules. Watch as individual agents (boids) interact with their neighbors using separation, alignment, and cohesion rules to create realistic, organic group movement patterns.

LIVE DEMO

This project is part of Winter of Open Source, where contributors can improve simulations, add new features, optimize performance, and enhance the overall project.

Demo

How It Works

The simulation is based on three core flocking behaviors:

  1. Separation: Boids steer to avoid crowding local flockmates
  2. Alignment: Boids steer towards the average heading of local flockmates
  3. Cohesion: Boids steer to move towards the average location of local flockmates

Each behavior contributes a steering force weighted by configurable parameters, allowing you to fine-tune the simulation dynamics.

In order to understand how things work under the hood, read EXPLANATION.md.

Table of Contents

  1. Quick Start
  2. How to Contribute
  3. Code of Conduct
  4. References

Quick Start

  1. Clone the repository:
git clone https://github.com/datavorous/boids.git
cd boids
  1. Open index.html in your web browser (or use a local server):
# option 1: python 3
python3 -m http.server 8000

# option 2: node.js
npx http-server

# option 3: JUST OPEN THE index.html IN YOUR BROWSER!
  1. Navigate to http://localhost:8000 in your browser

How to Contribute

Please follow CONTRIBUTING.md for step-by-step guidance on:

  1. Setting up your development environment
  2. Understanding the codebase structure
  3. Making improvements and submitting PRs
  4. Code style and best practices
  5. Testing your changes

Code of Conduct

Please follow CODE_OF_CONDUCT.md to ensure a welcoming and productive environment for all contributors.

References

  1. Boids Algorithm (Wikipedia)
  2. Steering Behaviors for Autonomous Characters
  3. Craig Reynolds' Original Paper

About

A lightweight boids simulation showcasing emergent flocking behavior

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 91.1%
  • HTML 8.9%