In this game, you will learn more features in Gamemaker. ... Person: This
character will travel through the maze as they collect diamonds and then reach
the exit.
Maze Game In this game, you will learn more features in Gamemaker. One of the most popular games are maze type games. STORYBOARD: 1.
First you need to create a Design Document of what the game is about.
Game Objects: There are 8 game objects – the person, wall, goal, 4 enemies and diamonds.
Person: This character will travel through the maze as they collect diamonds and then reach the exit avoiding many enemies in its path. Wall: This will consist of what the maze is about. Each room will have a different maze. Goal: Shows where the person must vacate the room as it enters a new one. Enemies: This will consist of monsters that will try to kill the person as it goes throughout the maze. The enemies will move by themselves. Diamonds: The person will collect all diamonds before it exits the room.
Sounds: Many sounds will occur as the person gets the diamonds, goes through the door, dies and there will also be background music. Controls: The only control is with the keyboard. You will be using the up, down, left and right keys. Game Flow: At the start of the game, the score is at 0. The first room will be the game title, the next room will be the first maze and then you will have 3 more mazes after that. Each diamond is 5 pts and you have to collect all diamonds before you get to the next room. Once you complete a room, you will receive 40 pts. Levels: There will be 4 levels. The difficulty of the game increases as you go from room to room. Monsters will be in every room trying to kill you. STARTING THE GAME – SPRITES AND OBJECTS: 2.
Create 3 sprites:
Spr_person – using the Bear file Spr_wall – using the wall file Spr_goal – using the finish file
3. Create the 3 objects. Let’s first start with the wall. Name it obj_wall. Give it the spr_wall sprite. Make it Solid by checking the box. This will make it impossible for objects to go through the wall. The wall object does not do anything else. 4. Create the person object. Name it obj_person using the spr_person sprite. This is the character for the game. We will do the actions later. 5. Create the goal object. Name it obj_goal using the spr_goal sprite. This is the object the player has to reach. It is a non-solid object.
ADDING EVENTS AND ACTIONS: 6. When the player collides with the goal, we need to go to the next room. Create an event and click Collision. Pick obj_person. Add the following actions.
These actions mean when the character exits the room, he goes to the next room or the game is restarted. 7. Double click on obj_person to open the dialog box to create events. Create a Collision event with the obj_wall. Add the action Move fixed and speed is 8 and select the middle direction.
8. Next we need to tell HOW the person will be moving throughout the game. To make it easy, let’s use keyboard keys – the 4 arrows. Create a Keyboard Event. Select , , , , and . For each key, follow the pictures provided.
CREATING ROOMS: 9. Create a room that would look like a maze. Have at least 3 dead ends. Have Snap X and Snap Y set to 32. Name the room: room_1. For Caption, pick a good title for your game. 10. In each room, place the goal object at the destination and place the person object at the starting position. TESTING: 11. Test the game. Play with it a bit. Change the speed if you want. You might notice some freezing – very typical of Gamemaker. Just exit out and play again. COLLECTING DIAMONDS:
The goal of the game is to collect the diamonds. Creating the diamonds are easy but how do we make sure the person cannot exit the room when not all diamonds are collected? We will create a door. It will behave like a wall as long as there are still diamonds left and will disappear when all diamonds are gone. 12.
We need 2 more sprites and objects. Create a diamond and a door. For the diamond sprite – use the diamont file For the door sprite – use the stop file
13. Double click the diamond object. The only action on the diamond is it will be destroyed when the person collides with it. In the event, select Destroy. We will also set the score so every diamond we collect will receive 5 pts. AND it will also play a sound called snd_diamond. You will need to create a sound, using the diamond sound file.
14.
Add a Collision Event with the obj_person. Select
Destroy the instance action. Click OK.
15. For the obj_Door, we will create a step event. This means when we select ALL diamonds (when it’s 0) the door will destroy itself (disappear) letting us go to the next room. We will also play a sound when that occurs. Create a sound using the door sound file. Copy the following.
Create a collision event with obj_person so when the person collides into the door the game will restart. We want the door to “disappear – collect all diamonds” first.
16.
In room_1, add the door object and some diamonds throughout the maze in a variety of spots.
CREATING BACKGROUNDS:
You can use any sort of painting program to create backgrounds and sprites. In these steps, you will be using Paint. 17. In Paint, create a background. You can have ANY design you choose as long as it says Maze Game, Created by, Press any key to start. Save it as a jpeg file. 18. Create a background and load the background you just created in Paint. Name it back_start. 19.
Create a room, named room_start. Put this room in front of room_1.
20.
Load the back_start in room_start. You might have to checkmark Stretch so it fits to the screen.
21.
Create another background, name it back_1. Use the file called back_2.
22.
Load the back_1 in room_1.
CREATING AN OVERALL SCORE: 23. Before we start adding a lot of actions to the game, we need to create some sounds. Create a sound called snd_goal and use the sound file goal. 24. Double click obj_Goal. Copy the following. Make sure to read the review to understand what each action means and why.
Set the score relative to 40 – make sure relative is selected. Play snd_goal – loop is false, sound will play when we go to the next room Sleep 1000 milliseconds – redraw is true
REVIEW: For each diamond destroyed we give 5 points. So in the destroy event of the diamond we add 5 points to the score. Finishing a level gives 40 points so we add 40 points to the score in the collision event for the goal with the person. When the person goes to the next room, it will play a sound, wait a while and then either go to the next room after collecting all diamonds or restart the game. CREATING A START SCREEN:
We already created room_start so now we are going to put an action to it so when the player hits any key, the game begins going to room_1. These are called controllers. 25. Create an object called controller_start. There is no sprite for this. What this does (its invisible), it simply waits for the user to press a key and then move to the next room. The start controller will also set the score to 0 and we have it so it does show the score in the caption. You will need to create a background sound. Use the sound file called music. Follow the event and action from the pictures below.
26. Create a keyboard event and select . Create an action to go to the next room when you press any key. Uncheck Visible so the controller does not show up in the game.
27. Open room_start and place the controller_start in the top left hand corner. Also, drag room_start above room_1 on the left side of the screen.
TESTING AND DEBUGGING: 28.
Test the game. Use the checklist as you play the game:
Are all 4 sounds working and are appropriate? Do the keys work moving the person? Can you go from room to room? Does the controller work? Is the score showing and work right when you collect the diamonds? How is the speed of the person? Does it restart the game when you are finished playing the game?
Go back to the appropriate section and fix anything you see wrong.
CREATING MORE ROOMS: 29.
Let’s create 2 more rooms (a total of 3 levels). The first room that is already created is the start screen,
room_start. The next room is called room_1, which is where we first created the maze. The next room will be called room_2 and then room_3. Make each room very different and more difficult from room to room.
CREATING MONSTERS: 30. Now we are going to make the game more interesting. Create a sprite with a monster on it. Choose any sprite you like. 31.
Create an object for this monster.
32. For the event and action, click Add Event and select Create. For actions, select Move Fixed. Pick any direction in which you want your monster to move. Also, pick a speed (but not too fast!). And also create a collision event with the wall so that when the monster hits it, it will reverse direction. Also, checkmark Solid.
33. Create another Collision Event with the obj_person and for the action select Restart Room. This will happen if the person runs into the monster. 34.
In room_1, put the monster in a specific spot of the maze.
35. Test this part of the game. Check to make sure the level restarts and the monster is moving how you want him to move.
CREATING MORE EXCITING FEATURES: 36. Create a total of 5 different rooms (1 being the start screen) each with their own “special” monster.” A total of 4 different monsters. Change the speed and direction of each monster. Make it more difficult as you continue on with the game. And you can have more than 1 monster per room – make it hard and interesting. 37.
Change the spr_person to a different sprite instead of the bear.
38.
Put a caption for every room.
39.
Save as an executable called your name maze.
40.
Upload the gamemaker file to Blackboard.