《吃豆人》的前提非常简单：使用一个四通操纵杆，玩家引导吃豆人在充满豆子的迷宫中上，下，左，右移动，并吞食这些豆子。迷宫中有四个幽灵在追逐着吃豆 人，想要抓住它并杀死它。玩家的目标是清除迷宫中的所有豆子并避免被幽灵逮住。每一回合，幽灵怪物都会不断从迷宫中间的“怪物栏”中涌出。如果吃豆人被幽 灵逮着了，它便会死掉，而幽灵将回到怪物栏中，在游戏继续前，新的吃豆人将出现在起始点的位置。当迷宫的所有豆子被清除时，游戏面板便会进行重置，新的一 回合将开始。如果吃豆人被幽灵抓住并且没有多余的生命了，那么游戏便会结束。
“As Pac-Man was originally conceived to appeal to women players, it is a very easy and approachable game. I believe that is an ingredient in the longevity of the game.”—Toru Iwatani, creator of Pac-Man
The premise of Pac-Man is delightfully simple: using a four-way joystick, the player guides Pac-Man—up, down, left, and right—through a maze filled with dots for him to gobble up. Four ghost monsters are also in the maze and chase after our hero, trying to capture and kill him. The goal is to clear the maze of dots while avoiding the deadly ghosts. Each round starts with the ghosts in the “monster pen” at the center of the maze, emerging from it to join in the chase. If Pac-Man is captured by a ghost, a life is lost, the ghosts are returned to their pen, and a new Pac-Man is placed at the starting position before play continues. When the maze is cleared of all dots, the board is reset, and a new round begins. If Pac-Man gets caught by a ghost when he has no extra lives, the game is over.
There are 244 dots in the maze, and Pac-Man must eat them all in order to proceed to the next round. The 240 small dots are worth ten points each, and the four large, flashing dots—best known as energizers—are worth 50 points each. This yields a total of 2,600 points for clearing the maze of dots each round. Players have two ways to increase their score beyond what is earned from eating dots:
The first way to increase your score each round is by turning the tables on your enemies by making them your prey. Whenever Pac-Man eats one of the four energizer dots located in the corners of the maze, the ghosts reverse their direction and, in early levels, turn the same shade of blue for a short period of time before returning to normal. While blue, they are vulnerable to Pac-Man and can be gobbled up for extra points providing they are caught before the time expires. After being eaten, a ghost’s eyes will return to the monster pen where it is resurrected, exiting to chase Pac-Man once again. The first ghost captured after an energizer has been eaten is always worth 200 points. Each additional ghost captured from the same energizer will then be worth twice as many points as the one before it—400, 800, and 1,600 points, respectively. If all four ghosts are captured at all four energizers, an additional 12,000 points can be earned on these earlier levels. This should not prove too terribly difficult to achieve for the first few rounds as the ghosts initially remain blue for several seconds. Soon after, however, the ghosts’ “blue time” will get reduced to one or two seconds at the most, making it much more problematic to capture all four before time runs out on these boards. By level 19, the ghosts stop turning blue altogether and can no longer be eaten for additional points.
The second way to increase your score each round is by eating the bonus symbols (commonly known as fruit) that appear directly below the monster pen twice each round for additional points. The first bonus fruit appears after 70 dots have been cleared from the maze; the second one appears after 170 dots are cleared. Each fruit is worth anywhere from 100 to 5,000 points, depending on what level the player is currently on. Whenever a fruit appears, the amount of time it stays on the screen before disappearing is always between nine and ten seconds. The exact duration (i.e., 9.3333 seconds, 10.0 seconds, 9.75 seconds, etc.) is variable and does not become predictable with the use of patterns. In other words, executing the same pattern on the same level twice is no guarantee for how long the bonus fruit will stay onscreen each time. This usually goes unnoticed given that the majority of patterns are designed to eat the bonus fruit as quickly as possible after it has been triggered to appear. The symbols used for the last six rounds completed, plus the current round are also shown along the bottom edge of the screen (often called the fruit counter or level counter). See Table A.1 in the appendices for all bonus fruit and scoring values, per level.
Ghosts have three mutually-exclusive modes of behavior they can be in during play: chase, scatter, and frightened. Each mode has a different objective/goal to be carried out:
CHASE—A ghost’s objective in chase mode is to find and capture Pac-Man by hunting him down through the maze. Each ghost exhibits unique behavior when chasing Pac-Man, giving them their different personalities: Blinky (red) is very aggressive and hard to shake once he gets behind you, Pinky (pink) tends to get in front of you and cut you off, Inky (light blue) is the least predictable of the bunch, and Clyde (orange) seems to do his own thing and stay out of the way.
SCATTER—In scatter mode, the ghosts give up the chase for a few seconds and head for their respective home corners. It is a welcome but brief rest—soon enough, they will revert to chase mode and be after Pac-Man again.
FRIGHTENED—Ghosts enter frightened mode whenever Pac-Man eats one of the four energizers located in the far corners of the maze. During the early levels, the ghosts will all turn dark blue (meaning they are vulnerable) and aimlessly wander the maze for a few seconds. They will flash moments before returning to their previous mode of behavior.
Reversal Of Fortune
In all three modes of behavior, the ghosts are prohibited from reversing their direction of travel. As such, they can only choose between continuing on their current course or turning off to one side or the other at the next intersection. Thus, once a ghost chooses which way to go at a maze intersection, it has no option but to continue forward on that path until the next intersection is reached. Of course, if you’ve spent any time playing Pac-Man, you already know the ghosts will reverse direction at certain times. But how can this be if they are expressly prohibited from doing so on their own? The answer is: when changing modes, the system can override the ghosts’ normal behavior, forcing them to go the opposite way. Whenever this happens, it is a visual indicator of their behavior changing from one mode to another. Ghosts are forced to reverse direction by the system anytime the mode changes from: chase-to-scatter, chase-to-frightened, scatter-to-chase, and scatter-to-frightened. Ghosts do not reverse direction when changing back from frightened to chase or scatter modes.
When the system forces the ghosts to reverse course, they do not necessarily change direction simultaneously; some ghosts may continue forward for a fraction of a second before turning around. The delay between when the system signals a reversal and when a ghost actually responds depends on how long it takes the ghost to enter the next game tile along its present course after the reversal signal is given (more on tiles in Chapter 3). Once the ghost enters a new tile, it will obey the reversal signal and turn around.
Scatter, Chase, Repeat…
Ghosts alternate between scatter and chase modes during gameplay at predetermined intervals. These mode changes are easy to spot as the ghosts reverse direction when they occur. Scatter modes happen four times per level before the ghosts stay in chase mode indefinitely. Good players will take full advantage of the scatter periods by using the brief moment when the ghosts are not chasing Pac-Man to clear dots from the more dangerous areas of the maze. The scatter/chase timer gets reset whenever a life is lost or a level is completed. At the start of a level or after losing a life, ghosts emerge from the ghost pen already in the first of the four scatter modes.
For the first four levels, the first two scatter periods last for seven seconds each. They change to five seconds each for level five and beyond. The third scatter mode is always set to five seconds. The fourth scatter period lasts for five seconds on level one, but then is only 1/60th of a second for the rest of play. When this occurs, it appears as a simple reversal of direction by the ghosts. The first and second chase periods last for 20 seconds each. The third chase period is 20 seconds on level one but then balloons to 1,033 seconds for levels two through four, and 1,037 seconds for all levels beyond—lasting over 17 minutes! If the ghosts enter frightened mode, the scatter/chase timer is paused. When time runs out, they return to the mode they were in before being frightened and the scatter/chase timer resumes. This information is summarized in the following table (all values are in seconds):
Whenever Pac-Man eats one of the four energizer dots located near the corners of the board, the ghosts reverse direction and, on earlier levels, go into frightened mode for a short period of time. When frightened, the ghosts all turn the same shade of dark blue and move more slowly than normal. They wander aimlessly through the maze and flash white briefly as a warning before returning to their previous mode of behavior. Ghosts use a pseudo-random number generator (PRNG) to pick a way to turn at each intersection when frightened. The PRNG generates an pseudo-random memory address to read the last few bits from. These bits are translated into the direction a frightened ghost must first try. If the selected direction is not blocked by a wall or opposite the ghost’s current direction of travel, it is accepted. Otherwise, the code proceeds in a clockwise fashion to the next possible direction and tries again, repeating this test until an acceptable direction is found. The PRNG gets reset with the same intial seed value at the start of each new level and whenever a life is lost. This results in frightened ghosts always choosing the same paths when executing patterns during play. As the levels progress, the time ghosts spend in frightened mode grows shorter until eventually they no longer turn blue at all (they still reverse direction, however). Refer to Table A.1 in the appendices for the frightened time in seconds and number of flashes, per level.
The game starts with Pac-Man at 80% of his maximum speed. By the fifth level, Pac-Man is moving at full speed and will continue to do so until the 21st level. At that point, he slows back down to 90% and holds this speed for the remainder of the game. Every time Pac-Man eats a regular dot, he stops moving for one frame (1/60th of a second), slowing his progress by roughly ten percent—just enough for a following ghost to overtake him. Eating an energizer dot causes Pac-Man to stop moving for three frames. The normal speed maintained by the ghosts is a little slower than Pac-Man’s until the 21st level when they start moving faster than he does. If a ghost enters a side tunnel, however, its speed is cut nearly in half. When frightened, ghosts move at a much slower rate of speed than normal and, for levels one through four, Pac-Man also speeds up. The table below summarizes the speed data for both Pac-Man and the ghosts, per level. This information is also contained in Table A.1 in the appendices.
Pac-Man is able to navigate the turns in the maze faster than his enemies. He does not have to wait until he reaches the middle of a turn to change direction as the ghosts do (see picture below). Instead, he may start turning several pixels before he reaches the center of a turn and for several pixels after passing it. Turns taken one or more pixels before reaching the center are “pre-turns”; turns taken one or more pixels after are “post-turns”. Players learn to consistently move the joystick in the direction Pac-Man should go well before arriving at the center of a turn, ensuring each pre-turn is started as many pixels away from center as possible. This technique is known as cornering and is one of the first skills a new Pac-Man player should master. For every successful pre-turn maneuver, Pac-Man puts a little more distance between himself and any ghosts following close behind. Such a small gain in distance may not seem terribly significant at first, but cornering through a quick series of turns will shake off even the most determined pursuer. It is a vital tool for survival in the higher levels of the game.
Whenever Pac-Man makes a pre-turn or post-turn, his orientation changes, and he starts to move one pixel in his new direction for every pixel traveled in his old direction, effectively doubling his speed as he moves at a 45 degree angle. Once he reaches the centerline of the new direction’s path, he starts moving purely in that direction and his speed returns to normal. The greatest distance advantage is thereby gained by making the earliest pre-turn possible. The illustration below shows the layout of pre-turn pixels (shown in green), center point pixels (shown in yellow), and post-turn pixels (shown in red) for each of the four possible directions a turn can be approached. Each example shows Pac-Man entering the same four-way intersection from a different direction. When entering from the left, there are three pre-turn pixels before the center of the turn, and four post-turn pixels. Conversely, entering the same intersection from the right yields four pre-turn pixels and three post-turn ones. Entering from the top as opposed to the bottom exhibits the same property. For any turn that is made later than the earliest possible pre-turn, Pac-Man will be one frame behind where he would be for every pixel of “lateness” in the turn. Basically, it pays to move the joystick well before reaching a turn to maximize your speed.
Turning at the earliest pre-turns possible is also required to successfully execute most any pattern. Patterns are meant to be played with perfect cornering because it removes the human element of uncertainty as to when Pac-Man will turn. Without cornering, it would be nigh-impossible to reproduce the exact timing of every turn as made by the pattern’s author, thereby increasing the possibility of unpredictable ghost behavior due to Pac-Man not being in the exact same tile at the exact same time anymore. Typically, the most popular patterns have been those that tend to “hold together” well when small input timing flaws occur (turning three pixels away from center instead of four when approaching a turn from the right is a timing flaw, for example). Other patterns—especially those that bring Pac-Man very close to the ghosts late in the sequence—tend to “fall apart” unless every turn is perfectly cornered. During a long Pac-Man session, even the best players will make occasional timing mistakes during a fast series of turns and have to deal with the possible consequences. As such, one should aim for perfect cornering at all times but remain alert for unexpected ghost behavior from subtle input timing flaws creeping into the pattern.
Home Sweet Home
Commonly referred to as the ghost house or monster pen, this cordoned-off area in the center of the maze is the domain of the four ghosts and off-limits to Pac-Man. Whenever a level is completed or a life is lost, the ghosts are returned to their starting positions in and around the ghost house before play continues—Blinky is always located just above and outside, while the other three are placed inside: Inky on the left, Pinky in the middle, and Clyde on the right. The pink door on top is used by the ghosts to enter or exit the house. Once a ghost leaves, however, it cannot reenter unless it is first captured by Pac-Man—then the disembodied eyes can return home to be revived. Since Blinky is already on the outside after a level is completed or a life is lost, the only time he can get inside the ghost house is after Pac-Man captures him, and he immediately turns around to leave once revived. That’s about all there is to know about Blinky’s behavior in terms of the ghost house, but determining when the other three ghosts leave home is an involved process based on several variables and conditions. The rest of this section will deal with them exclusively. Accordingly, any mention of “the ghosts” below refers to Pinky, Inky, and Clyde, but not Blinky.
The first control used to evaluate when the ghosts leave home is a personal counter each ghost retains for tracking the number of dots Pac-Man eats. Each ghost’s “dot counter” is reset to zero when a level begins and can only be active when inside the ghost house, but only one ghost’s counter can be active at any given time regardless of how many ghosts are inside. The order of preference for choosing which ghost’s counter to activate is: Pinky, then Inky, and then Clyde. For every dot Pac-Man eats, the preferred ghost in the house (if any) gets its dot counter increased by one. Each ghost also has a “dot limit” associated with his counter, per level. If the preferred ghost reaches or exceeds his dot limit, it immediately exits the house and its dot counter is deactivated (but not reset). The most-preferred ghost still waiting inside the house (if any) activates its timer at this point and begins counting dots.
Pinky’s dot limit is always set to zero, causing him to leave home immediately when every level begins. For the first level, Inky has a limit of 30 dots, and Clyde has a limit of 60. This results in Pinky exiting immediately which, in turn, activates Inky’s dot counter. His counter must then reach or exceed 30 dots before he can leave the house. Once Inky starts to leave, Clyde’s counter (which is still at zero) is activated and starts counting dots. When his counter reaches or exceeds 60, he may exit. On the second level, Inky’s dot limit is changed from 30 to zero, while Clyde’s is changed from 60 to 50. Inky will exit the house as soon as the level begins from now on. Starting at level three, all the ghosts have a dot limit of zero for the remainder of the game and will leave the ghost house immediately at the start of every level.
Whenever a life is lost, the system disables (but does not reset) the ghosts’ individual dot counters and uses a global dot counter instead. This counter is enabled and reset to zero after a life is lost, counting the number of dots eaten from that point forward. The three ghosts inside the house must wait for this special counter to tell them when to leave. Pinky is released when the counter value is equal to 7 and Inky is released when it equals 17. The only way to deactivate the counter is for Clyde to be inside the house when the counter equals 32; otherwise, it will keep counting dots even after the ghost house is empty. If Clyde is present at the appropriate time, the global counter is reset to zero and deactivated, and the ghosts’ personal dot limits are re-enabled and used as before for determining when to leave the house (including Clyde who is still in the house at this time).
If dot counters were the only control, Pac-Man could simply stop eating dots early on and keep the ghosts trapped inside the house forever. Consequently, a separate timer control was implemented to handle this case by tracking the amount of time elapsed since Pac-Man has last eaten a dot. This timer is always running but gets reset to zero each time a dot is eaten. Anytime Pac-Man avoids eating dots long enough for the timer to reach its limit, the most-preferred ghost waiting in the ghost house (if any) is forced to leave immediately, and the timer is reset to zero. The same order of preference described above is used by this control as well. The game begins with an initial timer limit of four seconds, but lowers to it to three seconds starting with level five.
The more astute reader may have already noticed there is subtle flaw in this system resulting in a way to keep Pinky, Inky, and Clyde inside the ghost house for a very long time after eating them. The trick involves having to sacrifice a life in order to reset and enable the global dot counter, and then making sure Clyde exits the house before that counter is equal to 32. This is accomplished by avoiding eating dots and waiting for the timer limit to force Clyde out. Once Clyde is moving for the exit, start eating dots again until at least 32 dots have been consumed since the life was lost. Now head for an energizer and gobble up some ghosts. Blinky will leave the house immediately as usual, but the other three ghosts will remain “stuck” inside as long as Pac-Man continues eating dots with sufficient frequency as not to trigger the control timer. Why does this happen? The key lies in how the global dot counter works—it cannot be deactivated if Clyde is outside the house when the counter has a value of 32. By letting the timer force Clyde out before 32 dots are eaten, the global dot counter will keep counting dots instead of deactivating when it reaches 32. Now when the ghosts are eaten by Pac-Man and return home, they will still be using the global dot counter to determine when to leave. As previously described, however, this counter’s logic only checks for three values: 7, 17, and 32, and once those numbers are exceeded, the counter has no way to release the ghosts associated with them. The only control left to release the ghosts is the timer which can be easily avoided by eating a dot every so often to reset it. Click on the YouTube video below to see a demonstration of this curious behavior:
The last thing to mention about the ghost house is how to determine whether a ghost will move right or left after exiting the home. Ghosts typically move to the left once they get outside, but if the system changes modes one or more times when a ghost is inside, that ghost will move to the right instead of the left upon leaving the house.
Areas To Exploit
The illustration above highlights four special “zones” in the maze where ghost behavior is limited by certain conditions which can be exploited to the player’s advantage. The two red zones represent the areas where ghosts are forbidden to make upward turns. Once a ghost enters either of these two zones, it may only travel from right-to-left or left-to-right until exiting the area. Thus, only Pac-Man has access to these four, upward-facing tunnel entrances. It will serve the player well to remember the ghosts can still access these tunnels from the other end! The red zone restrictions are enforced during both scatter and chase modes, but in frightened mode the red zones are ignored temporarily, allowing the ghosts to turn upwards if they so choose. The pink zones are in the two halves of the connecting side-tunnel. As mentioned previously, any ghost that enters the tunnel will suffer an immediate speed penalty until leaving the zone. This slow-down rule is always enforced and applies to ghosts only—Pac-Man is immune.（source：comcast）