A downloadable game for Windows, macOS, and Linux

Download NowName your own price

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. 

Further reading on boids with pseudocode.

Download

Download NowName your own price

Click download now to get access to the following files:

godot-boids-linux.tar 33 MB
godot-boids-mac.zip 25 MB
godot-boids-windows.zip 12 MB

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.