08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ounce action. (You can see what each action does by holding the mouse cursor still above it.)<br />

Finally, we need to define what to do when the user presses the left mouse button on the ball.<br />

Add the corresponding event and select the left mouse button from the pop-up menu. For this<br />

event we need a few actions: one to play a sound (can be found in the group of main1<br />

actions) and one to change the score (in the group score) and two more to let the ball jump<br />

to a new random position and moving in a new direction (in the same way as in the creation<br />

event). For the sound action, select the correct sound. For the score action, type in a value of<br />

1 and check the Relative box. This means that 1 is added to the current score. (If you make<br />

a mistake you can double click the action to change its settings.)<br />

Our objects are now ready. What remains is to define the room. Create a new room in the<br />

game, again from the Resources menu. At the right you see the empty room. At the left you<br />

find some tabs, one for setting the background, one for setting some global properties like the<br />

width and height of the room, and one where you can add instances to the room. At the<br />

bottom you can select an object in the pop-up menu. By clicking in the room you can place<br />

instances of that object there. You can remove instances using the right mouse button. Create<br />

a nice boundary around the room using the wall object. Finally, place 1 or 2 ball objects in the<br />

room. Our game is ready.<br />

Now it is time to test our game. Press the Run button (the green triangle on the button bar at<br />

the top of the window) and see what happens. If you made no mistakes, the ball starts<br />

moving around. Try clicking on it <strong>with</strong> the mouse and see what happens. You can stop the<br />

game by pressing the key. You can now make further changes.<br />

Congratulations. You made your first little game. But it is now time to learn a bit more about<br />

<strong>Game</strong> <strong>Maker</strong>.<br />

The global user interface<br />

When you start <strong>Game</strong> <strong>Maker</strong> the following form is shown:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!