Archived

This topic is now archived and is closed to further replies.

PacMan

This topic is 5675 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was playing Gaunlet on the gamecube the other day and was noticing how the enemies always get stuck behind walls and how this was never a problem in PacMan. Can anyone explain how the enemies worked in PacMan? I thought at first, maybe that once you got within a range of the enemies, they started coming after you but now that I think about it, they seem to always head in your direction but never get stuck behind walls. How is this accomplished? Mainly, how do they know which way to turn once they hit a wall and can''t move closer to the PacMan? Is there some sort of pathfinding algorithm for this? Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Original pacman:

1 Ghost heads toward pacman via the shortest route (w/ pathfinding''

1 Ghost heads toward the next junction along pacman''s current path. (Also pathfinding)

1 Ghost tried to prevent you from using the screen wraparound tunnel.

1 Ghost just wandered around randomly (which meant about 1/4 of the time he''d be right in the corner you wanted to go to.)

Of course, not all pacman clones followed the same formula.

Share this post


Link to post
Share on other sites
First of all, the creatures never stop.

Second, they don''t block each other.

Third, there are no real dead ends in the maze.

Sometimes they reverse direction but not often. They just continue to make decisions at each intersection.

In Gauntlet, there was little AI to guide the creatures to the characters except for a simple straight line movement algorithm. If it ran them into a dead end, they didn''t know to back up, AND they block each other.

It''s just a matter of how the gaming mechanic creates an emergence of overall behavior.

Share this post


Link to post
Share on other sites
Hey,

One thing I think needs to be pointed out is that the ghosts only seemed to change direction when they met an intersection. Otherwise the first ghost that just goes directly to where pacman is would eventually have to catch you, but if he only does this pathfinding search when he reaches an intersection it gave the player an actual chance to get away from him, but still made it difficult.

Doolwind

Share this post


Link to post
Share on other sites