Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 128 - 2607_Trackpad_Pro_5.1_flipbook_C5
P. 128

    21 st
                             LAB ACTIVITY                                                       Century   #Technology Literacy
                                                                                                  Skills
                            Visit your computer lab and perform the following actions:
                            ▶   Create a game of Pong using the knowledge of all the various blocks you have learnt
                              so far. The goal of the game is to keep the ball moving by hitting it with the paddle and
                              preventing it from touching the red line. Add a background and other customisations
                              according to your creativity.

                                 Follow the instructions below to create the game. (You can also make changes
                              accordingly).
                                (a)  Create two sprites: a ball that the user will be playing with and a paddle to control
                                  the ball.

                                (b)  Now, let’s create stacks of blocks to move the paddle sprite left and right so that it
                                  can come in contact with the ball.

                                (c)  To control the behaviour and movement of the ball, create the following stacks of
                                 code for the ball.

                      126   Premium Edition-V

| 123 124 125 126 127 128 129 130 131 132 133 |