Boids in Godot with Acceleration Structure

2023-09-26

This is my second attempt at boids in godot. Ive implemented an acceleration structure which is a spatial partitioning scheme which optimizes the nearest neighbor lookups. All boid locations are stored in a 2D grid which represents the space. The boids query the structure to the cells in its vicinity. The boids then filter that list based on their view range. This way the boid isnt looping over the entire list of neighbors. Its only concerned with its immediate surroundings. For more information on boids see Craig Reynolds Boids. A more detailed breakdown of Boids with pseudocode can be found here. Click F5 to run the default scene. Controls: left click - place a target flag, right click - clear flags, space - toggle controls UI, escape - exit, G - toggle visible grid, V - toggle glow effect, R - respawn boids, Q - reset simulation (factory reset the boids). Credits: GUI borrowed from RKellns fork of this repo. They added a lot of amazing special effects! Check it out its very cool! This project uses the FarmPuzzleAnimals pack created by CoMiGo.

Link [ https://github.com/kyrick/godot-boids-acceleration-structure ]

Previous Article

Next Article

Boids in Godot with Acceleration Structure

2023-09-26

This is my second attempt at boids in godot. Ive implemented an acceleration structure which is a spatial partitioning scheme which optimizes the nearest neighbor lookups. All boid locations are stored in a 2D grid which represents the space. The boids query the structure to the cells in its vicinity. The boids then filter that list based on their view range. This way the boid isnt looping over the entire list of neighbors. Its only concerned with its immediate surroundings. For more information on boids see Craig Reynolds Boids. A more detailed breakdown of Boids with pseudocode can be found here. Click F5 to run the default scene. Controls: left click - place a target flag, right click - clear flags, space - toggle controls UI, escape - exit, G - toggle visible grid, V - toggle glow effect, R - respawn boids, Q - reset simulation (factory reset the boids). Credits: GUI borrowed from RKellns fork of this repo. They added a lot of amazing special effects! Check it out its very cool! This project uses the FarmPuzzleAnimals pack created by CoMiGo.

Link [ https://github.com/kyrick/godot-boids-acceleration-structure ]

Copyright © 2024 All rights reserved

Rss

Atom