Skip to main content
gamedev.net
🔒 Locked

PacMan

Started by mr2071 Jun 3, 2002 at 1:35 PM 2 replies 1.8k views
Original Post
mr2071
mr2071
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!
Waverider
Waverider
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.
It's not what you're taught, it's what you learn.
Doolwind
Doolwind
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.