Professional Documents
Culture Documents
Maze Game Julio 21
Maze Game Julio 21
Extra credit
● 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
● Set score caption and show score, show lives and don't show health
No More lives
● Add these actions
● Show High Score
● Restart Game
How to Increase Lives
14. Make your character increase lives by collecting hearts
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.
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
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.
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
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
horizontal action.
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
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
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
Every time this monster hits a wall it will randomly choose one of the 4 directions to travel
next.
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
1. Open your characters object add a collision event with the monster and drag a set
You need to add this for all the monsters that can hurt you
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.
● 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.
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.
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
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
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
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
● 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
instance_change(statuemonster,1)
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
● 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
● 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
● Now click Center to make the explosion come from the center of the sprite
● Click OK again.
● 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.
into the event and select bomb as your object check relative