Skip to content

Rust implementation of Boids simulation

License

Notifications You must be signed in to change notification settings

hpwxf/rusty-boids

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Boids

This is a 2D boid simulator written in Rust. 🕊

cargo run --release -- -c example-config.toml

Aims:

  • Fast, CPU based simulation.
  • Support as many boids as possible.
  • Render at 60fps on commodity hardware.

This is achieved by using:

  • Approximate "neighbour grid" data structure.
  • Lookup table based FOV culling
  • (In progress) Parameters that expose performance/accuracy tradeoffs to the user.

It also shows how the glutin, gl and cgmath crates can be used together to build a simulation. In particular, it demonstrates the boilerplate needed to do useful work with OpenGL.

A big list of things worth doing or looking into are listed in TODO.md.

Configuring

The simulation parameters can be set via a toml configuration file.

See example-config.toml for an explination of the different parameters.

About

Rust implementation of Boids simulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%