Livl-Corporation / livl-pacman

Insane Pac-Man clone from © Livl Corporation 🕹️
MIT License
0 stars 1 forks source link

🔵 Inky CHASE #93

Closed FranckG28 closed 1 year ago

FranckG28 commented 1 year ago

Image

Inky: The light-blue ghost is nicknamed "Inky" and his character is described as one who is bashful. In Japan, he is portrayed as kimagure, meaning "a fickle, moody, or uneven temper". Perhaps not surprisingly, Inky is the least predictable of the ghosts.

Sometimes he chases Pac-Man aggressively like Blinky; other times he jumps ahead of Pac-Man as Pinky would. He might even wander off like Clyde on occasion!

In fact, Inky may be the most dangerous ghost of all due to his erratic behavior. Bashful is not a very good translation of kimagure, and misleads the player to assume Inky will shy away from Pac-Man when he gets close which is not always the case.

Inky: The light-blue ghost is nicknamed "Inky" and his character is described as one who is bashful. In Japan, he is portrayed as kimagure, meaning "a fickle, moody, or uneven temper". Perhaps not surprisingly, Inky is the least predictable of the ghosts.

Sometimes he chases Pac-Man aggressively like Blinky; other times he jumps ahead of Pac-Man as Pinky would. He might even wander off like Clyde on occasion!

In fact, Inky may be the most dangerous ghost of all due to his erratic behavior. Bashful is not a very good translation of kimagure, and misleads the player to assume Inky will shy away from Pac-Man when he gets close which is not always the case.

Image

Inky uses the most complex targeting scheme of the four ghosts in chase mode. He needs Pac-Man's current tile/orientation and Blinky's current tile to calculate his final target. To envision Inky's target, imagine an intermediate offset two tiles away from Pac-Man's tile in the direction Pac-Man is moving (shown as the dashed, green tile in the picture above), then draw a line from Blinky's tile to that offset. Now double the line length by extending the line out just as far again, and you will have Inky's target tile as shown above.

Image

For the same reasons already discussed in Pinky's case, Inky's offset calculation from Pac-Man is two tiles up and two tiles left when Pac-Man is moving up (shown above). The other three orientations have the expected offset of two tiles in the direction Pac-Man is moving.

Inky's targeting logic will keep him away from Pac-Man when Blinky is far away from Pac-Man, but as Blinky draws closer, so will Inky's target tile. This explains why Inky's behavior seems more variable as Pac-Man moves away from Blinky. Like Pinky, Inky's course can often be altered by Pac-Man changing direction or "head-faking". How much or how little effect this will have on Inky's decisions is directly related to where Blinky is at the time.