Gentlemen of Leisure

Go Back   Gentlemen of Leisure > Public Forums > Off-Topic Discussion

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-04-2010, 05:33 AM
Gogan Gogan is offline
Fuse Member
 
Join Date: Dec 2006
Location: California
Posts: 8,405
Understanding Pac-Man Ghost Behavior

I thought this was a pretty awesome article:

http://gameinternals.com/post/207255...ghost-behavior

Quote:
Pinky’s target tile in Chase mode is determined by looking at Pac-Man’s current position and orientation, and selecting the location four tiles straight ahead of Pac-Man. At least, this was the intention, and it works when Pac-Man is facing to the left, down, or right, but when Pac-Man is facing upwards, an overflow error in the game’s code causes Pinky’s target tile to actually be set as four tiles ahead of Pac-Man and four tiles to the left of him.

One important implication of Pinky’s targeting method is that Pac-Man can often win a game of “chicken” with him. Since his target tile is set four tiles in front of Pac-Man, if Pac-Man heads directly towards him, Pinky’s target tile will actually be behind himself once they are less than four tiles apart. This will cause Pinky to choose to take any available turn-off in order to loop back around to his target. Because of this, it is a common strategy to momentarily “fake” back towards Pinky if he starts following closely. This will often send him off in an entirely different direction.
__________________
Gogan :: Ikuya :: Haibane :: Asano :: Kuramori :: Aozaru

Last edited by Gogan; 12-04-2010 at 05:36 AM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.