Gamemaker Tutorial
Written By Andrea Munro, Sacred Heart College, New Town, Tasmania
Games take place in rooms. In these rooms you place objects (which have sprites as their images, and properties like solidity and actions like movement.) Typical objects are walls, main character, monsters etc. some things move and some things don’t. Certain things will happen to objects. Such happenings are called events. They can be what happens when they are created (creation event), what happens when they are destroyed (destroy event), what happens when a particular key is pressed (keyboard event) or maybe what happens when two objects collide (collision event).
1. Use the Add menu or the buttons across the top of the screen to create the following sprites:
![]()
Bear_sprite
(icon of a bear). Click on load sprite to choose the bear. (It is in the
Sprites\Various folder) Set to transparent.
Wall_sprite
(icon of a block). Click on load sprite to choose the square. (It is in the
Sprites\Maze folder) Set to transparent.
2. Create the following objects (things in your game):
![]()


Wall (find wall_sprite). Set to Solid and visible.
Bear (find bear_sprite). Set to visible.
So the user can use the keyboard to move the bear we need to set some controls for the bear object.
3. Under keyboard controls button:
Choose <no key> (what happens when no arrow keys are pressed). Drag the red ‘start moving’ command into the blank middle window. Double click on it and click the centre button on the direction arrows (this means stop).



Choose <left> (what happens when the left arrow is pressed). Drag the red start moving command into the middle window. Double click on it and click the left button on the direction arrows (this means move left).
Choose <right> (what happens when the right arrow is pressed). Drag the red start moving command into the middle window. Double click on it and click the right button on the direction arrows (this means move right).
Choose <up> (what happens when the up arrow is pressed). Drag the red start moving command into the middle window. Double click on it and click the up button on the direction arrows (this means move up).
Choose <down> (what happens when the down arrow is pressed). Drag the red start moving command into the middle window. Double click on it and click the down button on the direction arrows (this means move down).
4.
Go back to the bear object click on the collision button and change it to wall.
Click and drag the red start moving button (same as for setting the arrow keys)
and drag it into the blank middle window. Double click on it and click the
centre button (this means the bear will stop when it gets to a wall).
5. Now make a room using Add menu or the toolbar icon at top of screen. Under settings tab give the room a caption (title) and set the size of the area. Go to the objects tab and add walls where you want them by clicking (right click removes them) and then place the bear in position. Later we will add objects to score points and hazards so leave enough space for the bear to maneuver.
Under the background tab click where it says ‘background color’ to set a background colour.


6. Test your program.
Extension:
Add to the bear objects actions so when he runs into a wall he also says ‘ow’. You will need to record a appropriate “ow” sound first, or find a .wav that is useful for this.
7. The next stage……..
We will add dots, that score points, and some fire, that causes the bear to die.
Create sprites:
Dot_sprite (find the dot icon)
Fire_sprite (find the fire icon)
Create objects:
Dot (use dot_sprite)
Fire (use fire_sprite)
Add sound:
explosion
Set for bear object: When bear collides with dot. Dot will be destroyed.
Set for dot object: On its destroy command dot will increase score by 5 (use set score and fill in 5 and tick relative).
Set for bear object: When bear collides with fire. Bear will be destroyed and explosion happens.
Game maker can do lots more than this….