CAP 211 - Interactive Design and Game Development

Game Maker Quick Start

Objectives:

This lesson introduces the student to several aspects of the Game Maker software used for the course. Objectives important to this lesson:

  1. What can you make with Game Maker
  2. Terminology
  3. Basic game concepts
Concepts:

Follow this link to a YouTube video displaying lots of games that were created with Game Maker. This should show you some of the things you can do with this software.

The classroom server will have several documentation files on it concerning the Game Maker program from Yoyogames. (They are also available on the Yoyogames web site.) You should begin by reading the gmaker.doc file, which is the main documentation for the program. Yes, it is very long, but you don't have to read it all at once.

The section of this file under the heading The Global Idea introduces some terms and concepts for Game Maker.

  • Game Maker is available as a free product, but you can buy a registered copy of it to unlock more features than the free version provides.
  • Game Maker is for creating two-dimensional games, like the games commonly found on handheld game devices and phones.
  • objects - things you can encounter or use in the game from the programmer/game's point of view
  • sprites - graphics that are assigned to objects in the game; the player will see the sprites that are assigned to the objects
  • events - things that can happen in the game, which will vary greatly from one game to another, such as creation, or collision; an event can be caused by a player or caused by the game itself
  • actions - things that happen as a consequence of an event
  • sounds - events can be linked to sound files that are played when those events occur (mp3, wav, wma)
  • A game made with Game Maker will have one or more rooms containing objects. Think of a room as a map for the game.
  • Rooms can be given background graphics to make the game more interesting.

This link goes to a video on Youtube about the basic features of Game Maker. It walks you through creating a first game.

Tutorial 1 (The Ball and the Wall):

To use an example from the manual, turn to the section titled Let us look at an example. This will be around page 11 or 12, depending on the size of your margins and the font pitch you are using to view the file. The author begins with a description of the game he wants to make: a ball will bounce between two walls, and the player will get points by clicking the ball.

This leads to a list of objects for the game: a ball and a wall. (You can have more than one instance of an object, so we do not need a second object for the second wall.) The description also tells us that the ball will be blue, and the walls will be red, so we will need sprites for each of them. We are told that we will play a sound when the player successfully clicks the ball. In this game, there is only a need for one room to contain the objects.

There is also a statement in this section that we will run Game Maker in simple mode. We will use this mode for all games made in our classroom.

The manual presents a short lesson on creating this game.

  1. From the Resources menu select Create Sprite. A dialog box opens, which the manual calls a form. Give the sprite the suggested name (wallSprite), and click the Load Sprite button. Make a selection from the supplied sprites. Uncheck the box for Transparent and close the form by clicking OK..
  2. Repeat the step above, making a sprite for the ball. Call it ballSprite. (Note that the sprites are not assigned to objects yet, since you have not made the objects yet.)
  3. The manual tells you to open the Resources menu again and select Create Sound. Name the sound (how about score?) and click Load Sound. Pick one of the available sounds, and preview it with the Play button. Switch sounds, if necessary, then close the form.
  4. Open the Resources menu and choose Create Object. A form opens for that purpose. This time you are creating an object for the wall. Name the new object. Use the dropdown menu to assign the wallSprite to the wall object. Find the checkbox for Solid, and check it, since the wall is supposed to be solid. Close the form by clicking OK when you are done.
  5. Repeat the command above to create an object for the ball. Give it a name, and assign the ballSprite to it. Do not make the ball object solid. Do not close the form yet.
  6. The ball object will have three events added to it.
    1. Click the Add Event button and choose the Create event. This stands for the moment when the ball is created at the start of the game. A Create event will appear in the Events column, and it will be selected.
      1. Look at the set of six tabs on the far right of the Object Properties window, and make sure the move tab is selected. On that tab, there are two sections: Move and Jump. Find the first button icon in the Move section. (It has eight red arrows on it, and it is called Move Fixed.) Drag it to the Actions list to its left.
      2. A dialog box will open to configure the action. Leave the radio button set to Self. Click the little button for each of the arrows, so the . Set the speed to 8. Leave the check in the box for Relative or not. This time it will make no difference. Click OK to save this action for this event.
    2. Click the Add Event button again and choose the Collision event. This opens a dropdown box listing the two objects in this game. Choose the wall object, because you are defining what happens when something collides with a wall.
      1. The text says to drag the bounce button into the actions field. (It is the last button in the Jump section on the Move tab.)
      2. Use the default settings for the bounce action.
    3. Click the Add Event button again and choose the Mouse event. This will open a list of choices. Choose Left button from the list. This event needs three actions.
      1. Click the main1 tab and drag the the Play Sound button into the Actions list. Use the dropdown for sound on the dialog box that appears to choose the score sound you added to the game earlier. Click OK.
      2. Click the score tab, and drag the Set Score button to the list of actions. Enter 1 in the new score field, and make sure a check is in the box marked Relative. This means that 1 will be added to the current score (relative) when a ball is clicked.
      3. Click the move tab again, and drag the Moved Fixed button to the Actions list again. Leave the radio button set for Self, select all eight direction buttons, and set the speed to 8. Do not put a check in the box for relative. A check here would add 8 to the speed of ball with each click. Click OK.
    4. Click OK on the Object Properties dialog box.
  7. Open the Resouces menu and create a Room for the game.
    1. On the objects tab, use the dropdown box to select the ball object. To make the game more interesting, place two balls in different places in the room by left-clicking any where except on the rooms edges.
    2. Use the dropdown to select the wall object. Hold down a shift key, and left-drag the mouse to paint wall objects on all sides of the room.
    3. Use the backgrounds tab to set a background color for the game if you like.
  8. Save the game with a new name.
  9. Click the green arrow head in the toolbar to compile and run the game.