Balloons. Introduction. Scratch. You are going to make a balloon-popping game! Activity Checklist. Test your Project.

Similar documents
Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Fruit Machine. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Scratch Primary Lesson 4

Fish Chomp. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

REFERENCE GUIDE 1. INTRODUCTION

1.0-Scratch Interface 1.1. Valuable Information

How to Build a Simple Pac-Man Game

Make your own Temple Run game

CORSAIR GAMING KEYBOARD SOFTWARE USER MANUAL

Use fireworks and Bonfire night as a stimulus for programming

The Richard Pate School. Draft Year 4 Scheme of Work for Scratch

Hello. What s inside? Ready to build a website?

Authorware Install Directions for IE in Windows Vista, Windows 7, and Windows 8

Digital Marketing EasyEditor Guide Dynamic

HOWTO annotate documents in Microsoft Word

SMART NOTEBOOK 10. Instructional Technology Enhancing ACHievement

Turtle Power. Introduction: Python. In this project, you ll learn how to use a turtle to draw awesome shapes and patterns. Activity Checklist

SMARTstuff. The first rule for using an interactive whiteboard is very simple and of the utmost importance: Have faith in yourself you can do this!

Working with SQL Server Integration Services

Hello. What s inside? Ready to build a website?

Task Card #2 SMART Board: Notebook

Microsoft PowerPoint Exercises 4

MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

Activities for LEGO WeDo in Scratch 1.4+ Barb Ericson

Content Author's Reference and Cookbook

Welcome to The Grid 2

Introduction to Microsoft OneNote

So you want to create an a Friend action

Exporting an image from Sibelius to Microsoft Word

MovieClip, Button, Graphic, Motion Tween, Classic Motion Tween, Shape Tween, Motion Guide, Masking, Bone Tool, 3D Tool

Creating trouble-free numbering in Microsoft Word

Boardmaker Plus Basics

HOW TO ORGANIZE PICTURES

VERSION 3.0 MAC USER GUIDE

Instructions for the ACER Laptops

COMMONWEALTH OF PA OFFICE OF ADMINISTRATION. Human Resource Development Division. SAP LSO-AE Desk Guide 15 T H J A N U A R Y,

(These instructions are only meant to get you started. They do not include advanced features.)

Sage Accountants Business Cloud EasyEditor Quick Start Guide

Capturing Material. Section 3

Rhythm Rascal Quick Start Guide Overview

Using Your Data Projector as a Second Monitor

CentralMass DataCommon

What You ll Build. CHAPTER 3 MoleMash

Advanced Programming with LEGO NXT MindStorms

Creating Animated Apps

Fusion's runtime does its best to match the animation with the movement of the character. It does this job at three different levels :

Lync 2013 FAQ s. How do I keep my Lync conversation window on top of all the other windows on my computer, so I can see it while I work?

Chapter 19: XML. Working with XML. About XML

Dell SE2716H Monitor Dell Display Manager User s Guide

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

Hello Purr. What You ll Learn

Workshare imanage Integration File Sharing & DMS Mobility. Getting Started Guide

3. Add an Event: Alarm Alarm 0 a. Add an Action: Set Variable i. Applies to: Self ii. Variable: time_left iii. Value: +1 iv. Check the Relative box

Using Flow Control with the HEAD Recorder

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL

Adding emphasis to a presentation in PowerPoint 2010 and 2013 for Windows

MICROSOFT OUTLOOK 2011 ORGANIZE MESSAGES

PowerPoint 2007 Basics Website:

TUTORIAL: BOARDMAKER STUDIO START-UP

Skyward Creating and Administering Online Assignments

AN INTRODUCTION TO DIAMOND SCHEDULER

Quick Start Guide. Microsoft Publisher 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

RemoteWare Software Manager

MAKE YOUR FIRST A-MAZE-ING GAME IN GAME MAKER 7

Offline Files & Sync Center

Designing Games with Game Maker

Unity Version Control

Smart Connection 9 Element Labels

itunes Basics Website:

CHAPTER 18 Programming Your App to Make Decisions: Conditional Blocks

Excel Reports and Macros

THE WINNING ROULETTE SYSTEM.

IT Quick Reference Guides Using Windows 7

CAE-Link Corporation. Building Design and Engineering Services. Dwg Manager. April AutoCAD 2000i through , CAE-Link Corporation

COBRA. Audio Box Detailed User Guide

Named Memory Slots. Properties. CHAPTER 16 Programming Your App s Memory

Android Programming Family Fun Day using AppInventor

Inking in MS Office 2013

RingCentral for Desktop. UK User Guide

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

Microsoft Word Track Changes

MAKE AN A-MAZE-ING GAME

Website Creator Pro Quick Reference Guide. Version: 0.5

Ten easy steps to creating great MicroWorlds EX projects. Steve Robson

INTRODUCTION TO DESKTOP PUBLISHING

Summary of important mathematical operations and formulas (from first tutorial):

Action settings and interactivity

App Inventor Tutorial 4 Cat & Mouse Game

How to Record Voice Narration in Powerpoint Rachel Cunliffe 2001

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin:

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Microsoft Excel 2013: Macro to apply Custom Margins, Titles, Gridlines, Autofit Width & Add Macro to Quick Access Toolbar & How to Delete a Macro.

User Guide January 10

Using WebEx Player. Playing a recording. Installing WebEx Player. System requirements for listening to audio in a recording

MetaTrader 4 and MetaEditor

