Page 105 - Touchpad_Plus_V3.2_Class 5
P. 105

8                              More on Scratch















                              Your Aim

                               to learn about:

                                     Creating a Simple Game            Using Operators
                                      Variables                          Conditions
                                       Sensing Blocks                      Storing User Input
                                         Loops






                 In the previous classes, you have learnt to use the code blocks to make the sprite
                 perform a variety of actions. You have also learnt to create various shapes and

                 designs. In this chapter  you  will learn  to  use other  advanced  blocks to  create
                 games and perform arithmatic operations. Sprite is an interactive and versatile
                 programming language  that  can be used to create  complex programs and
                 algorithms. Scratch is one of the programming languages used in robotics. You
                 can store values in the form of variables and use them to create various programs.

                 Let us begin with creating a simple game.
                     CREATING A SIMPLE GAME

                 Let  us create  a  simple game  in Scratch  with  the
                 blocks learnt so far.

                 The game is about creating a basketball court with
                 various items like a basketball, two players, etc. and
                 showing the boys playing basketball.

                 The image shows how  the program  opens, it
                 displays 2 boys, a basketball court and a ball. It is
                 a simple program. When the green flag is clicked,
                 the boys move to their position and the ball starts
                 moving from one boy to the other. The code also

                 specifies the initial position of each sprite when the
                 green flag is clicked.
                                                                                                  Sprites


                                                                                               More on Scratch       103
   100   101   102   103   104   105   106   107   108   109   110