So, I’m still pushing ahead with this dungeon crawl. I’ve got the networking side working happily, and the renderer looks pretty neat. I’ve reached the point where I’ve got my player (or players) running round the random dungeon with monsters (skaven for those interested) coming after the player.
I’m using DJK or A* depending on mood for the path finding. When my player clicks the character moves to the appropriate location. Equally, as my player moves round I have a AI framework that finds light-of-sight from monster to player and causes the monster to choose a path to the player and attempt to follow him/her (eventually to attack).
The problem - my path finding chooses the best path (account for other monsters getting in way optionally). If the monster gets blocked (by other entity or wall) the path is recomputer. The problem is I’m getting the effect of a swarm of monsters approach the player and then sort of lining up on approach.
I’ve been reading about flocking/steering and seems like its the sort of thing I need to push the monsters away from each other. However, I’m finding they get in loops like:
- Monsters move close enough to have steering effect, hence they don’t follow their path perfectly
- Next cycle, monsters are far enough away from each other that steering has no/little effect, they now move along the path as before
- The monsters have now moved back close to their original positions and hence get pushed away from each other again…
and round and round… giving a horrible little jitter.
I started here: http://www.red3d.com/cwr/steer/gdc99/
Does anyone know of any more in depth resources about the subject or knows how to resolve these steering vs pathfinding conflicts.
Kev