Skip to Content

How to Build a Simple Pac-Man Game

For today's program, we are going to build a simple Pac-Man game. Pac-Man was one of the very first arcade games developed around 1980.

For today's program, we are going to build a simple Pac-Man game. Pac-Man was one of the very first arcade games developed around 1980. For our version of Pac-Man we are going to focus on the following programming and problem solving techniques:

 

a. Using Scratch to develop computer objects (also known as Object Oriented Programming classes) that will interact with each other in the game. We will only develop five sprites with scripts for this program (7 in total for the game) but will be using copies of the sprites to make a complete fully interactive video game (inheritance principle). Object Oriented Programming is a complex topic and this program will not use design patterns which are a hallmark of OOP. Your next project, the Marble Roll Game, will start to explore this area however.

 

b. Developing simple animation of characters in the game. Animation code (blocks) will be kept separate from functionality code (blocks) so that sprites can be reused with simple changes to the costumes and minor changes to some variables. This is how computer languages and scripts that are fully object oriented (such as Action Script 3 for Flash or Java) work.

 

 This lesson is designed for intermediate to advanced users of Scratch who have had some experience in working with the software and developing Scratch applications. Basic concepts such as how to create new sprites, where to write scripts, etc. will not be reviewed. The software in this series of lessons only covers creating a single level for this version of Pac-Man, however, the software has been written so that multiple levels are easy to add with simple changes to variables. We will discuss how to do this briefly at the end of the lesson.

 

 

Other Files: 
Comments
Member
Hi Wade, I'm a reference Librarian working in the Australian public library sector. I've been relying on your Pac-Man scripts to help teach local high school kids how to script in Scratch. thanks heaps :). I was wondering however, could you provide me with a few tips to create a new level? any help would be appreciated