Press the green flag! Up arrow, down arrow, left arrow, and right arrow to move! pressing either of these directions will change the direction you're facing (this affects Inky and Pinky) PacMan can't die (unless you've enabled death mode). This was made to test recreations of all ghost AI so PacMan doesn't die for testing purposes Press 1 for death mode, press 2 to hide all target indicators Death mode will make it so that if PacMan comes into contact with any of the 4 ghosts, the project comes to a halt. Ghosts will follow PacMan and the ghost's targets are (mostly) based on the position of PacMan! Blinky's target is PacMan's position. Inky's target is PacMan's position plus 20 steps in front of the direction you're facing, unless you're facing up where it is now 20 steps up and to the left. (This original target is represented by the white X) Then, the distance from the target to Blinky's position is rotated 180 degrees on its end. (This target is represented by the blue target.) Pinky's target is PacMan's position plus 40 steps in front of the direction you're facing, unless you're facing up where it is now 40 steps up and to the left. Clyde's target is PacMan's position. However, if Clyde is within a certain range of PacMan, Clyde's target will be at the bottom left corner of the map. A line is drawn between Blinky's position and Inky's target to better understand how Inky's target works.
This game is a bit janky, sorry! There are no walls, so ghosts will continue moving in a direction (prioritizes up, then left, then down, then right) until it is aligned with their target horizontally or vertically, then continue moving in a direction until they're aligned with their target horizontally or vertically. So far, the ghosts do not have scatter, frightened, or eaten modes (except for Clyde, who has scatter mode when too close to PacMan.) Ghost sprites and PacMan sprite from Griffpatch. Walls and new modes for the ghosts are planned to be added soon.