Skip to content

kyuuzou/boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boids 🐦

Version GitHub issues GitHub pull requests GitHub last commit

License: MIT

Description

An experiment with boids in Unity.

Preview

Preview

Why it Exists

Mostly because I wanted to play around with Boids! I keep seeing all of these implementations with all kinds of cool techniques, and finally decided to give it a go myself. The intention of this project is as follows:

  • Implement the three core steering behaviours for Simulated Flocks, as per Craig Reynold's original 1987's Flocks, Herds, and Schools: A Distributed Behavioral Model.
  • Optimise collision detection with dynamic spatial partitioning or equivalent technique.
  • Further optimise collision detection with the DOTS system.
  • Implement remaining behaviours described in the model, such as Simulated Perception, Scripted Flocking and Environmental Obstacle Avoidance.
  • Switch between 2D and 3D.
  • Implement additional interesting behaviours, such as perching, hunger and predators.
  • Move to a multiplayer paradigm where each boid runs its own instance, introducing new interesting variables to the problem, like latency, prediction and rollbacks.

Whether the project ever actually sees all of this happen is a different story, but in the end, even a partial journey is more exciting than no journey at all. Let's see how far it gets!

Version History

  • 0.2.0
    • Neighbours are now calculated via spatial partition.
    • It is now possible to toggle a grid shader, to see how boids are distributed between the cells at any given time.
  • 0.1.0
    • Most settings are now configurable.
    • Added Test Subject mode, to be able to follow a specific boid's decision-making process.
  • 0.0.1
    • Quick and dirty implementation of Collision Avoidance, Velocity Matching and Flock Centering.
    • Ability to toggle between wrapping around a bounding volume or staying within bounds.

Contacting the Author

License

Copyright © 2022 Nelson Rodrigues.
This project is licensed under the MIT License.

Acknowledgments

Thank you @SebLague for the inspiration, without which I'd probably be on my couch right now!

About

An experiment with boids in Unity.

Resources

License

Stars

Watchers

Forks

Packages

No packages published