Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 30

Maze Game

Requirements for Maze Game


1. Character moves using arrow keys.
2. Character collects Treasures for points.
3. Door is created to move from room to room
4. Points and Lives are displayed and are reduced when your character hits a monster
5. Character gain more lives by picking up hearts.
6. 10 or more Progressively Harder Levels are created.
7. Character can shoot to kill monsters.
8. 5 monsters that have different actions are created.
9. Game info page is created with movements, objectives, monster manual and levels.
10. End boss monster is created that can shoot and move and has health.

Extra credit

1. Character can drop Bombs


2. Movable blocks that fill holes are created.
3. Character can become invincible for a short time.
4. Key to open locked doors
5. Monster Generators
6. Monster that chases you avoiding walls
7. Monster that comes alive when it gets close to you
8. Bonus levels are created.
9. Click here for extra Credit

Directions for Maze Game


Steps

1. Open Game Maker

2. Add Sprites for walls, character and diamonds.

● Click on Add Sprite Icon


● click load sprite and find the wall sprite.
● Name the sprite wall.
● Repeat this process for your character and diamond.

3. Create your wall, character and diamond objects

● Click on the Create Object Icon


● Select the wall sprite and name the object wall
● Repeat this process for you character and diamond

Note: the wall object needs to have solid checked

4. Create first room

● Right click on the Rooms folder and select Create Room.


● Change the Snap x and Snap y to 32 since we are using 32x32 sprites for our game.
● Select the wall object and draw a perimeter wall around your room.
● Select your character object and place it in your room.
How to Make your Character Move
5. Make your character move

● Go to your characters object


● Add a Keyboard event for Left, Right, Up and Down
● Drag the Move Fixed into the actions
● Select the correct direction that corresponds to your keyboard event
● Select speed of 5 and make sure relative is NOT checked
● Add a No Key Keyboard event
● Drag in Move Fixed and select the middle no movement action. This will allow your
character to stop when no key is pressed.

6. Add character to room and test game

● Double click on your first room to open it.


● Add your character to your room
● Click on the Run the Game button to test character movement
● Press escape to exit the game

7. Character moves through walls

● Now you need to stop your character from being able to walk through walls
● Open your character object
● Add a Collision Event with the wall

● Add a Move fixed action and select stop

How to Make a Door


8. Create door to go to next room

● Find a door sprite.


● Create a door object
● Now go back to your persons object give it a collision event with your door.
● Drag a check next room action into collision event then a "Go to next room action"
● Place the door in your first room

9. Create a 2nd room

● Right click on your first room and select duplicate.


● Modify room 2 by adding more walls.
● Test game to see if you can get to room two by reaching door.

How to Collect Treasure for Points


10. Collect Treasure to gain points
● Open room 2 and place a diamond in it
● Open your character object and add a collision event with the diamond.
● Drag the Set score action into the collision event give it 100 points and check relative.
By checking relative the 100 points are added to the point total
● Drag the destroy Instance into the collision event and select other so the diamond will
disappear once your character collides with it
● Repeat this collision event for all the different types of objects you wish to collect for
points.

How to Display Points and Lives


11. Add start controller to set points and lives

● First we will make a start controller name it start


● Right click on the create object button
● Give it no sprite
● Add a Create event

● Give the create event the following 3 actions


● Set score to 0 don't check relative

● Set score caption and show score, show lives and don't show health

● Set lives to 3 don't check relative

● Add this controller to your first room only.

13. Display points and lives

● Open your character


● Add a event

No More lives
● Add these actions
● Show High Score

● Restart Game
How to Increase Lives
14. Make your character increase lives by collecting hearts

● Create an Object with a heart sprite.


● Go to your persons object and add a collision event with the heart object.
● Drag the Set lives action into the collision event and give it a value of 1 check relative.
● Drag a destroy instance of other into the collision event.

How to Make Rooms


