A visually enhanced, interactive boids simulation featuring obstacles, predators, tornadoes, black holes, meteor showers, and more.
Built with vanilla JavaScript, HTML5 Canvas, and CSS.
- Realistic boid flocking with adjustable parameters
- Dynamic obstacles: tornadoes, black holes, meteors, rectangles, circles
- Predator/prey mechanics
- Music synchronization and glow effects
- Chaos and random events
- Interactive controls and live stats
- Clone or download this repository.
- Open
index.htmlin your browser.
No build step required—just open and run!
index.html: Main HTML filecss/style.css: Stylesjs/main.js: Simulation logic and UIjs/boid.js: Boid class and flocking algorithmsjs/obstacle.js: Obstacle logic (tornadoes, black holes, meteors, etc.)js/particle.js: Particle effects (sparkles, smoke, shockwaves)js/vector.js: 2D vector math utilities
- Fork this repo and submit pull requests!
- Add new obstacle types, boid behaviors, or visual effects.
- Improve realism, performance, or UI.
- All contributions are welcome—see
README.mdfor code documentation.
MIT License.
Feel free to use, modify, and share.
Questions or suggestions?
Open an issue or start a discussion!