MAZE GAME TUTORIAL. Page 5 of 13. V. STARTING A GAME. Open A New
Game. Open a new game by one of the following methods: ▫ Click the Game
Maker ...
MAZE GAME TUTORIAL
©2006AmandaHefner
Page 1 of 13
MAZE GAME PLANNER I.
DETERMINE GAME OBJECTIVE
What is the theme of your game, the purpose, and method of winning or losing the game? Theme:
Win:
Loss:
II.
DETERMINE GAME GOALS
Within the game, what goals should be accomplished? How does the player advance to the next level, acquire new skills, or improve in the game? What challenges will the player faced when trying to accomplish these goals? 1.
2.
3.
4.
©2006AmandaHefner
Page 2 of 13
III. DETERMINE POSSIBLE OBJECT ELEMENTS Make a list of all the possible Objects, Events, and Actions for the Ball Game.
Objects:
Events:
Actions:
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 3 of 13
IV. WRITE CONDITIONAL STATEMENTS Fill in the blanks with possible Objects, Events, and Actions that might happen in your game. In some conditions, there may be a secondary object that is part of the Event. Write those in as well.
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
IF __________________ (Object 1)
________________________, THEN _______________________. (Event / Object 2) (Action)
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 4 of 13
MAZE GAME TUTORIAL V. STARTING A GAME Open A New Game Open a new game by one of the following methods: Click the Game Maker icon on the Desktop or in >Start >Programs list Go to File > New Press Ctrl + N on the keyboard To re-open a saved game, Open Game Maker and then choose Open from the File menu.
Turn off Advanced Mode. All screen shots in this tutorial were taken with Advanced Mode turned OFF to hide the extra options not needed for this project. To eliminate confusion, it is recommended that you set the mode to OFF while learning the basic functions of Game Maker. From the File menu, locate Advanced Mode. A check will appear to the left of Advanced Mode if it is ON. If there is no check, Advanced Mode is already OFF. To turn it off, simply select Advanced Mode from the File menu. When switching modes, Game Maker requires that any open games be saved so that it may restart the application. You will need to reopen a game if you have already been working on one and have changed modes.
VI. GAME MAKER INTERFACE Study the Game Maker Interface below. Notice it has additional options because it is in Advanced Mode. Familiarize yourself with the Library pane and the Property box that currently displays the Object Properties. The Property box will look different for each type of game element you open. EVENTS ACTIONS CURRENT SELECTION
LIST
LIST
LIBRARY OF GAME ELEMENTS:
S PRITES
S OUNDS
B
Drag Actions from the Actions Tabs into this space.
ACKGROUNDS
P ATHS*
S CRIPTS*
D
ACTION TABS
PROPERTIES ©2006AmandaHefner
MAZE GAME TUTORIAL
Page 5 of 13
VII. ADD GAME IMAGES (“Sprites”) Begin adding the main images that will be used in the game. These images are called “sprites” in gaming and are later applied to the objects so they will be visually represented on the screen.
WHERE ARE THE FILES I NEED? The sprites, backgrounds, and sounds used in this tutorial should already be installed by default in the Game Maker program folder located on the C: drive of your computer. If you are unable to navigate to this folder, you may also copy the files from the Texas Games site at: http://www.texasgames.net/files/MazeGameFiles.zip The downloadable files are contained in a “zipped” folder, which requires unzipping them to your local drive before using in the game.
Add Sprites Add the WALL sprite to the game: 1. Go to the Add menu 2. Choose Add Sprite A form will appear. 3. In the Name field, type “wall” 4. Press the Load Sprite button 5. Choose wall.gif from the Ball Game Tutorial folder 6. Press the OK button
Repeat
these steps for the other sprites as well: person.gif goal.gif diamond.gif
Be sure to name them correctly.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 6 of 13
VIII.
IMPORT GAME SOUNDS
Sounds can make a game more exciting and fun for the player. More importantly, they provide feedback to the player, letting them know that something has happened in the game. Some examples of when you might use sounds: Player clicks on the goal Time has run out Score increases Player advances a level Enemy touches the player
Add Sound In this game, we will add a beep to let the player know that the player has accurately clicked the ball with the left-mouse button. First, we must add the sound to the game.
Add a sound effect to the game: 7. Go to the Add menu 8. Choose Add Sound - a form will appear. 9. In the Name field, type “beep” 10. Press the Load Sound button 11. Choose Beep4.wav from the Ball Game Tutorial folder 12. Press the OK button Preview the sound by pressing the green arrow button.
Repeat these steps for the “explosion” sound.
The file will be in the same
folder.
IX. IMPORT BACKGROUNDS Add Background Add a Background to the game room: 13. Go to the Add menu 14. Choose Add Background - a form will appear. 15. In the Name field, type “red” 16. Press the Load Background button 17. Choose backred.jpg from the Ball Game Tutorial folder 18. Press the OK button
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 7 of 13
X. GAME OBJECTS & CONDITIONAL STATEMENTS Objects, Events, & Actions This Form will look much different. On the Left side, you see basic information about the Object. In the middle, you see a set of Event buttons and an empty space. On the far right is a set of Action buttons. For each Object, you will select the Event you want to happen and then drag the resulting Action button into the empty space between them.
The Object Properties Window Basic Information
Events
EVENT BUTTONS
Actions
ACTION BUTTONS
ACTION TABS
In the next section, you will begin setting up the game Objects. Let’s keep going!
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 8 of 13
XI. CREATE GAME OBJECTS Keeping Other Objects in the Room with the Solid Property Add the wall Object to the game: 19. Go to the Add menu 20. Choose Add Object - a form will appear. 21. In the Name field, type “wall_obj” (It is good to add “_obj” to your Object names so you can easily tell them apart from the Sprites with the same name.)
22. From the drop down menu, choose the wall Sprite you created earlier. 23. Check the box next to Solid. The walls do not move and other objects will not be able to go through them, so we will make it solid. 24. Press the OK button
Add the Person Object to the game: 25. 26. 27. 28.
Go to the Add menu Choose Add Object - a form will appear. In the Name field, type “person_obj” From the drop down menu, choose the person Sprite you created earlier. Since the person does move, we will not make it solid. BUT, we will need to give it some other behaviors like moving in different directions with the arrow keys.
We want to make the person move in different directions when the user presses the arrow keys. 29. Press the Add Event button 30. On the Event Selector box, press Keyboard, then choose 31. From the Actions on the Move tab, drag the Start Moving in a Direction action with the 8 red arrows to the empty Actions list. A new box pops up.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 9 of 13
34. Select ONLY the arrow pointing left on the Directions diagram and change the speed to 8. This will assign the left arrow key to move the person to the left.
32. Press the OK button
Repeat these steps for the , and keys. Be sure to choose the correct arrow on the diagram to match the direction of the key pressed by the user.
33. Press the Add Event button 34. On the Event Selector box, press Keyboard, then choose 35. From the Actions on the Move tab, drag the action with the 8 red arrows to the empty space. A new box pops up. 36. Select ONLY the center square on the Directions diagram. This causes the person to stop moving when no arrow key is pressed.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 10 of 13
Now we have to define what will happen when the person has a collision event with the wall. We want it to stop. 37. On the Event Selector, press the Collision Event button 38. From the drop down menu, choose the wall_obj object 39. From the Actions on the Move tab, drag the action with the 8 red arrows to the empty space. A new box pops up. 40. Select ONLY the center square on the Directions diagram. This causes the person to stop moving when it collides with the wall.
Add the Goal Object to the game: 41. Go to the Add menu 42. Choose Add Object - a form will appear. 43. In the Name field, type “goal_obj” 44. From the drop down menu, choose the goal Sprite you created earlier.
We want the game to go to the next level when the person reaches the goal. This is a Collision event. 45. Press the Collision Event button
46. 47. 48. 49. 50. 51. 52.
From the drop down menu, choose the person_obj object From the Main1 Actions tab, drag the Go to Next Room icon to the Action list Choose any transition from the drop down menu. From the Score Actions tab, drag the Score icon to the Action list In the New Score field, type 20. Check the box next to Relative. Press the OK button.
Add the Diamond Object to the game: 53. Go to the Add menu 54. Choose Add Object - a form will appear. We want the game to END and display a Credits page when the person reaches the diamond goal. This is a Collision event. 55. 56. 57. 58. 59.
In the Name field, type “diamond_obj” From the drop down menu, choose the diamond Sprite you created earlier. Press the Collision Event button From the drop down menu, choose the person_obj object From the Score Actions tab, drag the Show the Game Information icon to the empty space. 60. From the Score Actions tab, drag the Score icon to the empty space. 61. In the New Score field, type 20. 62. Check the box next to Relative. 63. Press the OK button.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 11 of 13
XII. Add the Room to the game: The game must take place in a Room. This will have a background and sprites will be placed inside the room. Each time a sprite is placed on the room layout, it is called an instance. You will have many wall instances and only one person instance. 64. From the Add menu, Choose Add Room 65. Maximize the Room form to fill the screen 66. Press the Settings tab. 67. In the Name field, type “Room1” 68. In the Caption for the Room field, type “Level 1” 69. Press the Backgrounds tab. 70. From the drop down menu, choose back3. 71. Press OK
XIII.
Add the Objects to the room: 72. From the Object drop down menu, choose Wall 73. Left Click on the room layout to place a wall sprite on the screen. Right click on the wall sprite to remove it from the layout. 74. Line the edge of the layout with these wall squares until they cover all sides of the layout. Then, add walls within the border to create a MAZE. Create your own design, but make the paths wide enough for the person object to get through. You may have to go back and move them if it does not fit.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 12 of 13
75. 76. 77. 78.
From the Object drop down menu, choose the person sprite Click once in the room at the START point of the maze to place a person object. From the Object drop down menu, choose the goal sprite Click once in the room at the END point of the maze to place a person object.
XIV. : Create another room with a new maze and call it “Room2” Repeat with the caption as “Level 2” by repeating the steps 56 to 68. On the Level 2 room, use the Diamond instead of the Goal object at the end of the maze.
XV. Give Yourself Credit! Add the Game Information: 79. From the Add menu, choose Change Game Information 80. Type in the following information and format the page however you like: Your Name Teacher Technology Class - Period # Date You can add more information if you would like to.
XVI.
Test the Game If you have not made any mistakes, you should see the game load, the maze will appear. When you press the arrow keys, the person will move through the maze. When you reach the goal, it will take you to the next room. 81. From the Run menu, choose Run Normally. The game will load. 82. To quit the game, press the Esc key on the keyboard.
©2006AmandaHefner
MAZE GAME TUTORIAL
Page 13 of 13