Complete Introduction To Game Maker

Complete Introduction to Game Maker

Well, first off, welcome to Game Maker! If you havent done so already, you can download the lastest version of Game Maker (as of this writing, version 7.0) at http://www.yoyogames.com. Now, you want to learn how to make a game, eh? Well, first, lets look at the interface.

Game Maker Interface

The simple version of the GM interface is, well, simple. On the left, you have your resource tree. This contains all of the elements of your game, including sprites (images), sounds, backgrounds, objects, and rooms. In the toolbar, you see shortcuts for creating objects.

Pacman - Sprite
Speaker - Sound
Picture - Background
Blue Ball - Object
Window - Room

Now that you know the basics of the GM interface, lets start on a game!

Making a Basic Game

Lets start making a basic GM game. First off, we need an image to be the basic player. Press the Pacman toolbar icon, and a window pops up. Now, this may seem a little complicated. For now, we only need to worry about 2 things. The first is the name. Its good practice to prefix all of your elements with an abbreviation of the element type. Below is a list of the Simple Mode elements and their prefixes.

Sprite - spr_
Sound - snd_
Background - bg_
Object - obj_
Room - rm_

Now, name the newly created sprite spr_character. To select the image you want, press the Load Image button below the name. (Note: You can make an image in GM by pressing the Edit Sprite button. Read the Image Editor tutorial for more information.). Browse to the default GM install directory, and go the Sprites folder, and select the image pacman_stand.gif. Now, press Ok and and lets proceed to the object menu.

Lets create an object. Objects are the basic items in a game. They are the only things that you can attach actions to. To create an object, press the blue ball in the tool bar. Name the object obj_character. Using the menu below the name box, select the sprite that we previously made (spr_character). Now, you should see two white columns. Now, underneath the first white column, press Add Event. Now, select Key Press, and select Left. Now we go to the second column. This is where you drag actions for the object to follow. Under the Move tab, select the first icon, the one with red arrows. This is the movement action. You should now see a menu. Here you can define several arguments for the action. Make sure the Self button is selected. Now, here you select the direction for the movement. Since we are working in the Left pressed action, select the left arrow and set the speed (the speed at which the object will move). The speed can be any number, but I reccomend 4-7 for this example. Now that we have told the object to move left at a speed when the Left key is pressed, we need to tell the object to stop. Go back to the first column and create an action. Now, instead of selecting Key Press, select Key Release, and select Left as before. Now, use the same action as before, except this time, select the direction to the center square (in the middle of the direction pad) and set the speed to zero. Congratulations, you have now created a simple movement engine! All you need to do now is recreate the Key Press and Key Release actions for each key (Up, Down, and Right). Once you have done that, create a room by pressing the window in the tool bar.

Rooms are probably the most unique element in the Game Maker IDE. Basically, this is where all of the action takes place. You cannot have a game without a room, yet you can have a game with just 1 room, and no objects or images. But, thats a lot more advanced. Lets look at some elements of the Room Editor. In Simple Mode, there are three tabs to the left of the main area. These are Objects, Settings, and Backgrounds. Below is a small glimpse of what each one does.

Objects - Allows you to place an object anywhere in the room.
Settings - Allows you to set the window height, width, and caption.
Backgrounds - Allows you to set either a background color or image.

Simply go to the Objects tab, select the player object (obj_character) and place it anywhere in the room.

Congrats! You have just made your first game! To play the game, press the green triangle in the tool bar and volia! You can test your game. Want to send this to someone? Simply go to the File menu and select Create Executable (or you can press the window with a green arrow in the toolbar). Now anyone with or without GM can play your game!

Next Tutorial: The Game Maker Language - An Introduction

This page has been recommended for cleanup, integration, etc.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.