https://github.com/danieldidiobalsamo/boids
Rust boids simulation using Reynolds model running with Bevy engine.
https://github.com/danieldidiobalsamo/boids
artificial-life bevy boids rust simulation
Last synced: 5 days ago
JSON representation
Rust boids simulation using Reynolds model running with Bevy engine.
- Host: GitHub
- URL: https://github.com/danieldidiobalsamo/boids
- Owner: danieldidiobalsamo
- License: gpl-3.0
- Created: 2023-10-26T07:35:02.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-20T13:56:16.000Z (10 months ago)
- Last Synced: 2025-10-02T04:39:02.983Z (7 days ago)
- Topics: artificial-life, bevy, boids, rust, simulation
- Language: Rust
- Homepage: https://crates.io/crates/boids_rs_bevy
- Size: 6.5 MB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
https://github.com/danieldidiobalsamo/boids/assets/79797812/dd61766b-6962-4ac8-957f-da5a2f3b936d
# About
Rust boids simulation using Reynolds model running with Bevy engine.
The following parameters can be updated while the simulation is running:
- turn factor: boids ability to turn fast
- visual range: radius (in px) of the circle in which boids can see
- protected range: radius (in px) of the circle in which boids wants to be alone
- centering factor (cohesion rule) : boids move toward the center of mass of their neighbors
- avoid factor (separation rule): boids move away from other boids that are in protected range
- matching factor (alignment rule): boids try to match the average velocity of boids located in its visual range
- Maximum boids velocity
- Minimum boids velocity
- bias: some boids are searching for food, and are not exactly following the flockWhile all the parameters can be updated live, you can also press 'P' to pause/resume the simulation.
Press 'Q' to leave.# How to launch
## Using cargo (recommended)Install [bevy dependencies](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md) and then just launch:
~~~
cargo install boids_rs_bevy
boids_rs_bevy
~~~## Build manually
Firstly, install [bevy dependencies](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md)
Then clone this repository and launch :
~~~
cargo run --release
~~~Note: if you want to launch as dev, make sure to add the following feature to decrease compilation time :
~~~
cargo run --features bevy/dynamic_linking
~~~