Game Over Module 4 Lesson 2.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Create a Simple Game in Scratch
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
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.
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.
Scratch Programming Session 9 of 10 Review elements to use in stories, games, etc.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
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.
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.
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.
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.
Scratch Programming Lesson 4 Question asking and answering.
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.
Image #1 Getting Started
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.
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.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
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.
University Learning in Schools Computing Games Programming Lesson 5.
I have used Scratch, to program a guide to internet safety. This is done by using QR codes to make it more interactive and interesting for people playing.
Lives and Scoring Games Programming in Scratch. Games Programming in Scratch L2 Lives and Scoring Learning Objectives Define a variable Understand the.
Making a Flappy Birds Game PART 2 – MAKING THE BIRD FLAP AND FALL – AND DEVELOPING THE GAME FURTHER (ADDING ADDITIONAL CHARACTERS, GOODIES, ENEMIES AND.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Scratch Programming Cards
Create a Halloween Computer Game in Scratch
Customise & Explain your game
Broadcasting (Adding a new level)
Games Programming in Scratch
Scratch for Interactivity
Building with Numbers Module 4: Investigation 3
Exploring Computer Science Lesson 4-14
Randomising the behaviour of Sprites
Games Programming in Scratch
Scratch – Simple Programming
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
Scratch Programming Intro
Scratch – Simple Programming
Go to =>
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Lesson Objectives To understand how to make sprites interact
Building a Game in Scratch
Exploring Computer Science Lesson 4-12
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Getting Started with Scratch
Exploring Computer Science Lesson 4-14
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
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Exploring Computer Science Lesson 4-12
Presentation transcript:

Game Over Module 4 Lesson 2

Learning Objectives To be able to use variables and lists To be able to use broadcast messages to trigger events in Scratch. To understand the importance of initializing everything at the start of a game.

Today We will continue to develop the game previously started. We will use variables to keep count of the number of lives remaining for a character A special feature called broadcast will be used to trigger all events that need to run when the game ends Then look for potential problems and solutions. We will use a list to store numbers as well as strings of letters and other characters.

Open your Game from the Last Session If you do not have a copy of your first game, open M4L1R2_Game_Version_1 from the assignments folder. We are going to create a variable that changes during the game. This variable tracks the number of lives remaining for the Good Guy.

Creating a Variable 2. Select the Variables block 1) Select Scripts 3. Click on ‘Make a Variable.’ Enter a name that describes what it is storing. Lives for this example. Click ‘OK’

Modifications We will need to set the lives to 5 at the start of the game. Then find the piece of code that occurs when the Good Guy runs into the Bad Guy and decrease the number of lives by 1.

When the Green Flag is hit, the lives are set to 5. Possible Solution When the Green Flag is hit, the lives are set to 5. Every time the Good Guy runs into the Bad Guy, the number of lives decreases by 1. Test it!!

Game Over When the lives go down to 0 the game ends. This will need to be checked all the time (forever loop) If lives = 0 we will broadcast Game Over When each of the sprites receive a ‘Game Over’ broadcast A new background is shown for the end of the game

Broadcasting Game Over Broadcast -> New then enter Game Over

Put this in each of the sprites. Game Over What should happen when the game ends? Sprites need to go away (Hide) A Message should appear on the Screen (Game Over) A new Background should appear for the end of the game. Test it.. What happens? Put this in each of the sprites. Have the Background change. In the End Of Game background, include the words Game Over

Need to Reset the Values For the Sprites, include a show in the When Green Flag Clicked. For the Background, add a When Green Flag Clicked, return to the Game Background.

Using a List to make Random Comments We will create a list of 4 things the Good Guy will say when he hits the Bad Guy.

List 1 Variables Make a List Give it a name that describes what is being stored. “Things to Say” for this example.

Adding to the List Click on the ‘+’ to increase the size of the list. Then enter a new phrase for the list.

Change the drop down choice to ‘any’ Saying from the List Change the drop down choice to ‘any’

Uncheck the Things to Say box. Hide the List Monitor Uncheck the Things to Say box.

Finishing it up Complete the parts we have done as a class Extensions Develop a scoring system for the game and a way of winning or losing at the end of the game. Introduce levels of the game. The speed and movement of the bad guy could increase as the levels progress. Use Lists to add a list of things the Bad Guy says if contacting the Good Guy. Save it as YourNameMod4Lesson2 and turn it in