Start a new Scratch project. Delete the cat by right-clicking it and selecting Delete.

Similar documents
Table Football. Introduction. Scratch. Let s make a world cup football game in Scratch! Activity Checklist. Test your Project.

Felix and Herbert. Level. Introduction:

Felix and Herbert. Level

3. Select a colour and then use the Rectangle drawing tool to draw a rectangle like the one below.

You are going to learn how to make a game, in which you ll use the mouse to navigate a boat to a desert island.

SCRATCH CHALLENGE #3

Boat Race. Introduction. Scratch

In this project you ll learn how to create a football game in which you have to score as many goals as you can in 30 seconds.

Boat Race. Introduction. Scratch. You are going to learn how to make a game, in which you ll use the mouse to navigate a boat to a desert island.

1. First start a new scratch project and remove the default sprite.

Start - All Programs - Class Software - Scratch - Scratch move move move Sound play drum move move move play drum Control forever forever forever

Step 1. CoderDojo Milltown Exercise 1 Pong Page 1 of 13

Get it here. Page 1 of 7 Date:Jan 8, 2014

Penalty Kick in Ipanema

First Edition. Teaching Scratch. at primary school. Thomas Arts

Scratch Hands-on Assignments CS4HS - Summer 2017

The Final Fight STAGE. * Download file Scratch Stage 9. Chapter Objective. The Game

Encountering Condi.ons

Activity 8: Cave Surfing Game

Lets Play Catch! Keeping Score in Alice. Overview. Set Up. Position the ball 20 feet away: Orienting the ball 7/19/2010

BBoard PONG game. Creative Computing #1

Animate: Adding Sounds

The ICC Duckworth-Lewis-Stern calculator. DLS Edition 2016

Wiimote in Physical Etoys

Managing Timecard Exceptions

CS Problem Solving and Object-Oriented Programming Lab 2 - Methods, Variables and Functions in Alice Due: September 23/24

PROGRAMMING LINX LEARNING GAME

How to run a club night

Shooting Target Game. The user will be able to input a player s name and destroy a predefined number of dartboards before the game ends.

LEGO Engineering Conferences ROBOLAB and MINDSTORMS Education Version 4.5 March 2008

Robot Activity: Programming the NXT 2.0

Boyle s Law: Pressure-Volume Relationship in Gases

The ICC Duckworth-Lewis Calculator. Professional Edition 2008

Steltronic StelPad User Guide

: User Manual. 1 Getting Started

EXPLOSIVE STORAGE CAPACITY CALCULATING TOOL USER MANUAL

Old Kings Oval Electronic Scoreboard. Scoreboard Operation and Advanced Scoring Instructions

Competition Management

Tutorial 2 Time-Dependent Consolidation. Staging Groundwater Time-dependent consolidation Point query Line query Graph Query

WASHINGTON STATE MIDDLE SCHOOL COMPUTER SCIENCE COMPETITION

QUICK WARM UP: Thursday 3/9

The following steps take you through creating a hytek database for a new season May 1 st to April 30 th.

Horse Farm Management s Report Writer. User Guide Version 1.1.xx

Hot Springs Village Member Portal User Guide

GETTING STARTED. Main MENu SCREEN: When starting E6, the Main Menu screen displays the following buttons:

FIBA Europe Coaching Website. Manual. Practice Section

Write Your Own Twine Adventure!

ISSUE #1 / SUMMER 2016

User Guide. Version Mindjet

Tennis...32 Stay above...34 Decimal...36 Bundesliga simulator...38 Shooter management...41 Installation...43 Registration...45 Where do I get the

Heart Foundation Walking Website user guide for Walk Organisers

BiiSafe Buddy User Guide

Counterbore and Countersink Tutorial

LBC Admin Access to USA Boxing s Match Tracker

Club s Homepage Use this feature to return the club s website.

Integrated Sports Systems (ISS) Inc. Meet Management Suite

