(More) Basic blocks Broadcasting messages

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Create a Simple Game in Scratch
Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses.
Harry Potter Scratch Game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
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.
Meet Me on Mars Lesson 7 Variables and Messages. Events and Variables 1. Click the _________ button 2. When ________ clicked, set ______ to ____ 3. Now,
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.
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
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.
Scratch Programming Lesson 2 First glance to programming logic.
Scratch Programming Lesson 4 Question asking and answering.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech May 2011.
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.
Unit 3 Music and Sound Evangel College S.2 ICT.
Introduction to Scratch. What is Scratch? Scratch is a control program that enables you to create your own interactive stories, animations, games, music,
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
The If Block. IF The “if” block can be found in the control tab. The if block means, “IF this happens, THEN do this.” You can put blocks ON the if block.
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.
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.
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.
Animating your Sprites to Make Greeting Cards. This lesson will lead you through: Selecting a background Adding letter sprites Using the random function.
Sprites & Backdrops. Sprites Sprites are the actors that perform the commands in your script. The cat is the default Sprite. Scratch has many other Sprites.
Teaching Kids Programming with Chromebook Digital Convergence Lab, NIU.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Using MIT Scratch for Programming and Control Programming 9.
Scratch Programming Cards
Create a Halloween Computer Game in Scratch
Customise & Explain your game
Commands in Scratch.mit.edu
Broadcasting (Adding a new level)
Scratch for Interactivity
Mission: design a Virtual interactive tour guide with scratch
Scratch 7B IT1.
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.
Scratch 2.0: Introduction
Cosmic Chorus Green Book, Ch 5.
Scratch I - Overview.
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
Introduction to Object-Oriented Programming
Dance Cards Dance Cards
Playing with Pictures Module 1 Lesson 3.
Creating Variables Output Logic flow Operators (More) Basic blocks
Dance Cards Dance Cards
Dance Cards Dance Cards
Cosmic Chorus.
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
Lesson 1 Introduction to Scratch Basic blocks
Dance Cards Dance Cards
10 SCRATCH bLOCKS lesson 1 10 Blocks.
Dance Cards Dance Cards
Input Repeat until Concatenation
Flappy bird Demo: Lesson 5 Flappy bird Demo:
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
Creating a Simple Game in Scratch
Introducing Scratch and Creating Sprite
Dance Cards Dance Cards
Using MIT Scratch for Programming and Control Exercise 5 – Drawing with Scratch Year 9 ICT Autumn Term 2007.
Dance Cards Dance Cards
Presentation transcript:

(More) Basic blocks Broadcasting messages Lesson 2 (More) Basic blocks Broadcasting messages

Recall… The blocks you’ve learnt in the last lesson: Event blocks Motion block Look blocks Sound blocks

Basic blocks Motion block – point towards Control blocks Sprite pointing towards an object. Control blocks FOREVER: The command inside this block will be done forever. IF: If (something) is correct, then do the followings.

Basic blocks Sensing block Looks block Touching something Change backdrop

Broadcasting messages One sprite broadcasts a message The other (same) sprite will do the commands after receiving the broadcasted message (e.g. message1).

Exercise 2 Your task: The “Dog” sprite moves “like walking” towards the “Cat” sprite. (Hint: use FOREVER. Choose an appropriate speed(steps).) Set the starting position of the Dog (initialization). The “Dog” barks (once) when touching the “Cat”. (Hint: use IF)

Exercise 2 The backdrop of the stage changes when the “Dog” touches the “Cat”. (Use broadcast) The cat ‘meow’s back after the dog barks. Play background music of your own choice.

Exercise 2 Bonus feature: Create a pause/play button so that you can pause/play when clicked. Hint: Pause/play are like on/off. You may need . E.g. (odd no) mod 2 =1 (even no) mod 2 =0