The Pac-Man Dossier

Nerd heaven.

In chase mode,
Pinky behaves as he does because he does not target Pac-Man’s tile
directly. Instead, he selects an offset four tiles away from
Pac-Man in the direction Pac-Man is currently moving (with one
exception). The pictures below illustrate the four possible
offsets Pinky will use to determine his target tile based on
Pac-Man’s orientation:



If Pac-Man is
moving left, Pinky’s target tile will be four game tiles to the
left of Pac-Man’s current tile. If Pac-Man is moving right,
Pinky’s tile will be four tiles to the right. If Pac-Man is moving
down, Pinky’s target is four tiles below. Finally, if Pac-Man is
moving up, Pinky’s target tile will be four tiles up and four tiles to the left. This
interesting outcome is due to a subtle error in the logic code
that calculates Pinky’s offset from Pac-Man. This piece of code
works properly for the other three cases but, when Pac-Man is
moving upwards, triggers an overflow bug that mistakenly includes
a left offset equal in distance to the expected up offset (we will
see this same issue in Inky’s logic later). Don Hodges’ website
has an excellent article giving a thorough, code-level analysis of
this bug, including the source code and a proposed fix–click
here
to go there now.

Share
Published by
Dennis G. Jerz

Recent Posts

Representing the Humanities at Accepted Students Day.

Representing the Humanities at Accepted Students Day.

5 hours ago

The daughter opens another show. This weekend only.

The daughter opens another show. This weekend only.

19 hours ago

How to Disagree Academically: Using Graham’s “Disagreement Hierarchy” to organize a college term paper.

How to Disagree Academically: Using Graham's "Disagreement Hierarchy" to organize a college term paper.

23 hours ago

A.I. ‘Completes’ Keith Haring’s Intentionally Unfinished Painting

After learning of his AIDS diagnosis, artist Keith Haring created the work, "Unfinished Painting" (1989),…

1 day ago

Seton Hill students Emily Vohs, Elizabeth Burns, Jake Carnahan-Curcio and Carolyn Jerz in a scene from “Dead Man’s Cell Phone.”

Seton Hill students Emily Vohs, Elizabeth Burns, Jake Carnahan-Curcio and Carolyn Jerz in a scene…

1 day ago

“The Cowherd Who Became a Poet,” by James Baldwin. (Read by Dennis Jerz)

Inspiration can come to those with the humblest heart. Caedmon the Cowherd believed he had…

1 day ago