Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

In this tutorial, we are going to create: A race car that the user can control with the arrow keys for direction and speed. A simulated road with a striped.
Create a Simple Game in Scratch
Scratch is a Visual Programming Language
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
Scratch for Storytelling Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
A Christmas Scratch game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Scratch Programming Session 6 of 10 If-then-else statements interactions Final projects specifications.
Learn… Create… Program. Manipulation of Multiple Media Connects with youth culture Scratch is a new graphical programming language designed to support.
Racing Car Game Using the keys to control a sprite.
Creating pong in scratch Learning objectives: To learn how to program Sensing via colour and sprite proximity O:\ICT\ks3\scratch\scratch Exercises\Creating.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
Introduction to Scratch!
We will be creating a spaceship that simulates real movements in space. The spaceship will fire a laser beam that can destroy targets. The spaceship will.
Introducing Scratch the Cat
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
1 Understand how to use Scratch to: – Animate a sprite – Add sound to your script – Use the forever command to create a loop Lesson 2: Learning Objectives.
Using MIT Scratch for Programming and Control Extension work – clock project Year 9 ICT Autumn Term 2007.
Geometry. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions are.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Introduction to Scratch. What is Scratch? Scratch is a control program that enables you to create your own interactive stories, animations, games, music,
Scratch Another computer programming language Developed by MIT in 2003
Making a Sprite Dance Barb Ericson Georgia Tech June 2011.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Computer Programming Modeling a Passive Solar Home.
Variables and Random Numbers Computer App Session 4.
Marble Racer. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Using MIT Scratch for Programming and Control Exercise 1 Creating movement Year 11 DTG 2012.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner and choose a new.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner of the stage and.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
Scratch for Interactivity Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
ICT/COMPUTING RULES Only use software allowed by the teacher
Scratch Part 2 – Character Commands. What does a command do?  Commands in programming allow an object whatever it is to do something. In the case of.
Computer Programming Modeling a Passive Solar Home.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
Teaching Kids Programming with Chromebook Digital Convergence Lab, NIU.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Getting Started With Alice: The Basics. Step 1: Background Open up Alice, and choose a background for your Alice world. Your world is something you can.
Introducing Scratch Learning resources for the implementation of the scenario
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Using MIT Scratch for Programming and Control Programming 9.
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
What is it?! •Scratch is a programming language that allows you to create interactive stories, music, animations, art, games, and more!
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Year 11 DTG Intermediate Using MIT Scratch for Programming and Control Exercise 2 Controlling movement with the keyboard Year 11 DTG Intermediate.
Scratch – Simple Programming
Introduction to Object-Oriented Programming
The One Where You Scratch
Scratch – Simple Programming
Go to =>
Lesson Objectives To understand how to make sprites interact
Game Over Module 4 Lesson 2.
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Using MIT Scratch for Programming and Control Exercise 5 – Drawing with Scratch Year 9 ICT Autumn Term 2007.
Presentation transcript:

Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007

What you will learn: Interactivity between objects in Scratch In this exercise you will investigate interactivity between objects in Scratch by making a game with three balls. Two of the balls will be animated and move around the screen. The object of the game is to position the third ball in such a way that the other balls do not hit it within a predetermined time. Importing new sprites Interactivity between sprites

Importing new sprites Step 1 – click on the scissors button and click over the cat to remove it from the stage Step 2 – click the centre button below the stage (import a new sprite) Step 3 – browse the things folder and import baseball1

Importing new sprites Step 4 – repeat the process in order to import basketball and beachball1 Step 5 – click on each sprite in turn and rename them in the sprite dialogue box (top centre of the screen) with the names basketball, beachball and baseball

Creating constant motion Step 6 – select the baseball. Click on the orange control menu button (top left of the screen) and drag in a when green flag clicked instruction Step 7 – drag in a forever instruction and attach it to the when green flag clicked instruction Step 8 – select the blue motion menu Step 9 – Drag in a move 10 steps command. Drop inside the forever instruction. Reset the value to 7. Step 10 – Drag in an if on edge, bounce instruction. Drop inside the forever instruction. Note – The forever instruction should expand and surround the motion instructions

Creating constant motion Step 11 – click the green button and watch the baseball bounce around Step 12 – repeat this process for the beachball

Interactivity beachball The next stage is to get the animated balls to interact with each other and the non animated ball Step 13 –select the beachball sprite click the control menu and drag in when green flag clicked, forever and if (condition) instructions

Interactivity beachball Step 14 – click on the green numbers menu – choose the OR operator (we want something to happen if this ball is touch another ball OR the other one). Drop the OR operator inside the if (condition)

Interactivity beachball Step 15 – click on the blue sensing menu – pull across two touching instructions and set the drop down for the other two balls.

Interactivity beachball Step 16 – drop the two touching commands into the OR operator

Interactivity beachball Step 17 – from the blue motion instruction set drop in a turn 15 degrees instruction. From the purple looks instructions set drop in a say hello for 2 seconds instruction Step 18 – reset the respective values to 179 degrees, Hit! and 1 second

Interactivity baseball Step 19 – create this same script for the baseball Both the baseball and the beachball now have two similar scripts. One script does the motion, the other does the interactivity with other balls

Interactivity basketball Step 20 – select the basketball and recreate the script that you have just made for the other two balls except for the turn instruction

Interactivity basketball Step 21 – from the sensing menu check the timer option (this will put a timer on the stage)

Interactivity basketball Step 22 – drop in the reset timer instructions as shown. This will reset the time at the start of the game and whenever either of the moving balls hits the basketball

Movement basketball Step 23 - As it is the basket ball that will be moved by the person playing the game, we have to include a script that will achieve this. (This script is similar to one created in a previous exercise)

Scoring In the next process we want to give score for if the balls avoid each other for 5 or 10 seconds Step 24 – with the basketball selected, create a new script starting with the when green flag clicked instruction. Drop in three if (conditional) instructions

Scoring Step 25 – from the numbers menu select the AND operand. Select the greater than and less than operands and drop these into the AND operand. Drop two timers into the operand so that the options are timer>5 and timer<10

Scoring Step 26 – from the purple looks menu drop in say hello for 2 seconds and change the values to say score 5 points for 1 second Step 27 – the next if (condition) instruction set the condition to timer >10 and say score 10 points. In the last if (condition) set to timer >15 and drop in a reset timer instruction

Scoring

Importing a background Step 28 – Click the stage button and select the centre tab in the stage design dialogue. Browse the standard backgrounds and import a background for the stage

Playing the game Click the enter presentation mode button on the bottom left of the stage and view your game in full screen The object of the game is to position the third ball using the arrow keys in such a way that the other balls do not hit it within the 16 second time limit