Creating Variables Output Logic flow Operators (More) Basic blocks

Slides:



Advertisements
Similar presentations
A Christmas Scratch game
Advertisements

1 An introduction to programming concepts with Scratch.
An intro to programming concepts with Scratch Session 2 of 10 sessions I/O, variables, simple computing.
LO: Learn how to develop your game further to include interactions with the device.
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.
A Scratch tutorial. Description: You have 6 bullets to shoot at 2 targets. Every time you hit any of them you get two extra bullets but the targets get.
Section 3 Calculations National 4/5 Scratch Course.
Spiral Rider PAGE 1. Set Up Scene 1.Add Stage-underwater scene 2.Add crab sprite 3.Add two fish sprites PAGE 2.
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.
Objects and Methods in Scratch 1. 2 Scratch environment Stage is at upper right (where actors act and information is displayed) Sprite is another name.
Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman 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 4 Question asking and answering.
Scratch Programming Lesson 5 Programming logic. We are going to learn… Initialize the variables SET VS CHANGE Operator (Part II) Use a variable as a counter.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
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.
Hints on debugging
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.
Today we are learning to: Understand how flow charts are used to design games Add events to our objects to control stuff in our game – (Using the user.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
Programming a Shooter Game Design.
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.
Lives and Scoring Games Programming in Scratch. Games Programming in Scratch L2 Lives and Scoring Learning Objectives Define a variable Understand the.
ICT/COMPUTING RULES Only use software allowed by the teacher
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Using MIT Scratch for Programming and Control Programming 9.
Scratch Programming Cards
Exploring Mathematical Relationships Module 5: Investigation 1
Games Programming in Scratch
Building with Numbers Module 4: Investigation 3
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.
Intro to Programming with Scratch
Scratch: Animation and game programming
Scratch – Simple Programming
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Introduction to Object-Oriented Programming
Scratch Programming Intro
Intro to Programming With Snap PII.
Module 5 Lesson 3 Extreme Scratch Cards
Using the Multiple Choice Template
Lesson 1 Introduction to Scratch Basic blocks
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Introduction to TouchDevelop
Learning about Conditional Selection
(More) Basic blocks Broadcasting messages
Lesson Objectives To understand how to make sprites interact
Using the sensor Lesson 5.
An intro to programming concepts with Scratch
Inputs and Variables Programming Guides.
Input Repeat until Concatenation
Flappy bird Demo: Lesson 5 Flappy bird Demo:
Game Over Module 4 Lesson 2.
Exploring Computer Science Lesson 4-12
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Using the sensor Lesson 5.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Explain what touch develop is to your students:
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Creating a Simple Game in Scratch
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Lesson Nine Variables.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Using MIT Scratch for Programming and Control Exercise 5 – Drawing with Scratch Year 9 ICT Autumn Term 2007.
Presentation transcript:

Creating Variables Output Logic flow Operators (More) Basic blocks Lesson 3 Creating Variables Output Logic flow Operators (More) Basic blocks

Recall… Blocks that you’ve learnt:

Creating Variables To store a value of something. May change during the game. E.g. Time Score etc.

Creating Variables ***INITIALIZATION!*** Show (clicked)/ hide (unclicked) the value on the stage area Set the value of the variable ***INITIALIZATION!*** Change the value of the variable +ve number (k): add k to the original value +ve number (-k): minus k to the original value This can be dragged to the scripts area

Output (Output) A sprite can say / think (something) for (some) seconds / forever.

Logic flow (control) If (something) is correct, then do the followings. If (something) is correct, then do the followings, otherwise, do the followings. Wait until (something) is correct, then continue.

Operators Randomization Logic operators Math operators

(More) Basic blocks Show/hide (Looks) Mouse down (sensing): when the mouse is left-clicked. Wait (control)

Exercise 3 Your task is to create a game of guessing a number from 1 to 10 if it is an odd or even number. Features: Generate a random number from 1 to 10. The cat asks the question. (I have a number from 1 to 10 in mind. Do you think it's odd or even?) SHOW the two buttons (odd/even). WAIT for the user to CLICK ON the button (odd/even). Check if the answer is correct. The cat says (Yay! You're correct!) if it is correct, otherwise, it says (Oops! You're wrong.).

Hints on Ex 3 For an odd number x, x  1 (mod 2) (when you divide an odd number by 2, the remainder is 1) For an even number y, y 0 (mod 2) (when you divide an even number by 2, the remainder is 0) Make sure that the user has to CLICK ON the button, but not just mouse over the button nor mouse clicked anywhere on the screen.