Advertisement

pacman ai

Started by May 28, 2001 08:17 PM
1 comment, last by thuned 23 years, 8 months ago
i''m making pacman. how would i go about doing the ai? here''s what i have rite now: http://thuned.dhs.org/projectxf/pacman/ life is unfair, take advantage of it. UNMB2 - if the link doesn''t work, try clicking it
life is unfair, take advantage of it.UNMB2 - if the link doesn't work, try clicking it :)
Just a small note:
In the original Pacman it was not possible to stop in the middle of an "alley". The Pacman would continue straight ahead until a wall in front of him made him stop. If you pressed a key to turn in a direction of a wall he would not stop, but rather turn that direction in the next intersection he came to.

But, you were talking about the AI of the ghosts I presume.
Take a look at this under the topic "AI in Gameplay"

Here is a small quote:

PacMan had 4 enemies, all of which had their own priorities. One of
the ghosts would follow you where ever you went. One of the ghosts would
try to intercept you by cutting you off at a future juncture or heading
through the tunnel with you. Another one of the ghosts would try head to
the nearest power pellet so you couldn't get it and the last ghost (Blinky)
would just wander around aimlessly.



I'm sure there are better resources about Pacman describing it's AI somewhere on the net...
Finding the above took me less than 2 minutes with www.google.com

Edited by - Dactylos on May 28, 2001 9:42:45 PM
Advertisement
I''m guess what you want is some path-finding algorthims? Once you determine where you want your enemy to go, how do you actually get him to go there?

One way is to make each junction in the maze a node in a graph, with each path from the junction being a path in the graph. It''s then a simple matter of applying one of the fairly standard graph searches to find the best path (e.g. A* or whatever)


War Worlds - A 3D Real-Time Strategy game in development.

This topic is closed to new replies.

Advertisement