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.

different objects. For example, to create nice walls in maze games you need as a start 15<br />

differently shaped wall objects.<br />

The standard way out, used in many games, is that the walls and other static objects are<br />

actually drawn on the background. But, you might ask, how does the game know that an<br />

object hits a wall if it is drawn on the background only? The trick is as follows: You create just<br />

one wall object in your game. It must have the right size but it does not need to look nice.<br />

When creating the room, place this object at all places where there is a wall. And, here comes<br />

the trick, we make this object invisible. So when playing the game you don't see the wall<br />

objects. You see the beautiful background instead. But the solid wall objects are still there and<br />

the object in the game will react to them.<br />

You can use this technique for any object that is not changing its shape or position. (You<br />

cannot use it when the object must be animated.) For platform games, you probably need just<br />

one floor and one wall object, but you can make beautifully looking backgrounds where it<br />

looks as if you walk on grass, on tree branches, etc.<br />

To add tiles to your room you first need to add a background resource to your game that<br />

contains the tiles. If you want to have your tiles partially transparent, make sure you make<br />

the background image transparent. When adding the background resource indicate that it<br />

must be used as a tile set. Next indicate the size of each tile and whether there is room<br />

between the tiles, as was indicated in the chapter on background resources.<br />

Now, when defining your room, click on the tab tiles. The following form is shown (actually,<br />

we already added some tiles in this room).

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

Saved successfully!

Ooh no, something went wrong!