15. Make 10 or more progressively harder rooms
● Make 10 levels start very simple with only a door in the first room.
● Room 2 will introduce 1 treasure.
● Room 3 will have a monster.
● Continue to design rooms with more and more challenges and rewards.
● Name each room by going to the settings tab in your room
● Add a name and a caption that describes your rooms
● You can change the background of each room if you like.

Hint: Once you make one room you can duplicate it by right clicking on your room and select
Duplicate. This will save time since you won't have to redraw the perimeter walls of your
rooms or put in your controller, door or character.

You can make rooms larger by going to the settings tab and changing the height and width.

Room Backgrounds

16. Room design is next. We will start with a background. A background is used as the
ground you walk on. So you need to decide if you want a desert, grassland, mountains, ice or
whatever. I have several to choose from here.

Earth Grass Sand Stone Mist

1. Right click on the background folder and add a background image from one of the
above name is bg_grass.
2. Open your room folder and go to the background tab
3. Select the background to use for your room

Adding Fog to a Room

17. Adding fog or mist to your room is easy.

1. Save the mist image from above the image is their just hard to see
2. Create a background of the mist
3. Go to your room and select the background tab
4. Click on Background 1
5. Choose the mist as the background
6. Select visible when room starts and foreground image so it will be on top of
everything else
7. Select 1 for Hor. Speed and Vert. Speed this will make the fog slowly move adding to
the visual effect.

Adding Tiles to Room

18. Now we will use tiles to make your rooms look better to do this we will use tile sets. Tile
sets are similar to backgrounds except they are split up into individual pictures from the
background.
1. To create a tileset right click on the background folder and create a background
2. Select use as tileset you then have to match the tile size with the tile set most are
either 16x16 32x32 or 64x64
3. We will use this as an example

This tile set can be used for stone paths in your world. It will be split up into 32x32 tiles these
tiles all fit together seamlessly to create nice path

To place a tile in your room go to the tiles tab then select the tile you wish to place in your
room and place it. Continue to place tiles to make your room look nice. You will have to add
many tilesets to get the variation you want. You can look on the Internet for many more
tilesets.

You should place some of the following types of tiles in each of your rooms:

● Trees
● Paths
● Flowers
● Rocks
● Buildings
● Stumps
● Fences
● Signs
● Etc

How to Make your Character Shoot


19. You need to be able to defend your self from monsters. So you will throw rocks.

1. Create a round sprite for your rock 8x8 in size


2. Create an object with that sprite name in obj_rock
3. Add a Create Event to the rock object

4. Add a Move Towards action


1. x = mouse_x
2. y= mouse_y
3. speed = 15
4. Relative not checked

5. Add a Other Views Outside View 0 Event


6. Add a destroy Instance of Self action
20. Now that we have made our rock it is time to make your character thrown the rock. We
are going to use mouse shooting to give your character precise aiming of your bullets.

1. Open your characters object


2. Add a Global Left Pressed Mouse Event

3. Add a Create Instance of your Rock


1. x = 0
2. y = 0
3. relative checked

How to Make Monsters


21. Monster #1 Side to Side

The easiest monster to make is a side-to-side moving. It simply patrols back and forth.

1. Create a sprite for you snake use this one if you want
2. Call this spr_snake
3. Create an object for this sprite and call it obj_snake

1. Now add a Create Event and add a Move Fixed action


select right and left and give it a speed of 2

2. Add a collision event with the obj_wall give it a reverse

horizontal action.

22. Monster #2 Up and Down

Another easy monster to make is a up/down moving.

1. Create a sprite for you skeleton use this one if you want
2. Call this spr_skeleton
3. Create an object for this sprite and call it obj_skeleton

1. Now add a Create Event and add a Move Fixed action


select up and down and give it a speed of 3

2. Add a collision event with the obj_wall give it a reverse


vertical action.
23. Monster #3 Moves Diagonally

One type of monster is one that moves diagonally. This monsters eratic movement makes it
hard to sneak past in tight corridors.

1. Create a sprite for you spider use this one if you want
2. Call this spr_spider
3. Create an object for this sprite and call it obj_spider
1. Now add a Create Event and add a Move Fixed action select the 4 corner
movements and give it a speed of 4

