Scratch Programming Intro

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
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
Helicopter Game Tutorial
1 An intro to programming concepts with Scratch Session 3 of 10 sessions Repetition and variations.
A Christmas Scratch game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
This game is loosely based on the Whack-A- Mole arcade game.  Each game starts with 45 seconds of play.  Moles randomly pop out of holes on the landscape.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Extending the Pong Example Barb Ericson Georgia Tech June 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.
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.
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.
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.
Scratch Another computer programming language Developed by MIT in 2003
Making a Sprite Dance Barb Ericson Georgia Tech June 2011.
1 Use different costumes in Scratch to make an animation effect Synchronise interaction between 2 or more sprites Lesson 3: Learning Objectives.
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 of the stage and.
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
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Scratch Programming Cards
Create a Halloween Computer Game in Scratch
Broadcasting (Adding a new level)
Scratch for Interactivity
Exploring Mathematical Relationships Module 5: Investigation 3
Building with Numbers Module 4: Investigation 3
Scratch for Interactivity
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
Dance Cards Dance Cards
The One Where You Scratch
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
Go to =>
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Go to =>
Go to =>
Getting Started with Scratch
Game Over Module 4 Lesson 2.
Introduction to Snap Programming
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Getting Started with Scratch
Game development using Scratch
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
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
CSC 221: Introduction to Programming Fall 2018
Lesson Eleven Moving Backgrounds.
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
Catch Game Cards Catch Game Cards Make a Card Go to the Top Fall Down
Presentation transcript:

Scratch Programming Intro

Mini Tasks Shrink all of the apple sprites to 27x27 (or close to it) using the ‘Costumes’ tab for each. Add a second red apple. Now you should have three apples total. Change the speed that the apples are dropping. You can reset this to -5 before you move on, if you want.

Task One Make the ‘You won!’ score greater than 12 Add a ‘bad apple’ sprite. Make a new sprite by duplicating the apple sprite. Color it black. Make the program wait until the score is greater than 5 before the bad apple shows up. Program the bad apple so that if it hits the bowl, you lose. (There are two hints how to do this on the next slide. You can either try it yourself, or read the next slide.) Design a new sprite that says ‘You lose!’ and make it appear. Give it a different sound than the popping sound.

Hint for Task One For #4 of task one, you can do either of two ways (or more): Make a new variable. Call it bad apple. Set it equal to 0 right after ‘set score to 0.’ Then, if the apple touches the bowl, set it to 1. In the script for the ‘You lose!’ sprite, let it ‘show’ if ‘bad apple’ = 1. In the ‘Events’ scripts is a block, ‘broadcast message 1.’ When you broadcast this message, it can be received by other scripts. So if ‘bad apple’ touches the bowl, you can ‘broadcast message 1.’ In the ‘You lose’ sprite, you can use the ‘When I receive message 1’ block to tell ‘You lose!’ when to ‘show.’

Task Two – Frog Detractor Add a new ‘frog’ sprite. Position him to sit on the tops of the grass mounds (just drag him up there). Add a second ‘frog’ costume that is the mirror image of the first. First, right click on the frog using the costume tab and select duplicate. Then, using the ‘flip left-right’ function in the top right corner, flip the image.

Task Two – Frog Detractor When the start is selected, we want the frog to go back and forth across the screen. If we keep checking his ‘x position’ we can tell him which way to go. If it’s greater than 240, , we need him to turn and go left. If it’s less than -240, , we need him to turn and go right. Set up those two ‘if’ loops in a ‘forever’ loop, similar to the way you set up the ‘forever’ and ‘if’ loops for touching the bowl, except you’ll have two ‘if’ loops (one for each inequality).

Task Two – Frog Detractor Make a new variable named direction. If the x position is greater than 240, we need the frog start going in the negative direction, so ‘set direction to -1,’ after that inequality. If the x position is less than -240, we need the frog to start going in the positive direction, so ‘set direction to 1,’ after that inequality. When ‘direction’ is -1, the frog’s tongue should be pointed left, so get the block ‘switch costume to frog2’ in the ‘Looks’ tab and drag it into the correct ‘if’ loop. When ‘direction’ is 1, the frog’s tongue should be pointed right, so get the block ‘switch costume to frog’ in the ‘Looks’ tab and drag it into the correct ‘if’ loop. Within the ‘forever’ loop, but after both of the ‘if’ loops, use , to get the frog to move correctly.

Task Two – Frog Detractor Now make the red and bonus apples (but not the bad apple) reset to the top of the screen if any of them touch the frog. This script is similar to touching the bowl, except instead of adding to score, you’re going to ‘go to random position’ and ‘set y to 180.’ You will need to do this in each of the apples’ scripts.

Save your work In the top left of the ribbon, select ‘file’ and then ‘Download to your computer.’ Change the ‘Save in’ directory to your P: drive and the ‘File name’ to your last name and frogscratch, for example ‘Lennon frogscratch’ or ‘Brown frogscratch.’