G

GameInternals

gameinternals.com · Personal blog · on HN since 2010

Explains how classic video games work internally, best known for its breakdown of Pac-Man's four ghost movement algorithms.

What HN saysHN links it as the focused explanation of Pac-Man ghost behavior; commenters note each ghost has its own deterministic targeting and call it surprisingly complex for 1980.
18HN people shared it
14linked it in comments
4stories submitted
270story points
4 years agolast shared
2010people per year2026

Most-shared posts

  1. 1
    Understanding Pac-Man Ghost Behavior
    11 people · 220 points · first shared 2010 · 15 comments on HN
  2. 2
    Understanding Pac-Man Ghost Behavior (2010)
    6 people · 50 points · first shared 2019 · 10 comments on HN
  3. 3
    Homepage
    1 people · first shared 2010

What HN people wrote when they linked it

Deimorz · 2019-10-19
I wrote a post specifically about the ghost behavior almost 9 years ago: https://gameinternals.com/understanding-pac-man-ghost-behavior 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
wahnfrieden · 2010-12-02
That link is down, but you can see the full article at their homepage too: http://gameinternals.com/
JohnBooty · 2022-06-28
They were hard codes paths. Not hard-coded paths, per se. It's more elegant than that. Each ghost has a distinctive deterministic movement algorithm based on Pac-Man's current position - some target the square ahead of him, some target the square behind, etc. That's why they seem so smart; it's like they're trying to surround/flank you. (If this seems underwhelming, I assume you it was a really neat trick back then - the ghosts had a level of personality and cunning not seen before. Combined with the cute, cartoony visual design of the ghosts themselves it was quite something.) http://gameinternals.com/understanding-pac-man-ghost-behavior
Lammy · 2022-06-27
"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." — Toru Iwatani, Pac-Man creator https://gameinternals.com/understanding-pac-man-ghost-behavior
codeulike · 2020-09-27
See also 2010 article about Pac-Man Ghost behaviour, its suprisingly complex for 1980, and each of the four ghosts have slightly different behaviour https://gameinternals.com/understanding-pac-man-ghost-behavior
Izkata · 2020-05-26
Cyan is actually much more complicated than that, it's goal is a combination of Pacman and Red's position: https://gameinternals.com/understanding-pac-man-ghost-behavior Also all of them have "chase" and "flee" modes.
maxmcd · 2019-01-09
So fun. I like the AI logic, if he wants a fun addition he should add more enemies as the score increases and implement something like the pac-man ghost logic so that they all behave differently: http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b…
kodfodrasz · 2017-01-30
I played it a lot as a kid, and only recently learned how complex the ghost behaviours were (compared to what I beleived about them): http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b…
varelse · 2017-01-05
Do these attempts make use of the documented idioscynracies of Ms Pacman? http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b…
danbolt · 2016-01-13
Cool stuff! The game feels really smooth. If you're interested, this article has a cool explanation of the original Pac-Man's ghost logic: http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b…
panic · 2015-10-02
This page: http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b… has even more on Pac-Man ghost behavior (and many fewer ads).
_nullandnull_ · 2015-03-31
Cool but I'm pretty sure someone needs to read up on the algorithms used by the ghosts... http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-b…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close