2. Add a collision event with the obj_wall give it a


bounce action.

24. Monster #4 Randomly through Maze

Now we will make an object that will move randomly through your maze you can never guess
which way this monster will go making it hard to predict a safe path to the door.

1. Create a sprite for you bat use this one if you want
2. Call this spr_bat
3. Create an object for this sprite and call it obj_bat
4. Now add a Create Event and add a Move Fixed action select the left right up and
down directions and give it a speed of 5

5. Add a collision event with the obj_wall add move fixed


action and select the same for directions.

Every time this monster hits a wall it will randomly choose one of the 4 directions to travel
next.

25. Monster #5 Chases you through Walls

The ghost can travel through wall but it slows down whenever it hits a wall. It can sense
where you are located so it is always trying to get to you.
1. Create a sprite for you ghost use this one if you want name in spr_ghost
2. Now create an object for your ghost name it obj_ghost
3. Give is a Step step event

4. Drag the Check Collision action into the step event check relative

5. Drag a Move Toward action and for the x value type your characters name with
a .x after it do the same for y but put a .y after your characters name
6. select .5 speed
7. Drag in an Else Action

8. Drag in a Move Toward action and give the x and y values the same as the other
Move Toward action
9. select 3 speed

Make Monsters Hurt you


26. We want the monsters to hurt you so open your characters object

1. Open your characters object add a collision event with the monster and drag a set

lives into the actions give it a value of -1 and check relative

2. Now drag in a restart room action into the collision event

You need to add this for all the monsters that can hurt you

Make Rocks Hurt Monsters


27. Your rocks need to destroy the monsters here how we do it

1. Open your monster objects and add the following to all of them.
2. Add collision event with obj_rock

3. Add a Set Score Action and set score to 25 and check relative.

4. Add a destroy instance of self

5. Add a destroy instance of other

How to Make Game Info Page


28. A game info page is your game manual or users guide. It will contain the following
information:

● Objective
○ What is the goal of your game
● Keyboard actions
○ How to move
○ How to shoot
○ Cheat codes etc
● Monster list
○ Monster names and descriptions
○ Points for killing
● Treasure List
○ Points and description
● Levels
○ Name and describe all levels

In your resources tab under your rooms is a "i" click on it and it opens the game info page.
While playing your game press F1 to open you game info page.
You can change colors and fonts but you unfortunately cannot add pictures.

How to Make Boss Monster

29. We want to create a Boss Monster that moves, shoots and has health
If you want to use a moving sprite for your boss use the below image if not find another sprite
for your boss.

If you want to make your boss sprite move you can use the sprite above and follow the
instructions below.
This type of picture is called an XP style sheet because it contains 4 poses.
Game maker does not automatically use the XP style sheet we have to convert it to 4 different
poses
1. Click on Add Sprite Icon click load sprite and then select Edit Sprite
2. Select File Create from Strip and load your character.
3. Number of images and number of rows is 4
4. Image width is found by dividing the total width of the tile sheet by 4 so the green
dragon is 384/4 so each should be 96
5. Image height should be 96 as well since the image is 384 px x 384 px
6. Click OK
7. If your character has a colored background select Image Erase a color to make it
transparent.
8. Save this as the correct pose name spr_bossD, spr_bossU, spr_bossR, spr_bossL
9. To get the second pose change the vertical pixel offset to 96 for pose 2 when the
dragon is facing left.
Make Boss Move
30. We want your boss to move left and right to guard the treasure.

1. Lets make your monster move left and right.


2. Open your monster object and add a create event

3. Add a Move fixed action and select left and right at a speed of 2
4. Add a collision event with wall and add a reverse horizontal direction action
5. Now put your Boss into a room to make sure it moves

Make Boss Shoot


31. We want your boss to fight back we can use this sprite for the fireball

1. Now lets make your boss shoot to do this we need a boss bullet
2. Find a boss bullet sprite and make it into an object I will use a fireball sprite
3. In your boss bullet Create a collision event with the wall that destroys boss bullet
4. Create another collision event with your character that takes away a life and restarts
the room just like the other monster collisions

