Advertisement

Pac-Man's Ghosts AI

Started by August 29, 1999 04:53 PM
2 comments, last by prauppl 24 years, 8 months ago
___I never programmed a Pac-Clone but in my design I had the ghosts "looking" for the Pacster. It was just a straight access across the matrix until a wall was met. If Pacster was seen the movement would be tracked until he made a corner and the ghost would make the same.
___Also I had ghosts looking "left" and "right" at intersections. If the Pacster was seen then they followed.
___I also considered having the ghosts see each other so they wouldn't follow the same path, but I never could figure out how to do it. (That and it never really hapened in the original)

[This message has been edited by SonicSilcion (edited August 29, 1999).]


Hi,

I am working on a pac-man clone, and the trouble is with the ghost's artificial intelligence. I am really stuck on that. So far, everything except that was a breeze.

I was wondering, does anyone know what algorithm I am looking for? I have read and implemented the A * algorithm, and it basically doesnt work/or I am doing the wrong way (I am pretty sure its the problem is a bug in *my* code).

Anyhow, help is so greatly appreciated and anticipated... anything--a tutorial perhaps, or even a old MS-DOS clone will do. I am looking basically for the AI part of it.

Thanks,
- prauppl

- prauppl
Advertisement
PacMan works on intersections. Each intersection has a number of paths into it, and the ghosts choose which way they will move by which will take them closer to the player.

The ghosts had functions to provide in running down the player. There was an aggressor that would always take the closest path to finding the unit, an interceptor that would try to come from the other direction and box the player in between the agressor and himself. A tunnel interceptor that would stay towards the middle and try to get you coming into tunnels and then a random moving ghost that would kind of randomly bump around.

HTH

-Geoff

I''ve done a Pacman game, I can send you my complete ai in pascal. I have 3 AIs.

This topic is closed to new replies.

Advertisement