Hack and slash game AI avoidance and surround

Hello.
I have a few questions that build up on one another about some AI implementation. This is for a game where enemies can come in hordes (up to 30-40 enemies) akin to diablo, torchlight etc.

  1. What would be a good way to force enemies to avoid each other and prevent them from clumping up? I’m guesing rvo?
  2. What’s a good way to prevent enemies from creating a “conga line” near their target and rather, force them to surround said target. This is the hardest part for me.
    Can somewhat handle local avoidance and been progressing with it, but i’m at a loss on how to handle surround. Another thing is, how do I get the player to get around a partial surround? The player moves with mouse clicks, and if I press behind the enemies, the player just tries to go forward.

Bought the pro version of a*, yet i’m still at a loss with local avoidance and practically 95% of the features in it.

1 Like

Had any success? I’m keen to know how to get enemies to surround the player intelligently as well. I’ve decided to use a grid and make enemies aim to be in one of the eight adjacent tiles to the player. I’m making a turn based game though so I can get away with that approach (I think). If the character is constantly moving though, wow, I have no idea (sorry for not being helpful… just want to know if you’ve found anything).

1 Like