week 6

by bohengmu
See Code Download Embed
This is a animation recreation of the pacman game with out any of the game mechanic. This simply demonstrates the movement of Pacman with interatinons with the map, a ghost, and the fruit, with accompying music. 


The pacman is created as a sprite and have a pen down with a wide pen size and the same color as the background. As the packman moves around, it will black out places it has been, creating an effect of it eating the food. If a food is consumed then the consumption music will play. This music is controlled by the eating variable in an infinite loop.

The pacman sprite is moved around the map using the glid command and turn command. Once the pacman reaches the bottom right of the screen the ghost will be released and eventually catches up to pacman. Once this is done the ghost will be hidden and the death animation will start, consisting of 8 sprites and a music.

The eating animation is created by cycling through three sprites at different stages. Once the pacman eats the fruit a special music will play.

Sources
Background: a screenshot of google pacman game
Sprites: http://www.thealmightyguru.com/
Music: https://www.classicgaming.cc/classics/pac-man/sounds

Created February 22, 2023

Last updated February 27, 2023

Shared February 25, 2023