Addon for Godot that adds 2D / 3D boids (flocking).
Go to file
2024-09-24 15:42:06 +03:00
addons/boids fix: remove conflict 2024-09-22 02:56:10 +03:00
examples/boids/2d wip 2024-08-30 01:32:01 +03:00
resources docs: add back gif 2024-09-24 15:42:06 +03:00
rust fix: rebuild libraries, fix paths again 2024-09-22 02:54:34 +03:00
.gitattributes wip 2024-08-30 01:32:01 +03:00
.gitignore chore: update gitignore to include libs opened by godot editor 2024-09-22 03:18:25 +03:00
export_presets.cfg feat: yay rust rewrite its faster 2024-08-29 04:51:21 +03:00
LICENSE.txt chore: init 2024-08-19 16:53:54 +03:00
project.godot wip 2024-08-30 01:32:01 +03:00
README.md docs: update readme 2024-09-22 03:21:46 +03:00

boids

addon for Godot that adds 2D / 3D boids (flocking).

boids

it can handle about 2000 boids in a single flock at 11ms physics process tick on my PC (Ryzen 5600). (keep in mind this is without any partitioning of sorts, so it's bound to get better)

usage

download it from the asset library.

or clone the repository (git lfs is needed) and copy over the addons folder into your project root. check the examples for more info.

development

it's just a standard rust project under rust, so make sure you have the latest stable rust toolchain installed. also don't forget to have godot installed and available in your PATH (the extension currently targets 4.3).

  • cargo features
    • enable stats feature to let the extension log into godot console some times for how its processing the boids.

todo

  • memoize calculated distances
  • implement avoidance (point avoidance, edge avoidance)
    • implement nodes for these (for 2d, point and a rect node and 3d point and a cube node, circle / sphere too)
  • implement partitioning (quadtree/octree)
    • do we just use spatialtree crate?
  • write better usage documentation