Hacker News new | past | comments | ask | show | jobs | submit login

IWATANI: The algorithm for the four ghosts who are the enemies of the Pac Man–getting all the movements lined up correctly. It was tricky because the monster movements are quite complex. This is the heart of the game. I wanted each ghostly enemy to have a specific character and its own particular movements, so they weren’t all just chasing after Pac Man in single file, which would have been tiresome and flat. One of them, the red one called Blinky, did chase directly after Pac Man. The second ghost is positioned at a point a few dots in front of Pac Man’s mouth. That is his position. If Pac Man is in the center then Monster A and Monster B are equidistant from him, but each moves independently, almost “sandwiching” him. The other ghosts move more at random. That way they get closer to Pac Man in a natural way.

When a human being is constantly under attack like this, he becomes discouraged. So we developed the wave-patterned attack–attack then disperse; as time goes by the ghosts regroup and attack again. Gradually the peaks and valleys in the curve of the wave become less pronounced so that the ghosts attack more frequently.

I always found the ghosts algorithms fascinating: the pac man dossier has interesting graphical representations of them

https://www.gamasutra.com/view/feature/132330/the_pacman_dos...




I wrote a post specifically about the ghost behavior almost 9 years ago: https://gameinternals.com/understanding-pac-man-ghost-behavi...

There's not really anything in it that the Pac-Man Dossier doesn't cover, but it's more focused and (hopefully) easier to follow for people just interested in that aspect.

The "Retro Game Mechanics Explained" channel did a good video explanation a few months ago too: https://www.youtube.com/watch?v=ataGotQ7ir8




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: