Page 118 - Scratch Programming Playground
P. 118

Summary


                         In this chapter, you built a game that

                         X X Implements gravity and realistic falling
                         X X has a side-view perspective instead of a top-down view
                         X X Uses variables to keep track of scores, falling speeds, and
                             the first time a basket is made
                         X X has a hitbox to detect when a basket is made
                             The use of gravity in this program was pretty simple.
                         By the time you reach Chapter 9, you’ll be able to make an
                         advanced platformer game with more complex jumping and
                         falling. But there are plenty of Scratch programming tech-
                         niques to practice first. In Chapter 5, you’ll make a side-view
                         game that uses cloning to duplicate a sprite dozens of times.




                         review Questions


                         Try to answer the following practice questions to test what
                         you’ve learned. you probably won’t know all the answers off
                         the top of your head, but you can explore the Scratch editor to
                         figure out the answers. (The answers are also online at http://
                         www.nostarch.com/scratchplayground/.)
                         1.  how is a side-view game (like the Basketball game) differ-
                             ent from a top-down game (like the Maze Runner game)?
                         2.  what can a variable store?

                         3.  what is the difference between For this sprite only and
                             For all sprites?

                         4.  how can you make a sprite jump?
                         5.  when the cat jumps in the Basketball game, what keeps it
                              from just going up forever?

                         6.  what is the difference between the glide and go to x y
                             blocks?
                         7.  how do you make the code inside an if then block run if
                              two conditions are true?




      92    ChapTer 4
   113   114   115   116   117   118   119   120   121   122   123