Press either the WASD keys or the arrow keys to move around. Avoid the ghost! Consume large wafers to put the ghost temporarily into "fleeing mode." Eat all of the wafers on the map to win.
This was developed from Scratch on my days off. I hope for it to serve as a learning guide for advanced students. This code is long, heavily commented, and includes sound options, background music, and 'Big Wafers' that put the ghost into fleeing mode. For an easier project, check out LadyPac Mini. It's not a perfect or faithful clone, but it definitely makes for a good educational project. The ghost's motions are entirely random, and it can choose to move in a new direction at intersections. The main game code begins inside the stage/backdrop. Initialization of all parts of the game is staggered using broadcasted messages. Game controls and animations are set up by broadcasting messages to receivers who are using looping blocks, that then act like coroutines. Pay attention to the difference between 'broadcast' and 'broadcast and wait.' It would be relatively easy to modify the project to have two ghosts by cloning the ghosts and giving them different IDs. This project is inspired by Mrs. PacMan. Mrs. PacMan is the property of Bandai Namco and developer AtGames. #FromScratch #Commented #LookInside #Options #Game #PacMan