How to create a Flash banner advert in DrawPlus X2

Working with the Multi Cam Mode in EDIUS

Transcription:

Scratch + Balloons All Code Clubs must be registered. By registering your club we can measure our impact, and we can continue to provide free resources that help children learn to code. You can register your club at codeclubworld.org. Introduction You are going to make a balloon-popping game! Activity Checklist Test your Project Save your Project Follow these INSTRUCTIONS one by one Click on the green flag to TEST your code Make sure to SAVE your work now 1

Step 1: Animating a balloon Activity Checklist Start a new Scratch project, and delete the cat sprite so that your project is empty. You can find the online Scratch editor at jumpto.cc/scratch-new. Add in a new balloon sprite, and a suitable stage backdrop. Add this code to your balloon, so that it bounces around the screen: 2

Test out your balloon. Does it move too slowly? Change the numbers in your code if you want to speed it up a bit. Did you also notice that your balloon flips as it moves around the screen? Balloons don t move like this! To fix this, click on the balloon sprite icon, and then click the blue i information icon. In the rotation style section, click the dot to stop the balloon rotating. Test your program again to see if the problem is fixed. Save your project Step 2: Random balloons 3

Activity Checklist With the code you have now, your balloon will always start in the same place and move in the same path. Click the flag a few times to start your program, and you ll see it s the same every time. Instead of using the same x and y position each time, you can let Scratch choose a random number instead. Change your balloon s code, so that it looks like this: If you click the green flag a few times, you should notice that your balloon starts in a different place each time. You could even use a random number to choose a random balloon colour each time: What happens if this code is put at the start of your program? Does anything different happen if you put this code inside the forever loop? Which do you prefer? 4

Save your project Challenge: More randomness Can you make your balloon start by pointing in a random direction (between -90 and 180)? Save your project Step 3: Popping balloons Lets allow the player to pop the balloons! Activity Checklist Click on your balloon sprite, and then click the Costumes tab. You can delete all of the other costumes, just leaving 1 balloon costume. Add a new costume, by clicking Paint new costume and create a new costume called burst. Make sure that your balloon switches to the right costume when the game starts. Your code should now look like this: 5

To allow the player to burst a balloon, add this code: Test out your project. Can you pop the balloon? Does it work as you expected? You ll need to improve this code, so that when the balloon is clicked, it shows the burst costume for a short time, and is then hidden. You can make all of this happen by changing your balloon when sprite clicked code to this: Now that you re deleting the balloon when it s clicked, you ll also need to add a show block to the start of the when flag clicked code. Try popping a balloon again, to check that it works properly. If you find it difficult to pop the balloon without dragging it 6

around, you can play the game in fullscreen mode by clicking this button: Save your project 7

Step 4: Adding a score Let s make things more interesting by keeping score. Activity Checklist To keep the player s score, you need a place to put it. A variable is a place to store data that can change, like a score. To create a new variable, click on the Scripts tab, select Data and then click Make a Variable. Type score as the name of the variable, make sure that it is available for all sprites, and click OK to create it. You ll then see lots of code blocks that can be used with your score variable. 8

You ll also see the score in the top-left of the stage. When a new game is started (by clicking the flag), you want to set the player s score to 0. Add this code to the top of the balloon s when flag clicked code: Whenever a balloon is popped, you need to add 1 to the score: Run your program again and click the balloon. Does your score change? Save your project Step 5: Lots of balloons Popping 1 balloon isn t much of a game, so let s add lots more! One simple way to get lots of balloons is just to right-click on the balloon sprite and click duplicate. This is OK if you only want a few, but what if you 9

need 20? or 100? Are you really going to click duplicate that many times? Activity Checklist A much better way of getting lots of balloons is to clone the balloon sprite. Drag your balloon when flag clicked code (except the score block) off of the event (don t delete it), and instead add code to create 20 balloon clones. You can now attach the code you ve just removed to the when I start as a clone event. You should also replace the hide block in the balloon-clicking script with a delete this clone block. Your balloon code should now look like this: Test your project! Now when the flag is clicked, your main balloon sprite will hide and then clone itself 20 times. When each of these 20 clones is started, they will each bounce around the screen randomly, just as they did before. See if you can pop the 20 balloons! Save your project 10

Step 6: Adding a timer You can make your game more interesting, by only giving your player 10 seconds to pop as many balloons as possible. Activity Checklist You can use another variable to store the remaining time left. Click on the stage, and create a new variable called time : This is how the timer should work: The timer should start at 10 seconds; The timer should count down every second; The game should stop when the timer gets to 0. Here s the code to do this, which you can add to your stage: To add the repeat until time = 0 code, first you ll need to drag a green = block, onto your repeat until block: 11

You can then drag your time variable onto the = block: Drag your time variable display to the right side of the stage. You can also right-click on the variable display and choose large readout to change how the time is displayed. Test your game. How many points can you score? If your game is too easy, you can: Give the player less time; Have more balloons; Make the balloons move faster; Make the balloons smaller. Test your game a few times until you re happy that it s the right level of difficulty. 12

Save your project Challenge: More objects Can you add in other objects to your game? You can add good objects, like donuts, that give you lots of points, or bad objects, like bats, that take points away. You ll need to think about the objects you re adding. Think about: How many will there be? How big is it? How does it move? How many points will you score (or lose) for clicking it? Will it move faster or slower than the balloons? What will it look/sound like when it s been clicked? If you need help adding another object, you can reuse the steps above! Save your project 13