游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

分享《吃豆人》制作档案第二章:游戏玩法

发布时间:2013-12-11 16:50:24 Tags:,,,,

作者:Jamey Pittman

“最初关于《吃豆人》的构想是为了吸引女性玩家的注意,所以这是一款非常简单且易接近的游戏。我认为这是保持游戏长寿的元素之一。”——《吃豆人》的创造者Toru Iwatani(请点击此处阅读本文第一章、第三章、第四章、第五章

基本要素

《吃豆人》的前提非常简单:使用一个四通操纵杆,玩家引导吃豆人在充满豆子的迷宫中上,下,左,右移动,并吞食这些豆子。迷宫中有四个幽灵在追逐着吃豆 人,想要抓住它并杀死它。玩家的目标是清除迷宫中的所有豆子并避免被幽灵逮住。每一回合,幽灵怪物都会不断从迷宫中间的“怪物栏”中涌出。如果吃豆人被幽 灵逮着了,它便会死掉,而幽灵将回到怪物栏中,在游戏继续前,新的吃豆人将出现在起始点的位置。当迷宫的所有豆子被清除时,游戏面板便会进行重置,新的一 回合将开始。如果吃豆人被幽灵抓住并且没有多余的生命了,那么游戏便会结束。

pac-man(from comcast)

pac-man(from comcast)

迷宫中有244颗豆子,为了前进到下一轮游戏,吃豆人就必须全部吃掉它们。其中的240颗豆子中,每一颗等值于10个点数,而4颗大而闪烁的豆子(游戏邦注:也就是“能量补充剂”)等值于50个点数。如果在每一轮游戏中清除了所有的豆子,玩家便能够获得2600个点数。除了吃豆子,玩家还有两种方法能够提高分数:

第一种方法便是创造逆转形式,将敌人变成自己的猎物。不管何时,当吃豆人吃掉迷宫角落中的一个能量补充剂,幽灵便会转变方向,并在恢复正常之前暂时变成深蓝色。除了变成深蓝色,这时候的它们还很容易受到吃豆人的攻击,并且在有效时间内如果被吃豆人抓住了便能提供给对方额外的分数。当幽灵被吃掉时,它们的眼睛将会回到怪物栏里,并重新回归到追逐吃豆人的行列中。当吃豆人吃掉能量补充剂并抓住第一个幽灵时,他将获得200个点数。玩家基于同一个能量补充剂每抓住一个幽灵所获得的分数都是之前的两倍,就像400,800或1600。如果基于所有的4个能量补充剂而抓到4个幽灵,玩家便能在这些早前的关卡中获取12000个点数。这就说明在前面几轮,也就是幽灵保持蓝色状态几秒钟的情况下获取成功并没有多困难。很快地,当幽灵的“蓝色时间”变成1或2秒时,玩家便很难在时间限制之内抓住所有的幽灵。到第19个关卡,幽灵将不再变成蓝色,并且玩家也不会因为抓住它们而获得额外的分数。

在每一轮提高分数的另一种方法便是吃掉奖励标志(通常都是水果),在每一轮游戏中这些标志会出现在怪物栏下方两次。第一个奖励水果会在玩家清除了70个豆子时出现;第二个则是在玩家清除了170个豆子时出现。每个水果的价值是在100至5000个点数不等,这取决于玩家现在所处的关卡。不管水果何时出现,它停留在屏幕上的时间总是在9至10秒间。额外的持续时间是可变的,并且不是基于模式的使用便能够预测到的。换句话说,在同样的关卡中执行同样的模式两次并不能保证奖励水果每次待在屏幕上的时间。鉴于许多模式的设计目的是在奖励水果出现时尽可能快速地吃掉它们,所以这一情况经常遭到忽视。在最后六轮完成后所使用的标志,加上现在的回合都被呈现在屏幕的最底部(游戏邦注:通常被成为水果计数器或关卡计数器)。

做法

在游戏过程中幽灵带有三种互斥行为模式:追逐,散播和受惊。每一种模式都伴随着不同的目标:

追逐——幽灵在追逐模式中的目标是在迷宫中抓住吃豆人。在追逐吃豆人时,每个幽灵都会呈现出独特的行为,即表现出它们的不同个性:Blinky(红色)具有较强的侵略性,一旦它出现在你后边就很难被动摇。Pinky(粉色)会出现在你前方并切断你的前进方向。Inky(浅蓝色)是最不可预测的。Clyde(橙色)似乎在做着自己的事,并且不会阻挡你的道路。

散播——在散播模式中,幽灵将暂时放弃追逐,并朝着各自的角落前进。这是一种欢迎也是短暂的休战—-但是很快地,它们将再次恢复到追逐模式,并再次开始寻找吃豆人。

受惊——当吃豆人吃掉一个能量补充剂时,幽灵便会进入受惊模式。在早期关卡中,幽灵将全部变成深蓝色(代表这时的它们是很脆弱的),并漫无目的地游荡在迷宫中。而在恢复到之前模式前它们会闪烁一会。

命运的逆转

在所有的三种行为模式中,幽灵都不允许逆转前进方向。如此,它们只能选择朝着当下的方向继续前进或在下一个交叉路口转向另一边。因此,当一个幽灵在迷宫的交叉路口选择了一个前进方向,它便只能继续朝着那条道路前进,直到到达下一个交叉路口。当然了,如果你已经花了一些时间在玩《吃豆人》,你便已经清楚幽灵会在特定时间转变方向。但如果是在它们被禁止转向的情况下它们又是怎么做到的?答案便是:当改变模式时,系统将重新加载幽灵的正常行为,并命令它们朝不同方向前进。不管何时当这种情况发生时,这便指代了它们的行为从一种模式切换到了另一种模式。当系统要求幽灵改变方向时,其模式将从:追逐变成散播,追逐变成受惊,散播变成追逐,散播变成受惊。而在从受惊变成追逐或散播模式时,幽灵的方向则不会发生改变。

当系统要求幽灵转向时,它们并不需要即时改变方向;有些幽灵也许会在转向前继续前进几秒。系统命令转向和幽灵真正做出回应间的延迟是取决于在当前进程中游戏进入下一个游戏砖块所花费的时间。当幽灵进入了一个全新砖块,它将听从转向指令并做出行动。

散播,追逐,重复

基于特定的时间间隔,幽灵会在散播和追逐模式间转变着。当幽灵转向时,我们便能够很清楚地察觉到这些模式的转变。在幽灵无限期地保持追逐模式前,其在每个关卡中会出现4次散播模式。优秀的玩家将利用幽灵不能追逐吃豆人的短暂时刻去清除迷宫中更危险领域的豆子。每当玩家死掉或完成关卡时,散播/追逐计时器将被重置。在关卡的开始或玩家死掉后,从怪物栏中出现的幽灵便已经呈现出第一个散播模式了。

在前4个关卡中,前2个散播将各自持续7秒。而在第5个关卡后,其持续时间将变成5秒。第3个散播模式总是被设置为5秒。在第1个关卡中,第4次散播将持续5秒,但在之后的游戏中将只是1/60秒。当这种情况出现时,幽灵将会转变方向。前两次追逐时间将各自持续20秒。在第1个关卡中,第3次追逐时间是20秒,但在地2个关卡到第4个关卡间将上升到1033秒,而在之后的关卡中更是为1037秒——整整持续17多分钟!如果幽灵进入受惊模式,那么散播和追逐计时器便会暂停。当时间耗尽时,它们将回到之前的模式中,而散播/追逐计时器将再次开启。以下表格便总结了这一信息:

mode(from comcast)

mode(from comcast)

受惊行为

在较早的关卡中,每当吃豆人吃掉角落中的一个能量补充剂时,幽灵便会转向,并暂时进入受惊模式。当幽灵受惊时,它们便会变成深蓝色,并更缓慢地移动着。它们将在迷宫中漫无目的地行走,并在恢复到之前模式前短暂地闪烁白光。当受惊时,幽灵会在交叉路口使用伪随机数生成器选择一个方向。PRNG(PRNG)会生成一个伪随机内存地址去读取最后的几个位数。这些位数会被翻译成受惊幽灵最先尝试的方向。如果选中的方向未被墙挡住,或者是幽灵现在前进方向的反方向,便是可被接受的。否则的话代码将以顺时针方向去处理下一个可能的方向并再次尝试,重复这一测试直到找到一个可行的方向。在每个新关卡中,或者当吃豆人死掉时,PRNG将基于同样的最初种子值进行重置。这将导致受惊的幽灵在执行模式时总是会选择同样的路径。随着关卡的发展,幽灵花费在受惊模式中的时间将不断缩短,直至最终不再变成深蓝色(然而它们仍会转向)。

速度

吃豆人是基于最快速度的80%开始游戏。到第5个关卡时,吃豆人将开始全速前进,直到第21个关卡。那时候,它将放慢速度到90%,并在剩下的游戏中始终保持这一速度。每当吃豆人吃掉一颗普通的豆子,它便会停止移动一帧,放慢10%的进程—-从而让接下来的幽灵能够赶超它。吃掉一个补充剂豆子将让吃豆人停止移动三帧,基于正常速度的幽灵比吃豆人稍微慢一些,直到第21个关卡时它们的速度才开始超过吃豆人。如果幽灵进入一个侧走道,它的速度将被减半。在第1个关卡到第4个关卡间,当幽灵受惊时,其移动速度也会慢于正常速度,而吃豆人仍会加速。下表是每个关卡吃豆人和幽灵的速度数据。

level(from comcast)

level(from comcast)

转弯

吃豆人能够比敌人更快速地导航到迷宫中的转弯。它不需要像幽灵那样等到到达转弯处的中点才开始改变方向(如下图)。相反地,它会在到达转弯处的中心处之前转变一些像素,并在通过时恢复这些像素。在到达中心前转弯处需要一个或多个像素,这是“前转”;在“后转”后也需要一个或多个像素。玩家学会朝着吃豆人的方向不断移动操纵杆,直到它到达了转弯的中心位置,确保每个前转是从与中心间更多像素的位置上开始。这一技巧便是所谓的转弯技巧,也是《吃豆人》玩家最初应该掌握的技巧之一。基于非常成功的前转手法,吃豆人将与紧跟其后的幽灵拉开更远的距离。也许一开始这样小的距离优势看起来没什么大不了,但是连续快速通过多个转弯将有效地摆脱追随者。这是在游戏中更高的关卡中幸存下来的重要手段。

pac-man(from comcast)

pac-man(from comcast)

不管何时当吃豆人做出前转或后转,他的方向都发生了改变,他会开始朝着新方向移动一个像素,有效地加速就像他朝着45度角移动一样。当他到达了新方向路径的中心线时,他会开始只朝着那一方向移动,并且速度也会恢复到之前的水平。尽早进行前转能够为吃豆人创造最大的距离优势。下图呈现的是一个回合可能碰到的4个可能方向中每个前转像素的布局(绿色),中心点像素(黄色)以及后转像素(红色)。每个例子呈现了吃豆人从不同方向进入了同样的四通交叉路口。当从左边进入时,在到达转弯中心前有4个前转像素和4个后转像素。相反地,从右边进入同一个交叉路口的话则是4个前转像素和3个后转像素。从上面和下面进入的话呈现出的是相同属性。对于许多在最早的前转后进行的转弯,吃豆人将成为它在转弯“延迟的”每一像素中的一帧。从根本上来看,如果在到达转弯前能够练好操纵杆的使用技能,你将能够有效地提升自己的速度。

cornering(from comcast)

cornering(from comcast)

在最早的前转中转弯也要求你成功地执行任何模式。模式必须伴随着完美的转弯,因为它会删除人类的不确定元素,就像在吃豆人转弯时那样。如果没有转弯,我们便不可能复制模式作者所创造的每次转弯的具体事件,因此幽灵行为不可预测性的提高是源于吃豆人未在同样的时间出现在同样的砖块上。最受欢迎的模式是那些在小小的输入计时缺陷出现时“牢牢结合在一起”的内容(当从右边接近一个转弯处时将三个像素带离中心而不是四个就是一个计时缺陷)。其它模式(特别是那些在序列后面将吃豆人带向幽灵的模式)倾向于“分解”,除非每个回合都有完美的转弯。在漫长的《吃豆人》回合中,甚至最优秀的玩家也会在快速的转弯系列中犯计时错误,并需要处理任何可能的结果。如此,我们应该始终专注于实现完美的转弯,并警惕源自微妙的计时缺陷所带来的不可预见的幽灵行为。

甜蜜之家

通常被称为幽灵之家或怪物栏,这个迷宫中心被封锁的区域是4个幽灵的领域,而吃豆人不能进入其中。每当玩家完成关卡或吃豆人死掉时,幽灵便会回到这一起始点,也就是在幽灵之家周边—-Blinky总是在上部或外部,而其它3只幽灵则在里面:Inky在左边,Pinky在中间,Clyde在右边。上面的粉色门是幽灵进出房子的通道。一旦幽灵离开了怪物栏,它便不能再次进入,除非被吃豆人逮住了,这样它那空洞的眼睛便会回到屋子里等待重生。在玩家完成关卡或吃豆人死掉之后,Blinky已经在怪物栏外面了,而它唯一能够进入房子中的机会便是被吃豆人逮住,而一旦复苏后它便会立刻调转方向离开。这是基于幽灵之家去了解Blinky的行为,但明确其它3只幽灵何时离开房子则是基于各种变量和条件。剩下的内容将专门分析这一内容。因此下文中任何提到“幽灵”的内容都是关于Pinky,Inky和Clyde,而不包括Blinky。

用于评估幽灵何时离开房子的第一个控制是关于每个幽灵的计数器,即追踪吃豆人吃掉了多少颗豆子。每个幽灵的“豆子计数器”会在关卡开始时重置为0,并只有当幽灵在怪物栏里才能被激活,而在任何特别时间里只有一只幽灵的计数器能够被激活,不管这时候房子里有多少只幽灵。选择激活哪只幽灵的计数器的数序是:Pinky,Inky,最后是Clyde。对于吃豆人吃掉的每颗豆子,房子里优先被激活的幽灵的豆子计数器将加上1。在每个关卡中,每个幽灵的计数器都伴随着一个“豆子限制”。如果优先激活的幽灵到达或超过了豆子限制数,它便会立刻走出房子,而它的豆子计数器也将失效(不会重置)。

Pinky的豆子限制总是被设为0,所以它能在每个关卡开始时立刻出去。在第1个关卡中,Inky的豆子限制为30,Clyde为60。这便导致游戏一开始Pinky便离开了怪物栏,随后激活Inky的豆子计数器。只有在豆子到达30个时它才能离开房子。而当Inky离开时,Clyde的计数器也被激活,并开始计算豆子。当豆子数到达或超过60,他就能离开了。在第2个关卡中,Inky的豆子限制从30变为0,而Clyde则从60变成50。Inky将在游戏开始时立刻走出怪物栏。在第3个关卡以及剩下的游戏中,所有的怪物的豆子限制都为0,都能在关卡一开始便飘出房子。

不管何时丧命,系统都会让幽灵的个体豆子计算器失效,并使用全局豆子计算器去取代它。这一计算器能在其丧命后重置为0,并从那时候开始计算被吃掉的豆子数。房子里的3只幽灵必须等待特殊的计数器告诉自己何时离开。当计数器的值等于7时Pinky便可以离开,而当该值等于17时Inky也能离开。唯一禁用该计数器的方法便是在计数器到达32时不让Clyde离开;否则它将在房子里没有任何幽灵时继续计算豆子数。如果Clyde在适当的时间出现,全局计数器将被重置为0,并失效,而幽灵的个体豆子限制将重新激活并像之前那样决定它们何时能够离开怪物栏。

如果豆子计数器是唯一的控制方法,那么吃豆人只需要早早第停止吃豆子便能让幽灵永远待在房子里不出来了。所以也存在一个单独的计时控制通过追踪从吃豆人开始吃豆子之后过去的时间而处理这种情况。这一计时器始终都运行着,但会在每次豆子被吃掉时重置。每当吃豆人长时间不吃豆子时,计时器便会到达极限,而最先被激活的幽灵便能够立刻离开房子,计时器也将被重置为0。上述所提到的同样的优先次序也是使用这一控制。游戏是从最初4秒的计时器限制开始,但在第5个关卡时这一限制降低到了3秒。

聪明的读者也许已经注意到这一系统中存在一个微妙的漏洞,即有可能导致在吃豆人逮住Pinky,Inky和Clyde时将它们长久地锁在怪物栏里。这其中所包含的的窍门是为了重置全局豆子计数器必须牺牲一条生命,然后确保Clyde在计数器等于32之前离开房子。玩家可以通过避免吃豆子并等待计时器限制将Clyde带出房子而做到这点。当Clyde移向出口,玩家可以再次开始吃豆子,直到至少清除了32颗豆子。现在朝能量补充剂前进并吞食一些幽灵。Blinky将像往常那样立刻离开房子,但是其它3只幽灵将“卡在”房子里,直到吃豆人继续频繁地吃豆子而不再触发控制计时器。为什么会发生这种情况?这里的关键在于全局豆子计数器如何运行—-如果当计数器的值等于32时Clyede已经离开了房子,它便会失效。通过在吃豆人吃掉32颗豆子前将Clyde带出房子,全局豆子计数器将继续计算豆子,直到数值到达32才会失效。现在,当幽灵被吃豆人吞食并回到房子里,它们仍将使用全局豆子计数器去决定是否离开。就像之前所描述的,这一计数器的逻辑只能检查3个数值:7,17,32,一旦超过了这些数值,计数器并不能释放幽灵。唯一能够用于释放幽灵的控制是计时器,但如果玩家频繁地吃豆子的话便能避开它。

最后需要提到的有关怪物栏的内容是如何判断幽灵在离开家后是朝右移动还是朝左。通常情况下当幽灵离开房子后都会朝左移动,但是如果系统在幽灵与房子内改变一次或多次模式的话,幽灵将会朝右移动。

可利用的区域

上图强调的是迷宫中4个特别的“区域”,在那里幽灵的行为受到了某些特定条件的限制,所以可以成为玩家的优势。两个红色区域代表幽灵禁止向上转弯的区域。当幽灵进入这两个区域中的一个时,它便只能从右向左或从左向右移动,直到走出该区域。因此,只有吃豆人能够进入这4个开口朝上的通道。它也将提醒玩家记住幽灵也可以从另一端访问这些通道!在散播和追逐模式时,红色区域的局限性便会呈现出来,而在受惊模式下,红色区域将暂时被忽视,从而让幽灵能够向上移动。粉色区域是在两部分相连接的通道间。就像之前提到的,进入该通道的任何幽灵的速度将立刻变慢,直到离开这里。这种减慢速度的规则只适用于幽灵,吃豆人对此是有免疫力的。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

CHAPTER 2:

Gameplay Details

“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 Basics

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.

Modus Operandi

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):

Frightening Behavior

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.

Speed

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.

Cornering

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


上一篇:

下一篇: