Flocks and crowds are other essential concepts we'll be exploring in this book. Luckily, flocks are very simple to implement, and they add a fairly extraordinary amount of realism to your simulation in just a few lines of code. Crowds can be a bit more complex, but we'll be exploring some of the powerful tools that come bundled with Unity to get the job done. In this chapter, we'll cover the following topics:
The flocking algorithm dates all the way back to the mid-80s. It was first developed by Craig Reynolds, who developed it for its use in films, the most famous adaptation of the technology being the swarm of bats in Batman Returns in 1992, for which he won an Oscar. Since then, the use of the flocking algorithm has expanded beyond the world of film into various fields from games to scientific research. Despite being highly efficient and accurate, the algorithm is also very simple to understand and implement.