Pacman - remix from Glenbull project v2

by loucheman
See Code Download Embed
Remix by Loucheman
=================
V 1.0
- more fluid movements
- adding a gameover final
V 2.0
- add "level" functionality
- you can draw your own level
- new block to draw level: 
  Draw wall (cartesian version)
- after level 4, you fight against 2 ghost
- snap to grid improvement (new block to
  do the job)

Original project by Glenbull
=====================
The gameboard consists of a 9 x 9 grid. Some of the elements of the grid are covered by walls. The coordinates for the remaining spaces where the sprite is allowed to travel are recorded in a reporter block named "Path Locations." 

The arrow keys are used to control the sprite. Before moving, the reporter block named "Advance?" is used to check whether the next move location is on the list of valid "Path Locations"

When the game is begun, a series of "Power Pill" clones are placed on all of tthe eligible spaces on the grid. When the Pacman sprite touches a Pill clone, the clone deletes itself. 

The ghost chasing the Pacman checks each of three possible moves (left, right, and forward) to see which ones are valid moves. It then selects the move that will be closest to the Pacman, and repeats the process until it touches the Pacman.

The game ends if the ghost touches the Pacman. If the Pacman successfully eats all of the power pills on the game board without being touched by the ghost, the game restarts for another round.

Created March 14, 2023

Last updated March 18, 2023

Published March 14, 2023