Hello everyone, so I have a 2d topdown game, and there are enemies (which are zombies) in it. My game environment is a dungeon, with rooms and corridors, generated procedurally by a
Tilemap. What I want to ask is the title of this question.
My zombie AI has 4 states: Idle, Wander, Approach, and Assault. What I want to talk about is the last 2 states: Approach and Assault. Basically, the zombie will enter Approach State when they feel the player nearby (player enters their detection area), while Assault State is when they really see the player in their FOV. In both these states they will start to approach player, what different is only their speed.
So far I managed to do that by getting simple path from zombie to player, using the
Tilemap's navigation. But that hasn't count how zombies will avoid his fellows to go to his destination.
The link below has similar question, but sadly, it's flocking plus pathfinding. What I want is not flocking, but.. well I'll just describe it by points so it's easier:
- Collision avoidance. What different from regular collision avoidance is that the objects (fellows) are moving. So my zombie AI has to determine direction based on the speed of nearby fellows.
- Intercepting. Consider my zombies as cars, and that it is. If their fellows are slower and blocking their way, I want them to intercept the other fellows, while also considering the speed from the fellows behind them, so no "car accident" happened.
- Separation. This is the part of flocking behaviour, where I want my zombies to have a safe distance from each other.
- Queueing. I also want them to slow down if their path is blocked, but they still can progress towards their destination. Imagine cars in a "traffic jam".
What I want seem to be too many, I apologize for it, especially seeing I'm new in AI. But one can dream, right? :v So I beg everyone to give me a solution to what I want. Thanks in advance :)
The link I mentioned: