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

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

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

Use fireworks and Bonfire night as a stimulus for programming

How to Build a Simple Pac-Man Game

Scratch Primary Lesson 4

Make your own Temple Run game

REFERENCE GUIDE 1. INTRODUCTION

Offline Files & Sync Center

1.0-Scratch Interface 1.1. Valuable Information

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

Match Branch Services to Enterprise Services in Kitomba One

Sending s and Texts

SKYWARD. Data Mining. Quick Reference Guide

Computer Science Education Week Teacher/Volunteer Guide

So you want to create an a Friend action

How To Program An Nxt Mindstorms On A Computer Or Tablet Computer

Why should I back up my certificate? How do I create a backup copy of my certificate?

Cleaning Up Your Outlook Mailbox and Keeping It That Way ;-) Mailbox Cleanup. Quicklinks >>

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

Skyward Creating and Administering Online Assignments

Getting Started with WebSite Tonight

Easy Casino Profits. Congratulations!!

How to Change Your Schedule for Holidays

Samsung Xchange for Mac User Guide. Winter 2013 v2.3

Detailing T-Card Charges. A. If the traveler and the card holder are the same follow these instructions:

Using Excel As A Database

Outlook Web App (OWA) To create a new message:

How to open an account

Chapter 3 ADDRESS BOOK, CONTACTS, AND DISTRIBUTION LISTS

DropSend Getting Started Guide

Microsoft PowerPoint Exercises 4

Suggested FaceBook Privacy Settings

Note: To increase your bet by another amount, select another chip from the bottom right of the game panel.

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps.

Calendar: Advanced Features Set up reminders, sharing, secondary calendars, and more!

Welcome to the ALT call center

Finding and Opening Documents

How to Use TeamSnap for Coaches

Getting Started in Tinkercad

Encryption Guide version 1.2, by Thomas Reed

QUICK START GUIDE

Changing How the Mouse Works in Windows 7

Chapter 28: Expanding Web Studio

Disabling Microsoft SharePoint in order to install the OneDrive for Business Client

PloneSurvey User Guide (draft 3)

Set up your first free website

Missing cat website HTML&CSS. The Mission:

Installation, Setup, & Uninstall Guide Virtual TimeClock 15 Network Edition for Mac

Parcelhub - Linnworks Custom Courier Integration Script

Mail Merge Tutorial (for Word ) By Allison King Spring 2007 (updated Fall 2007)

Outlook Rules and Alerts

Google Drive: Access and organize your files

Mikogo User Guide Linux Version

Mikogo Web Conferencing & Remote Support. User Guide (Windows Version)

Hosting Users Guide 2011

A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc Mastering Outlook Made Easy for Lawyers CPE Edition v.2.

How to Use Your New Online Client Vault

From Data Modeling to Data Dictionary Written Date : January 20, 2014

Copy Documents from your Computer (H Drive) to a Flash Drive

Preparing a Slide Show for Presentation

Flash MX Image Animation

Microsoft Outlook 2010 Hints & Tips

Using Microsoft Office to Manage Projects

Troubleshooting And Support

Level 15: Creating a Puzzle

Setting up a basic database in Access 2003

MAILCHIMP INTEGRATION:

Niche Market Finder. User Guide

Sharing Files with HomeGroup

A Parents Guide to ConnectSafely.org saferinternet.org.uk

Using Karel with Eclipse

CEFNS Web Hosting a Guide for CS212

Setting up a basic database in Access 2007

THE WINNING ROULETTE SYSTEM.

Creating Your Teacher Website using WEEBLY.COM

RingCentral from AT&T Desktop App for Windows & Mac. User Guide

How-To-Make-Money-Easily. Congratulations!!

The Social Accelerator Setup Guide

Optomate Training Compendium Appointment Book Page 2

Computer Programming In QBasic

AUTO ARCHIVING. December, 6 th 2005

A How-to Guide By: Riaan Van Der Merwe, General Manager, Dynamics, Neudesic

Gmail: Sending, replying, attachments, and printing

RIDICULOUSLY EASY GUIDE TO SOCIAL MEDIA TWITTER

Setting Up And Sharing A Wireless Internet Connection

Basic ESXi Networking

Simple Computer Backup

Mikogo User Guide Mac Version

VERSION 3.0 MAC USER GUIDE

Getting Started with Scratch

NOTE: To use this function, you must utilize the Outlook Plug-In within Partner XE.

Camtasia Studio. Creating Screen Videos

SCRATCH PROGRAMMING AND NUMERACY IN SENIOR PRIMARY CLASSES

Using and the Internet

Computer Science Concepts in Scratch

Basics. For more information on the Library and programs, visit BCPLS 08/10/2010 PEMA

Transcription:

Introduction: This is a game that has three sprites that change costume. You have to stop them when they re showing the same picture (like a fruit machine!). Activity Checklist Follow these INSTRUCTIONS one by one Test Your Project Click on the green flag to TEST your code Save Your Project Click on this to SAVE your work 1

