Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yusdacra/godot_boids

Addon for Godot that adds 2D / 3D boids (flocking). (THIS REPOSITORY IS A MIRROR)
https://github.com/yusdacra/godot_boids

boid boids flock flocking gdext gdextension godot rust

Last synced: about 1 month ago
JSON representation

Addon for Godot that adds 2D / 3D boids (flocking). (THIS REPOSITORY IS A MIRROR)

Awesome Lists containing this project

README

        

# boids

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

![boids](./resources/boids.gif)

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](https://godotengine.org/asset-library/asset/3284).

or clone the repository, and run `rust/package-release.sh` to build the libraries for all supported targets.
(requires [cross](https://github.com/cross-rs/cross))

## 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