I'm a C# veteran who's never done a game before. In an attempt to broaden my horizons, I've started teaching myself basic XNA stuff in an attempt to make a simple 2D maze type game with some typical enemy shooting involved. My question involves pathfinding for multiple enemies.
Consider the quintessential example: Pacman.
When you start a round in Pacman, the ghosts come out of the box and take different seemingly random paths with one exception - they are weighted toward finding the player's current position. I thought I could recalculate each enemy's path every time the player moves to achieve a similar effect, but I don't want the enemies to overlap paths too much, so I need to randomly distort each calculated path to give some degree of uniqueness to the enemy. Is there a standard approach to this?
I guess I could look at it as each enemy itself is an obstacle, and thus no enemy's path could involve a route that would collide with another enemy. In cases where there is no new path that would present a free run to the player, I would have the enemy continue on its existing path until either a workable path is found or a collision alters the current path. This may be enough, but am I simplifying it too much?