1. Now we need to make your boss shoot the fireball


2. Add a Step step event to your boss
3. Add a create moving instance to your Step Event
4. Set object to boss bullet speed to 20 and check relative
5. Type 270 for the direction
1. By the way game maker handles directions using degrees of a circle so 270
is down 0 is right 90 is up 180 is left.
6. This will make your monster shoot an endless stream of bullets so we need to make
the firing random as well

7. To do this add a Test chance action to your monsters step event and give it a
value of 30
Draw Health Bar for Boss

32. Now we want to draw a health bar on the boss

1. Add a create event for you boss


2. Add a set health action and give in 100 don't check relative
3. Add a Draw Event to your boss
4. Add a draw health action give the settings below

Make Rock hurt Boss


33. Now we want your rock to hurt the boss

1. In your boss object Add a collision event with the rock


2. Add a destroy instance of other
3. Add a set health give it a value of -5 and check relative

1. Now add an action called other no more health action


2. Add a destroy instance of self
3. Add a set score and give it 1000 points check relative
Make Boss Sprite Change as direction changes
34. We want the sprite of the boss to correspond with the direction traveling. To do this we
will use a in game variable called direction

1. Go to the Draw event of you boss and add a test variable


2. variable = direction
3. value = 180
4. operations equal to

1. Now add a draw sprite and select the spr_bossL sprite since 180 is the left direction
2. Now add another test variable this time with a direction of 0
3. Now add a draw sprite and select the spr_bossR sprite since 0 is the right direction
EXTRA CREDIT DIRECTIONS

1. Monster that comes alive and chases you when you get to close

● This is a cool monster that will follow you but only when you get close enough to
wake the monster
● To make this monster you must you code
● First make a monster and another monster that will come alive when yoo get close to
it
● Add a step event to the waiting monster

● The add Execute code

● Copy the following into the code and change the names to your monster names
● This code changes your waiting monster into a chasing monster when your guy get
withing 100 pixels

if (distance_to_object(guy) < 100)

instance_change(statuemonster,1)

Different Monsters are Created

2. Monster generators
● Making a monster generator is a cool way to make lots of monsters in a room
● Make an object for your monster generator call it generator
● Make another object and call it ghost this is the object your generator will create
● Add a create event to it
● Drag in a Set Alarm action and give it 60 steps, 30 seconds = 1 second so this
generator will produce a new monster every 2 seconds
● Now add an Alarm event and drag in two actions
● Create instance of Object Ghost check relative this is the monster it generates
● Now drag in a set alarm and give it 60 steps this will restart the alarm

3. Monster that is Generated


● The monster that is created will not move yet so we will solve this problem
● Add a create event to your ghost object

● Drag in a Move Toward action and change the x and y values to the name of
your character followed by a .x for x and a .y for the y.
● Add a collision event

How to Make Bombs


4. Create Bombs to destroy Monsters or Walls

● Find a sprite for a bomb and an explosion and create objects for them.
● Edit bomb sprite to make it turn red
● Double click on the bomb sprite and select Edit Sprite

● Click Animation then select Fade to Color


● Select Red color
● Type 30 for the number of frames
● Click OK

● Now click Center to make the explosion come from the center of the sprite
● Click OK again.

5. Make Bomb turn into Explosion

● Open the bomb object


● Add Animation End Event
● Drag destroy instance of self into the action

● Drag Create Instance of Object

and select the explosion as the object you will create


● Select relative so the explosion will appear in same spot as bomb
6. Make Explosion Destroy Self

● Open explosion object


● Add Animation End Event

● Drag destroy instance of self into the action

7. Make Explosion kill Monsters

● Open your monster objects and add the following to all of them.
● Add collision event with explosion
● Drag the Set Score Action and give it some points and check relative.

● Drag destroy instance of self into the action

8. Make your Character place bombs to destroy enemies

● Open character object


● Create a Key Press Event

● Select the B key


● Drag the Create Instance Action

into the event and select bomb as your object check relative

You might also like