CONTENTS... 2 CONFIGURATION... 3 VENUE MANAGEMENT SETTING UP COMPETITIONS TEAM MANAGEMENT FIXTURING PUBLICATION...

Student Exploration: Distance-Time Graphs

Page 1 GM-FAQ Club Profile FAQs. Page

BALL PLACEMENT 1 Driver, Woods, Hybrids & Irons Chip Shots Putting

DUTCH5 USER GUIDE February 2013

Wire Buddy Manual IOpath Software

Dive Sheets & Running Events Meet Management Software Tutorial for EZMeet Version 3.1 revised 2/4/2006

APBA Baseball for Windows 5.75 Update 22

Website User Guide for Walk Organisers

Microsoft Windows Software Manual for FITstep Stream Version 4

To Logon On to your tee sheet, start by opening your browser. (NOTE: Internet Explorer V. 6.0 or greater is required.)

Walk-O-Meter User Manual

Race Screen: Figure 2: Race Screen. Figure 3: Race Screen with Top Bulb Lock

APBA Baseball for Windows 5.75 Update 17

INSTRUCTIONS FOR USING HMS 2016 Scoring (v1)

CSE 154: Web Programming Spring 2017 Homework Assignment 5: Pokedex. Overview. Due Date: Tuesday, May 9th

mycricketsupport.cricket.com.au General Tips.. Page 2 Wrong Batsman?.. Page 3 Wrong Bowler?.. Page 4 Editing a current over Page 5

TECHNICAL NOTE HOW TO USE LOOPERS. Kalipso_TechDocs_Loopers. Revision: 1.0. Kalipso version: Date: 16/02/2017.

Club s Homepage Welcome Club Calendar Logout Add a Request Play Date Requested Time Hole Selection # of Tee Times Break Link

WASHINGTON STATE MIDDLE SCHOOL COMPUTER SCIENCE COMPETITION

FOOTBALL WEST. Sports TG User Guide. Club Administrators

Walking for Health: Scheme page guide Contents

User Manual. Version: Date: June Copyright , BetDynamics Limited.

ARCCOS 360 NEW USER GUIDE

Sesam HydroD Tutorial

STRIDES USER GUIDE Version September 2014

Entering Immunization Data

McKnight Hockey Association

FIRST Tech Challenge Scorekeeper Manual Part II: Scoring System Guide (For Non-League Event Types)

ALGE Water Polo Scoreboard

MAKE & COLLABORATE: BOWLING WITH OZOBOT

Slide 1 - Welcome to an Overview of the Student Center and New Titan Online

CHAPTER 3: ADVANCED PIECE MENU FUNCTION by Su-Jeong Hwang Shin, Ph.D. Professor

Fastball Baseball Manager 2.5 for Joomla 2.5x

iregatta User Manual

How to Chart. Curl Coach. November Stephen Orr. Coach Beyond Statistics

How-to Edit/Delete a Score

BVIS Beach Volleyball Information System

Guide to Using I CSA TechScore

Student Exploration: Distance-Time and Velocity-Time Graphs

ACCOUNT MANAGER REFERENCE GUIDE

GN21 Frequently Asked Questions For Golfers

Custom Boarding Feature

GN21 Frequently Asked Questions For Golfers

Transcription:

Toby Introduction In this project, we are going to create a game in which Toby the dog has to collect 5 cheese-puffs bowls to win, whilst preventing balls from falling on the floor. If Toby drops more than 2 balls, the game is over. So the question is: can you keep all the balls in the air? Step 1: Controlling Toby Activity Checklist Start a new Scratch project. Delete the cat by right-clicking it and selecting Delete. Click on the stage. Choose a backdrop from the Scratch library: the night city with street backdrop is a good choice for this project. Delete the original blank backdrop. Add a new sprite. select the Dog2 sprite from the Animals section. Dog2 comes with three costumes. Delete the third costume dog2-c as 1

