Game Development Reference
In-Depth Information
You can open the MyFirstPong_step5.gameproj file to see the results at this
stage. By changing the value of P1Serving from true to false in the Attribute
Editor, you can serve from either Racket 1 or Racket 2 in the Preview mode.
Let's put some walls around this game now!
Walls
The next step is to create some walls around the playing area and implement
some bounciness.
As usual, create a new actor. Double-click this new actor to edit it in the Actor
Editor. Change the attributes as per the following:
Name: Bouncing Wall
Size/Width: 480
Size/Height: 10
Physics/Density: 500
Physics/Restitution: 0
Physics/Fixed Rotation: Checked
Physics/Moveable: Unchecked
Go back to the Scene Editor. Drag the Bouncing Wall into the scene and
position it just above the visible scene. Drag another Bouncing Wall into the
scene and position it just below the visible scene. Refer to Figure 2-30 to see
the result.
 
Search WWH ::




Custom Search