Game Development Reference
In-Depth Information
5.
Include a
Test Instance Count
action (
control
tab) to test when the number of
instances of
obj_gold
is
equal to
0
. This means that the next action will only happen
when the last instance of
obj_gold
has been collected.
6.
Include a
Next Room
action (
main1
tab) and select your preferred
Transition
.
You could now begin to create some interesting levels for your game, but many of the objects
in the resource list shouldn't actually be placed on the level, so let's tidy that up a bit first.
Creating a Resource Group for Private Objects
1.
Right-click on the
Objects
folder in the resources menu and select
Create Group
. Call
the group
Private
, or something similar. This will contain all the objects that should
not be placed in a room using the Room Editor.
2.
Drag the following objects into the new group folder:
obj_pod_standing
,
obj_pod_walking
,
obj_pod_jumping
,
obj_pod_falling
,
obj_pod_dying
,
obj_rock_end
,
obj_rock_begin
,
obj_platform
,
obj_hazard
,
obj_lava_begin
, and
obj_lava_end
.
3.
You should now just be left with five objects outside of the new group folder:
obj_rock_middle
,
obj_pod
,
obj_pansy
,
obj_lava_middle
, and
obj_gold
.
Now it's much easier to focus on the five relevant objects when creating your rooms. Have a
go at creating a few levels now. You can place
obj_rock_middle
and
obj_lava_middle
in lengths of
two or more and the ends will be added automatically. Consider the placement of lava carefully
as it will kill Fishpod when he collides with it from both above and below. Each level you create
should have one instance of
obj_pod
and at least one instance of
obj_gold
. Also include a final
room that has a congratulatory message spelled out using gold instances as a final reward.
Finishing Touches
Our final task will be to improve the presentation of the game by adding a few finishing touches
in the form of backgrounds and sound effects.
Adding the Finishing Touches
1.
From the
Resources
menu, use the
Create Sound
option to create new sound
resources for the five sound effects in the
Chapter02/Resources
directory on the CD
(you can also create sounds by right-clicking on the
Sounds
folder in the resource tree,
or using the little speaker button on the toolbar). Give them the same names as their
filenames without the
.wav
or
.mp3
extensions and leave other settings as they are.
Reopen
obj_pod
and add an
Other, Game Start
event. Include a
Play Sound
action
(
main1
tab) for
snd_thunder
and set
Loop
to
true
.
2.
3.
Now select the
Collision
event with
obj_gold
. At the start of the actions list, include a
Play Sound
action (
main1
tab) for
snd_gold
and leave
Loop
as
false
.
Reopen
obj_pod_walking
(now in your new group folder) and select its
Create
event. At
the start or end of the actions list, include a
Play Sound
action for
snd_walk
and leave
Loop
as
false
.
4.
Reopen
obj_pod_jumping
and select its
Collision
event with
obj_platform
. At the start
of the actions list, include a
Play Sound
action for
snd_splash
and leave
Loop
as
false
.
5.
Search WWH ::
Custom Search