[RELEASED] Flock Simulator

Hi guys!

We are glad to announce that our first product, Flock Simulator, is now available at Asset Store.

https://www.assetstore.unity3d.com/#/content/12459

The goal of this project was to implement behaviour of animals like fishes, birds who move in groups (flocks, schools, herds etc.) in Unity 3D.

We decided to implement concepts described by Craig Reynolds in his “Boids” project
http://www.red3d.com/cwr/boids/.

Take a look at the YouTube demonstration at
http://www.youtube.com/watch?v=pWysWFxitos.

Basic Concepts

Flock members (represented by the FlockMember component) are grouped into groups (represented by the FlockGroup component). FlockGroup is a component that should be attached to a dummy game object. Each FlockMember holds a reference to its current FlockGroup.

Properties of a FlockGroup are grouped into four categories that represent steering behaviour of the flock. They are

  • alignment: steer towards the average heading of local flockmates,
  • separation: steer to avoid crowding local flockmates,
  • cohesion: steer to move toward the average position of local flockmates,
  • random: steer randomly.

Tweaking FlockGroup properties can change behaviour of its members entirely. It is recommended to choose the parameters experimentally.

The FlockGroup fills its FlockMembers’ public flockOutput fields that represent where each flock member would like to go according to its herd instinct.

Please note that FlockSimulator components don’t actually move any objects, just express the desire of every flock member to go in a given direction. It’s up to the programmer to use flockOutput to obtain the result that is expected. Wedecided to make it that way to ensure flexibility.

We hope you find it useful. If you have any questions, doubts, don’t hesitate to ask.

threaded?

Seems like it uses the physics engine to move the stuff around… that somewhat puts a limit on how many boids?

Not yet, but we will consider multithreaded option that if there is such need.

Nope, the Flock Simulator doesn’t move stuff around itself. It gives an output (a Vector3 structure) for each boid that tells you where given boid wants to go because of its flock-instinct.

That makes our “plugin” much more flexible – programmer can use the output and move stuff in a way he/she likes (using Unity physics, his own physics, etc.). We also provide example components that move stuff around using the output from Flock Simulator classes.

We decided to make it that way because we were sick of the contrary solutions, e.g. of a NavMeshAgent that moves stuff around. Why, on Earth, does it move things? In our opinion it should be responsible ONLY for (re)computing paths, period. What if you wanted to combine pathfinding with your own movement system? You can’t do that with such NavMeshAgent. KISS, please. :slight_smile:

Therefore, you don’t have a limit for number of boids. The only limit is the performance limit of the device you use.

Needed or your number of boids is limited

Sure. It will be limited even if the code is multithreaded, but the limit will be higher (depending on the hardware).

UPDATE: As of today, you can buy the Flock Simulator for only $20!

https://www.assetstore.unity3d.com/#/content/12459

Is this asset still being maintained? Is this compatible with Unity 2018.1?