Game Development Reference
In-Depth Information
lapping), while in the lower half two segments are too close to each other, forming a very
sharp edge.
Figure 4-9 . This shape has some invalid segments and will likely behave improperly during collisions
Now repeat creating border CCB files and editing their collision shapes for the remaining
border sprites. If you like, you can cut it short and do only one additional border CCB
sprite, so you have at least a little variety.
Tip Keep in mind that you can always go back to the border CCBs at any time
and change their collision shapes and other properties. All changes to a border
CCB will be reflected by all Sub File instances of that CCB—for instance, the
possibly dozens of borders you are going to add to the level.
Adding Level Borders
With the border elements set up, you can now add them to the level.
Open Level1.ccb . Start by dragging a regular Node from the Node Library View
onto the CCPhysicsNode in the Timeline so that it becomes a child node of the
CCPhysicsNode . Then rename this new node as borders . You can then group all the
border nodes under this borders node. This, in turn, allows you to expand and collapse its
children, effectively using the borders node like a folder in Finder.
Once you're done editing the level's borders, you will be glad to be able to collapse the
borders node and not have the border nodes clutter up the Timeline. Moreover, you can
Search WWH ::




Custom Search