In this http://www.VideoFort.com After Effects Pac-Man tutorial series VideoFort Jon gives a in depth looks at motion graphics and layering, teaching how to recreate the classic Atari game, Pac-Man. In Pac-Man Part 5 VideoFort Jon gets the ghosts to creep around the game board using masks and keyframing the position and opacity levels. Start out by bringing the “BoardandCharacters.png” into your Game comp. From there you will right click on the layer and choose to Pre Compose it, leaving all attributes in the comp, and name it “Blinky”. Open the “Blinky” pre-comp by double clicking on it, this brings you into the pre-comp. From there you will create a mask, using the Rectangle Tool, around the first red ghost on the left. Duplicate this layer, select the mask layer within, and shift the mask right until the next red ghost is revealed. Once you have the mask where you’d like it, duplicate this layer and continue the process until all the red ghosts are revealed. Notice how the legs of the ghosts are different? Rename the Ghost according to the direction they are looking and the number of legs they have (ex.:L3, R4, U3, D4, etc.) You need to center the Anchor Points for each layer using the pan behind tool. When you have the Anchor Points centered, place and align the layers on top of each other. Repeat this process for the rest of the ghosts.
Now you will go to the game board and start keyframing the position for the ghosts. Once you have the positions keyframed, you will go back into the ghost’s individual pre comps and keyframe the opacity levels for the various layers according to the direction the ghost is headed. You will need to review the directions Pac-Man is headed to do this correctly. After you have done this for each ghost you are finished!