Game Development Reference
In-Depth Information
You can also set the mask bit for the same category, allowing multiple objects
of the same category to collide with each other. In the case of the ball shape, it
would make sense to set the Mask bit of the Ball category to allow ball-to-
ball collisions. This will be useful if you want to extend the pinball game to
support a multiple balls on the table at the same time.
Below the Cat. and Mask columns are the buttons All, None, and Inv., which allow you
to check all, uncheck all, or invert the check boxes' checked status. They're helpful to
avoid clicking possibly dozens of check boxes one after another.
Defining the Table Shapes
The pinball table consists of three separate shapes named table-bottom , table-
left , and table-top . The table background image is split up to make it easier to
edit its shapes and to make it easier to create different pinball layouts without having to
replace the entire image.
Select the table-top image in the Shapes pane to start editing the shape for the top-
most part of the pinball table. As you can see in Figure 13-6 , it's a concave shape. With
the manual method used to define the plunger, it would be difficult and error-prone to
create all the vertices of this round shape manually, let alone ensure that the resulting
shape is convex. PhysicsEditor makes that a lot easier for you: it traces the shape's out-
line and creates a suitable shape with a single mouse click!
Search Nedrilad ::

Custom Search