STEP 1: Create a sprite that changes costumes Activity Checklist Let s import the different pictures for the game 1. Start a new scratch project. Delete the cat by right clicking it and clicking Delete. Import a new sprite. 3. Choose an image from any folder. We used things/bananas1, but you can use any image you want to. 4. Click the Costumes tab and import two more things so there are three in total (we used animals/bee1 and things/lego, but you can use any images). Now we ve got some costumes, we want the sprite to change between them. STEP : Making the picture change Activity Checklist 1. Click the Scripts tab.. Click Control and drag a when flag clicked into the scripts area. This will be triggered when we click the green flag. 3. Add a forever and attach it so it snaps to the bottom. 4. Click the green flag in the top right. Notice that a white outline is around our script. It s running because we clicked the green flag, which triggers this. 5. Now click Looks and drag in a next costume 6. How do we slow it down so it isn t changing so quickly? Click Control and drag in a wait 1 secs 7. Adjust the time until it s repeating at a faster pace (a time of 0.1s looks good). What would happen if we didn t have the wait block?

Test Your Project Click the green flag button. Do the costumes change at a sensible rate? SAVE YOUR PROJECT Things to try Adjust the time in the wait block. What numbers do you think would make the game too easy, or too hard? STEP 3: Making it stop when we click on it Activity Checklist Great! We can make the sprite change costumes forever, but how do we make it stop when we click on it? 1. Create a new variable by clicking Variables and Make a variable Call it stopped and make it just for this sprite, then uncheck the box next to it so it doesn t display on the stage.. Set stopped to 1 when someone clicks on the image using when sprite1clicked and set stopped to 0 making sure to change the value from 0 to 1. 3

3. Now we need to make the image stop changing when the variable stopped equals 1. Click Control and change the forever loop to a forever if and use a new equals operator to check if stopped equals 0 4. Finally, add a set stopped to 0 underneath the when flag clicked Test Your Project Click the green flag, wait for a moment, then click on the sprite. Does it change costume before you click on it? Does it stop when you do click on it? Start the sprite again. Does it stop when you put the mouse pointer on it, without clicking? Does the sprite stop when you click somewhere else on the Stage? Somewhere else in the Scratch window? Somewhere outside the Scratch window? SAVE YOUR PROJECT 4

STEP 4: Creating the other sprites Activity Checklist Now we need to make the other sprites so we can play our game! 1. Duplicate the sprite (Sprite1) by right clicking on it in the bottom right corner.. Duplicate it again so there are 3 sprites on the screen. 3. Move each sprite so they are in a line. Make them a bit smaller with if you need to. Test Your Project Click the green flag. All the sprites should change. Try to stop them all on the same picture! SAVE YOUR PROJECT Things to try When you start the game just after you ve loaded it, all the sprites show the same costume and change in unison. How about you make the sprites change to a random costume when the green flag is clicked? Hint: try picking a random costume for each sprite when the game is started. 5

Well done you ve finished the basic game. There are more things you can do to your game though. Have a go at these challenges! Challenge 1: Make the game harder Change the difficulty of the game somehow. Just making the costumes change quicker is easy. Try and do something more imaginative. Some ideas you might like to try: Change the number of costumes each sprite has. Make some sprites have unique costumes. Have different times between costume changes. Have each sprite move to a random costume rather than the next one. Have fun coming up with your own things! Every time you make a change, think about whether it make the game easier or harder. Is the game too easy or too hard? How can you adjust the difficulty so it s just right? Challenge : Make the game get harder and easier over time Different people will have different skills at playing the game. How could you make the game adjust its difficulty depending on the player? One way you could do it is to adjust the speed the costumes change at. You can use a variable, called delay, to give the duration of each sprite s wait block. If the player wins the round, the delay can be reduced a little (to make the game harder). If the player loses the round, the delay can be increased a little (to make the game easier). 6

Challenge 3: Detect when all the sprites have stopped on the same costume The aim of the game is click on the sprites so they re stopped while showing the same costume. It would be nice if the stage detected when you d finished playing and then told you if you had won or lost by checking to see if each sprite had the same costume. First, the stage needs to know when the player has finished. We can do this by having the stage check to see if all sprites have stopped moving when we click on one of them. Go back and modify each of the sprite# clicked blocks to broadcast a new message, checkforend The Stage can respond to this message and check if the game is over by seeing if all three sprites stopped variables are set to 1, by using the x position of Sprite block for each sprite, and changing x position to stopped If all three sprites have a stopped value of 1, we know the game is over and we can check to see if the player has won. To do this, we can use the same x position of Sprite block, but instead of looking at the stopped variable, we can look at the costume # and see if Sprite1 has the same costume as Sprite, and if Sprite has the same costume as Sprite3. To do this, you ll need an if block to check each stopped variable, and inside that an if else block to see if the player has won or lost by comparing each costume # From this point on, you could announce the result of the game using a broadcast and respond to this with another sprite. Maybe get Felix back to congratulate or commiserate the player? 7

Well done you ve finished, now you can enjoy the game! Don t forget you can share your game with all your friends and family by clicking on Share on the menu bar!t 01 Code Club. This work is licensed under a Creative Commons Attribution-Non Commercial-NoDerivs 3.0 Unported License. 8