Game Development Reference
In-Depth Information
Believe it or not, that's all the events and actions we will be creating for the platforms in this
game. All the behaviors involving platforms will be controlled from within the Fishpod object.
Platform Waiting Room
It's not like there's much to see yet, but let's quickly make a level and test out our automatic
platforms. Then we'll also have a level ready and waiting for Fishpod when we create him.
Creating a New Room with Platforms
1.
From the
Resources
menu, select
Create Room
(you can also create rooms by right-
clicking on the
Rooms
folder in the resource tree, or using the white window button on
the toolbar).
2.
Switch to the
settings
tab
and set the
Width
of the room to
800
and the
Height
to
600
.
The default size of 640 by 480 is a little restrictive and 800 by 600 is the next logical size
up that has the same ratio between the width and height.
3.
On the Room Properties toolbar, set both
SnapX
and
SnapY
to
32
, as this is the size of
our platform segments.
4.
Switch back to the
objects
tab
and select
obj_rock_middle
from the menu below the
Object to add with left mouse
field (or by left-clicking anywhere in the object preview
pane directly below the objects tab label).
5.
Create a test level similar to the one shown in Figure 2-8 by clicking the left mouse
button to add instances of
obj_rock_middle
to the level. This only needs to include
instances of the
obj_rock_middle
object as its
Create
event will automatically create
the
obj_rock_begin
and
obj_rock_end
instances where they are needed. However, you
will need to put at least two platform instances next to each other in order for this to
work properly. Remember that you can delete instances using the right mouse button
or move them around by holding down the Control key and clicking the left mouse
button at the same time.
6.
Click on the little green tick in the top left of the toolbar to close the Room Properties
form by.
Now run the game by pressing the green play button on the main Game Maker toolbar. Your
room should appear with each platform neatly rounded off at either end. If this doesn't work
correctly, then go back and check your steps up to this point. You will also find the current
version of the game on the CD in the file
Chapter02/Games/fishpod1.gmk
.
■
Tip
Don't forget to save your work regularly by clicking on the blue disk icon on the main toolbar.
Search WWH ::
Custom Search