View Full Version : Game Maker: Simple Bounce Game


iTom
04-22-2006, 02:45 PM
We all have to start somewhere in Game Maker, so here we are. For those of you who don't know what Game Maker is, it is free software (also there is a paid/registered version - $20) which allows you to develop almost any type of game using a simple D&D (drag and drop) mechanism. I wish, just really do wish that I could post a link, so just hit Google.

Create a new game. Name it Bounce.

Create two sprites. Name one wall, and choose a wall image. Name another ball and chose an appropriate ball sprite.

Next, create your room. Name it main, colour the background and set the caption to 'Bounce'.

Create two objects. Name one ball, and select the ball sprite. Make sure 'visible' is ticked. Name the second 'wall', and select solid. Wall will do nothing.

The ball, however is a different feat. In the ball object make the action 'Collision with...' and select wall. When this happens, we will bounce the ball :)

In the events, drag 'Bounce against...' and choose 'Not precisely' and 'Solid Objects'. Now create a new event called 'create'.

When the ball is created, we will set it to go in a random direction. Choose 'Start moving in a direction...'

Select all the directions except the middle one. Then set the speed to 4.

Now, add your objects to the room. Set the x and y snap to '24'. Create a border of wall objects. Now place your ball.

Pretty boring, eh?

Well, you can't score anything, that's why!

So, we need the click action. Go into the ball object and create a new event called 'Left Mouse Click'. When this occurs, we score!

But hold your horses, it isn't that easy!

You need to create a scoring mechanism. To do this, click the score tab. Drag 'Set the score'. Tick Relative, and chose 1 for the input.

Now play your game! ;)