Game Development Reference
In-Depth Information
Adding Platforms
Cats love to jump, so let's give the cat character something to jump on!
1. Create a 50-by-50 pixel square Lh]pbkni symbol in the Library . (Feel free to create your own
graphics and symbols for this game, but if you're feeling a bit lazy, you'll find all the symbols
for the original Bug Catcher game in the >qc?]p_danOui^kho folder in the Library .)
2. Drag as many instances of the Lh]pbkni symbol onto the stage as you like, in any arrangement
that you think will be fun to jump on. You can also use the free-transform tool to stretch these
platform instances to any rectangular shape that you like. The platform collision code that
you'll be adding can handle rectangular-shaped platforms of any size.
3. Give all your platforms instance names. Name them in this format: lh]pbkni,, lh]pbkni-,
lh]pbkni., lh]pbkni/, and so on. It's very important to give them all the same root name, such
as platform, and start the numbering at zero (you'll see why very soon). My arrangement of
platforms looks like Figure 9-9.
Figure 9-9. Give your platforms instance names in the format platform0, platform1,
platform2, and so on.
Search Nedrilad ::

Custom Search