An Interactive Boids Simulation
A downloadable game for Windows, macOS, and Linux
Boids in Godot using spatial portioning to optimize nearest neighbor lookups. Find my source code on github!
Controls:
- Mouse Left Click - place a target flag
- Mouse Right Click - clear flags
- Spacebar - toggle controls UI
- Escape - exit
- G - toggle visible grid
- V - toggle glow effect
- R - respawn boids
- Q - reset simulation (factory reset the boids)
What are Boids?
The Boids Algorithm is an emergent flocking simulation. Each boid follows a set of three rules to determine it's behavior. These rules are simple. Each boid detects flock members within a sight radius. Each boid seeks cohesion by targeting the center of the visible flock. Each boid avoids getting too close to other boids. Each boid aligns to the same direction as other flock members. When each of these three vectors (cohesion + avoidance + alignment) are summed together, the boids move as a flock. Even though each individual is unaware of the whole, they move as one.
Status | Released |
Platforms | Windows, macOS, Linux |
Author | SteveTheNinja |
Genre | Simulation |
Made with | Godot |
Tags | 2D, boids, Godot, Open Source |
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
I like how the boids turn back when they reach the edge of the screen. This is a precisely what flocks do when they reach the edge of our flat earth.