Maze Game Page 1

Adding Rooms
  1. Add 2 Rooms.  (remember to click >Resources >Create Room)
  2. Change the X and Y settings to 32. 
  3. Click on the settings tab.
  4. Set the room size to 480 by 480. 
Add 3 Sprites: Wall, person, and a target.

To create a Sprite click >Resources  >Create Sprite  >Load Sprite.
As you add each sprite name them.

  • Wall     name = spr wall
  • Person    name = spr person
  • Target     name = spr target

We need to check the size of the wall.

  1. Double click Sprite Wall. 
  2. Click Edit Sprite.
  3. Click  >Transform  >Stretch. 
  4. Make sure both pixels are 32. 
  5. Click Ok.
  6. Click the green checkmark.
  7. Click Ok.
Create 3 objects.  Remember (>Resources  Create Object)

Object Wall

  • Create the first object and name it object wall.
  • Use the picture of the wall sprite. 
  • Make it solid by click the checkmark.

Object Person

  • Name it Object Person.
  • Use the person sprite. 

Object Target

  • Name it Object Target
  • Use the target sprite.
Programming the Object Person for moving

Bring up the window for Object Person.

  1. Add an event for Keyboard Left. 
  2. Go to the control tab. 
  3. Drag the Check Grid button into the actions window. 
  4. Set the X and Y axis to 32. 
  5. Click Ok.
  6. Drag the directional window over to the action window.  Set the direction for left at the speed of 2. 
  7. It should look like this. 

Now do the same thing for going right, up, and down.

How do we make the person stop.

  1. Add event for >Keyboard  >No Key. 
  2. Drag the grid button over. 
  3. Drag the 8 arrow directional button over.  Set the direction for the center button. 
Programming Object Person to not go through walls.

Go to Object Person.

  1. Click Event.
  2. Click Collision.
  3. Set the collision to happen with the wall. 
  4. Drag the direction over to actions. 
  5. Click center arrow for stop. 
  6. Drag over the button that will snap it to a grid. 
  7. Set the grid to 32 by 32.
Programming the Object Target for going to the next level.

Bring up the window for Object Target.

  1. Add an event for collision with Object Person. 
  2. Drag the four actions over. 
Designing a Maze Room

Open up the two windows for the rooms.

  • Place the walls all around to create a maze.
  • Place the person in the maze.
  • Place the target in the maze.

To choose which object to place in the maze go to the objects tab. 

If you click on the diamond you can pick a different object.