we only want the first two. Click on the blue i button to the top left of the sprite picture. Rename the sprite Toby Select the left-right rotation style as shown on the picture below: We want Toby to move right when we press the right arrow key. Click on the scripts tab, and add this script: when switch backdrop to night city with street if key right arrow pressed? then point in direction 90 move 10 steps next costume Click on the Green Flag, and check that Toby can move right when you press the right arrow key. Now we need to add more code to allow Toby to move left as well. Add this to your script: 2

when switch backdrop to night city with street if key right arrow pressed? then point in direction 90 move 10 steps next costume if key left arrow pressed? then point in direction -90 move 10 steps next costume Test Your Project Click the green flag, press the left arrow key. Does Toby move left? Now try the right arrow key! Save your project Step 2: Keeping Toby busy! Now that Toby can move, let s give him something to do. In order to win the game, Toby must collect 5 cheese-puffs bowls. We need the bowls to appear randomly at different times and places. Activity Checklist Add a new sprite from the library: select the cheesy-puffs from the Things category, and rename it bowl. Click on the Costumes tab and reduce the size of the cheese-puffs bowl by clicking on the shrink icon at the top near the scissors. You then 3

need to click on the bowl sprite to make it smaller. The shrink icon looks like this: If you used a different method to resize the bowl, you may need to reset the centre of the costume so that it is at the centre of the bowl. To do this, click on the Set costume centre icon at the top right corner, and move the crosshair as shown on the picture below: The cheesy-puffs need to appear in random places on the pavement. The y position will remain the same, but the x position needs to change so that the bowl sometimes appears on the right, on the left, or in the middle. Add the following script to the bowl sprite: when wait 5 secs go to x: pick random -220 to 220 y: -140 Click the green flag, and wait for a bit. Does the cheese-puffs bowl keep moving to different places every 5 seconds? At the moment, the game is too predictable! Let s make it more difficult 4

by hiding the bowl from time to time. Modify the script in the following way: when hide wait pick random 1 to 10 secs go to x: pick random -220 to 220 y: -140 show wait pick random 1 to 10 secs hide Test Your Project Click the green flag, the cheese-puffs bowl should now appear for random lengths of time, and in random places. Save your project Step 3: Counting the bowls In order to win the game, Toby must collect 5 cheese-puffs bowls. Activity Checklist Create a bowls variable to keep track of how many bowls Toby has collected so far. 5

Now we need to add some code to keep track of how many bowls Toby has collected so far. Each time that Toby touches a cheese-puffs bowl, the bowls variable needs to be increased by 1. So add this script to the cheese-puffs bowl sprite. (Make sure that you keep the previous script as well! We need both scripts) when set bowls to 0 if touching Toby? then change bowls by 1 wait 0.5 secs hide The game should be stopped when the number of bowls collected reaches 5. We are going to broadcast a new message called won to the other sprite and the background to let them know that the player has 6

won. Modify your second script so that it looks like this: when set bowls to 0 if touching Toby? then change bowls by 1 if bowls = 5 then broadcast won stop other scripts in sprite wait 0.5 secs hide Add a small script for Toby so that he says well done! when he receives the won message: when I receive won say Well done! for 2 sec s Test Your Project Click the green flag, does the bowls variable increase each time the dog collects a bowl? Does Toby say well done once 5 bowls have been collected? Save your project Challenge 1: Adding sound 7

Can you add some code to play a pop sound each time a bowl is collected? Can you add a small script for the background so that it changes and plays music when the player wins? Hint: You will need to add a script for your stage starting with a when I receive won block Save your project Step 4: Adding a bouncing ball Let s make the game a bit more exciting by adding a bouncing ball! Toby has to catch the ball. If Toby drops 3 balls before he has time to collect his 5 bowls of cheese-puffs, the game is over! Activity Checklist Add a new sprite: select the Beachball from the Scratch library. Shrink the Beachball. Make sure that the centre of the costume is set correctly, i.e. at the centre of the ball. You can check this by clicking on the Set costume centre icon, located at the top right corner in the Costumes tab. It is important to set the centre correctly, as it will affect the way the ball moves. Now we need this ball to fall from the sky, and bounce everywhere. Add the following script to your ball: 8

