.. note:: Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts. **Why Join?** - **Expert Support**: Solve post-sale issues and technical challenges with help from our community and team. - **Learn & Share**: Exchange tips and tutorials to enhance your skills. - **Exclusive Previews**: Get early access to new product announcements and sneak peeks. - **Special Discounts**: Enjoy exclusive discounts on our newest products. - **Festive Promotions and Giveaways**: Take part in giveaways and holiday promotions. 👉 Ready to explore and create with us? Click [|link_sf_facebook|] and join today! Clicker Game ============== Description ------------- Today we will play a game of poking balloons. Click the green flag to start. .. raw:: html Or click `Clicker Game `_, and then learn online tutorial on the Scratch official website. Required Components ------------------------------- - A Screen - Scratch 3 (either online or offline) You Will Learn --------------------- - Pick random number. - Change the position, size and color of the sprite. - Make a variable. Lesson Guide -------------- Let the balloons appear randomly. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ First, add Balloon1 sprite and Colorful City backdrop. .. image:: img/clicker_game1.png :align: center Set the balloon to a random position. .. image:: img/clicker_game2.png :width: 500 :align: center Let it change the color and size randomly. .. image:: img/clicker_game3.png :width: 700 :align: center Now, run the green flag and you can see the balloons randomly change in the stage area. Click on the balloon to add score. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Now, we need to establish a scoring mechanism. Whenever the balloon is clicked, the score will increase by one. Create a variable (it can help us keep track of and store the score). In Variables, select 「**Make a Variable**」 and named **score**. .. image:: img/clicker_game4.png :align: center We will see it in the upper left corner of the stage. .. image:: img/clicker_game5.png :align: center When the balloon is clicked, the score is increased by one. When you click the green flag (the game starts), the score will be reset to zero. .. image:: img/clicker_game6.png :width: 700 :align: center Now, click the green flag above the stage area to start the game, and click the balloon to increase your score! Challenge ----------- I believe that you will be smart enough to program and implement this game soon. Next, we will add some challenges to enrich our game content. - When the balloon is clicked, the sound effect of "POP" is emitted. - Let the Pufferfish sprite appear randomly on the stage as well, if you click on it, you will lose score!