Simulating Boids in Rust
In 1986, Craig Reynolds developed the boids algorithm to simulate the flocking behavior of birds using just three simple rules: separation, alignment, and cohesion. In this video, I implement it in Rust using the macroquad game library — coming in at around 200 lines of code total. I also add a fourth rule: edge steering, so the boids curve back inward instead of wrapping around the screen. 🐦 GitHub: https://github.com/branchwag/boids Credits: Bird Video by Gaurav Budhiraja: https://www.pexels.com/video/large-flock-of-birds-flying-over-farmland-34990497/ Photo by Denny Müller on Unsplash: https://unsplash.com/photos/logo-JySoEnr-eOg Photo by Scott Greer on Unsplash: https://unsplash.com/photos/cars-are-involved-in-a-frontal-collision-RzVENp1UbRc Photo by Mehdi Sepehri on Unsplash: https://unsplash.com/photos/low-angle-photography-of-flock-of-silhouette-of-bird-illustration-cX0Yxw38cx8
Download
0 formatsNo download links available.