when show go to x: pick random -220 to 220 y: 160 point in direction 135 move 4 steps if on edge, bounce Test Your Project Click the green flag, your ball should fall from the sky and bounce off the edges of the background. Which number do you need to modify to make the ball bounce faster or slower? Save your project Step 5: Add more bounce But the problem is: nothing happens when Toby touches the ball. Let s fix this! Activity Checklist Modify your script so that when the ball touches Toby, it bounces off as well: 9

show when go to x: pick random -220 to 220 y: 160 point in direction 135 move 4 steps if on edge, bounce if touching Toby? then turn pick random 90 to 270 degrees move 100 steps We also need to add some code to detect when the ball touches the floor. The ball seems to be touching the floor when its y position is less than 140. This is an approximate number, and you may need to adjust it, especially if you have chosen a different background. We are going to modify the script so that the ball moves back to the top (and changes colour) as soon as it is dropped. Import the water drop sound, and modify your script again: 10

show when go to x: pick random -220 to 220 y: 160 point in direction 135 move 4 steps if on edge, bounce if touching Toby? then turn pick random 90 to 270 degrees move 100 steps if y position < -140 then change color effect by 25 go to x: pick random -220 to 220 y: 160 play sound water drop Test Your Project Click the green flag, what happens when the ball is dropped? Can you see a new ball falling from the top? Is it a different colour? Save your project Step 6: Counting the dropped balls Activity Checklist We now need to keep track of how many balls Toby has dropped so far. To do this, create a variable for all sprites called droppedballs. 11

When we start the game, Toby has not dropped any balls yet, so we need to initialise the droppedballs variable to 0. Each time the balls touches the floor, the droppedballs variable needs to be increased by 1. When the number of dropped balls is more than 3, the game is over, so we will broadcast a new message called gameover to tell the other sprites and the background that the game is over, and the player has lost. Your Beachball script should now look like this: 12

when set droppedballs to 0 show go to x: pick random -220 to 220 y: 160 point in direction 135 move 4 steps if on edge, bounce if touching Toby? then turn pick random 90 to 270 degrees move 100 steps if y position < -140 then change droppedballs by 1 if droppedballs = 3 then broadcast gameover hide stop this script change color effect by 25 go to x: pick random -220 to 220 y: 160 play sound water drop When the players wins, the game should stop, and the ball should stop bouncing and hide: 13

hide when I receive won stop other scripts in sprite Add this script to your bowl sprite to stop it from appearing when the game is over: when I receive gameover stop other scripts in sprite Click on the stage. Then click on the Sounds tab, and import the spooky string sound from the Scratch library, and the triumph sound. Add this script to the stage so that it plays a spooky string sound when the game is over: when I receive gameover change color effect by 25 play sound spooky string Add this script to the stage so that it changes colour several times and plays a triumph sound when the player wins: when I receive repeat 12 won play sound triumph change color effect by 25 wait 0.5 secs Finally, add this script to make sure the colour of the stage comes back to normal when the game is restarted. 14

when clear graphic effect s Test Your Project Click the green flag, does the droppedballs variable increase each time a ball is dropped? Test your game in as many ways that you can think of (winning and losing for example) Does it work as expected? Save your project Challenge 2: make the game more challenging What could you do to make the game more challenging? Here are some suggestions: + Make the bowls hide more quickly, and for longer. Which parameters do you need to modify to achieve this? + Make the ball move a lot faster, or add another ball: maybe it could be a basketball this time. You can copy the script from the beach ball onto the basketball using drag and drop, there is no need to rewrite the whole script + You could make a level 2 for your game, with a different background, and more balls bouncing around. Instead of collecting cheese-puffs bowls, Toby could this time collect some donuts. (There is a donut sprite in the Scratch library). You could create a level variable to keep track of the level you re currently playing. Save your project 15

Well done, you have finished! Now you can enjoy your game! Don t forget you can share your game with all your friends and family by clicking on Share on the menu bar! 16