Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    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.

    Visit blogHN submissions
    GamesRetro ComputingProgramming
    What HN says

    HN 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.

    Stats for nerds
    18HN people shared it
    4linked in comments
    270story points
    Jun 2022last shared
    2010people per year2022

    Top posts on HN

    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 person · first shared 2010

    What HN people wrote when they linked it

    • JohnBootyJun 2022

      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

    • teh_klevJul 2015

      There's been a few interesting articles posted on HN about Pacman's internals and gameplay:

      http://www.donhodges.com/how_high_can_you_get2.htm

      http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior

      http://home.comcast.net/~jpittman2/pacman/pacmandossier.html#Chapter_5

      You can find the relevant HN discussion by searching HN algolia:

      https://hn.algolia.com/?query=pacman&sort=byPopularity&prefix&page=0&dateRange=all&type=story

    • DeimorzOct 2019

      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

    • LammyJun 2022

      "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

    • maxmcdJan 2019

      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-behavior

    • IzkataMay 2020

      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.

    Related

    Don Hodgesdonhodges.com18 people

    Controlling the Barrels in Donkey Kong

    Don Hodges
    Personal · last shared 2023
    Rodrigo Copetticopetti.org98 people

    Playstation 3 Architecture

    Rodrigo Copetti
    Personal · last shared 2026
    DataGeneticsdatagenetics.com213 people

    Analysis of bank PIN numbers

    DataGenetics
    Personal · last shared 2025
    Red Blob Gamesredblobgames.com199 people

    Hexagonal grids for games

    Red Blob Games
    Personal · last shared 2026
    Jamis Buckweblog.jamisbuck.org110 people

    "Algorithm" is not a four letter word

    Jamis Buck
    Personal · last shared 2026
    Legends of Localizationlegendsoflocalization.com37 people

    Games with Famous Bad Translations into Japanese

    Legends of Localization
    Publication · last shared 2025
    Brian Hayesbit-player.org94 people

    Prime After Prime

    Brian Hayes
    Personal · last shared 2025
    Nicky Casencase.me402 people

    Fireflies

    Nicky Case
    Personal · last shared 2026