| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Pac Man Game - Tutorial 2 - Sense the World and Eat Items

Page history last edited by Steve Sweeney 9 years, 6 months ago

Pac Man Game - Tutorial 2 - Sense the World & Eating

Step 1: Draw a Maze

We need to create a maze to act as a barrier for our main character.  We will create another sprite that acts as the maze.

1. Click on the "Paint New Sprite" icon



2. Use the "zoom out tool" on the drawing program to zoom all the way out.

3. Click the "Rectangle Outline Tool" and draw a border around the world.

step2c

step2b

4. Use the "Rectangle Filled Tool" to draw some barriers to create a maze.

step2d

5. Click "OK" to finish your drawing.

6. Change the name of this new sprite to "Maze"


Step 2: Bounce off the Maze

1. Go back to the "Eater" sprite's scripts.

2. Drag a "When Green Flag Clicked" and a "Forever if" into the scripts field.

step3a

3. Drag a "touching" hexagon from the sensing menu. Select "Maze" from drop down list.

step3b

4. Add a "turn 15 degrees" and change value to "180."  Add a "Move 10 steps" block.

step3c

5. Test your program.  Click the green flag and use the arrow keys to direct your sprite into the wall.  It should bounce and turn around.

 

Pac Man Game - Tutorial 3 - Adding Food - Hiding Sprites

Comments (0)

You don't have permission to comment on this page.