Crowd collision avoidance
To finalize this chapter, we'll be talking about crowd collision avoidance. The idea of having a lot of characters in the same map is becoming a standard for open world games. But this often brings a problem, collision avoidance:
We have already discovered how advanced pathfinding works, and we know that is a powerful system when developing AI movement. But if we have a lot of characters trying to reach the same position at the same time, it will cause them to collide with each other and they will probably block the path that is needed to reach that destination. As we can see in the preceding screenshot, everything is running smoothly and without any abnormal situation because the characters are following different directions and rarely do they interfere with the others.
But what happens if all the characters try to access the same position at the same time, for example trying to get inside the house. It is only possible for one character at a time to go through the...