On the Schmovement of Ghost Movement
Waka waka, nerd.
--
To change the direction of a character, press that character's cell multiple times while that character is selected while placing characters.
Waka waka, nerd.
--
To change the direction of a character, press that character's cell multiple times while that character is selected while placing characters.
"Who knew controlling ghosts was so complicated?" The humble Poltergust 3000:
Blinky: The target tile is exactly where Pac-Man is located.
Pinky: The target tile is exactly four tiles in front of Pac-Man, with the exception of when Pac-Man is facing up, in that case the target tile is four tiles up and four tiles to the left of Pac-Man.
Inky: Find the tile two tiles in front of Pac-Man (and like Pinky, if Pac-Man is facing up, go two tiles up and two tiles to the left), this will be point X. Then, find the tile where Blinky is located. Rotate the point where Blinky is located 180° about point X. This is Inky’s target tile.
Clyde: If Clyde is more than eight tiles away from Pac-Man, the target is exactly where Pac-Man is located. Otherwise, The target is at tile 4531 (Marked with an orange C in the reference maze above).
If a target tile (that isn’t Clyde’s) or point X is outside the maze or in the bottom row, change the target to the tile in the maze (or above the bottom row) which is the closest using Manhattan distance, the smallest number of orthogonal (up, left, down, right) steps needed to move between the two points.
Remove all directions which are:
-Within a wall.
-Opposite to where the ghost is facing.
Of any remaining directions, the tiles which you can move to that’s closer to it linearly (using X2 + Y2, where X is the number of tiles left or right from the ghost and Y being the number of tiles up or down from the ghost) is the one the ghost should move to.
If the remaining directions are the same distance away, use the priority order below, the leftmost one being the highest priority.
Up, Left, Down, Right