Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.

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.
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
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.
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
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.
1 An introduction to programming concepts with Scratch.
ITEC Winter An intro to programming concepts with Scratch Quick intro for college citizens. George Stockman MSU CSE.
Racing Car Game Using the keys to control a sprite.
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
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.
Every week: Sign in at the door If you are new: Fill in Registration Form Ask a Mentor how to get started Make sure you are on the Athenry Parents/Kids.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
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.
Spiral Rider PAGE 1. Set Up Scene 1.Add Stage-underwater scene 2.Add crab sprite 3.Add two fish sprites PAGE 2.
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
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.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
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.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
WHAT IN THE WORLD IS SCRATCH??? AN INTRODUCTION TO COMPUTER PROGRAMMING By MD Showman.
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.
1 Project designed and created by M. Shajith Kumar.
Variables and Random Numbers Computer App Session 4.
By Mr. Putnam. In Catfall, the goal of the game is to touch the falling cats with the mouse. Every time you touch a cat, your score goes up by one point.
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.
Today's Ninja Challenge: Write Your First Computer Game!
Teaching Kids Programming with Chromebook Digital Convergence Lab, NIU.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Scratch Programming Cards
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
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.
Spanish Mad libs with Scratch
Scratch for Interactivity
Introduction to Object-Oriented Programming
Learn… Create… Program
Getting Started with Scratch
Go to =>
Learn… Create… Program
Go to =>
Go to =>
Go to =>
Game Over Module 4 Lesson 2.
Getting Started with Scratch
Learn… Create… Program
Learn… Create… Program
Creating a Simple Game in Scratch
Presentation transcript:

Write Your First Computer Game!

Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to do… A programming language tells a computer what to do! During this project, we will learn how to tell a computer how to make a fun game about a Tadpole and Frog!

Big Ideas What is Coding? How Can you Write Code? What is Scratch?

This is Scratch!

To sign up: Go to and click on Join Scratch

Enter a username and password Use your Type2Learn username and password on the label

Enter birth month and year, gender, country and Use this address

Click on Let’s Go! Click on OK Let’s Go!

Create a New Project Click on Create

Title your project Title your project first name + last initial + 1 Title your project first name + last initial + 1

Scratch: Stage Stage Like in real life, the stage is where the performance, or game happens!

Scratch: Sprite Sprite Not the soda! An actor or a character that is on the stage, doing what you tell it to do!

Scratch: Script Scripts This is where you tell your actor/sprite what to do!

Create Tadpole and Evil Fish Change the Stage: Choose a background Code to make Evil Fish move randomlyCode to make Tadpole escape Evil Fish Make it a game End game when Tadpole gets caught or besomes a frog after 20 seconds of avoiding the evil fish!

Delete the cat sprite First click on the cut tool Then click on the cat sprite

Create a Sprite Let’s Get our Hero on Stage! Click here to find our tadpole!

Create a Sprite Here is our tadpole. On stage, ready to respond to our commands!

The Evil Fish Now lets’ get the evil fish on stage! Choose a sprite from the library!

The Evil Fish Now lets’ get the evil fish on stage! Choose fish 2. He looks ready to eat!

Ready for Instructions! Both our actors are on stage. Now we need to tell them what to do!

But first, let’s put them in the water! We need the stage to look like a pond. So let’s do that… Choose a new backdrop!

But first, let’s put them in the water! Choose “underwater” scene 1, 2, or 3! Nature Scenes

Our Tadpole and Fish are in Water

Let’s Start by Giving Evil Fish instructions Click on Evil Fish, so he knows we are telling him what to do. Click to make him active

Scripts: Instructions to your sprites There are all sorts of script blocks. These blocks are instructions to tell your sprite what to do. We’ll start with “motion” blocks. Make sure “motion” is selected

Make Evil Fish Move Forward! Point at “move” block and DRAG to the script area. Choose move 10 steps

Nothing Happened! You have to TELL him when to start moving! Click on Events. Drag When [green flag] clicked onto your scripts area. Choose when green flag is clicked

Move Blocks together to give instructions to your character Now, the fish will move 10 steps when you click the green flag! Give it a try! Slide the blocks together!

Evil Fish Doesn’t Move Very Far Each click of the green flag moves him only 10 steps. Let’s make him keep moving! Keep pressing the green flag to see Evil Fish move 10 steps

Make Evil Fish Swim Forever Go to the CONTROL area. These are blocks that let you CONTROL your sprites even more CONTROL options control what your sprites do

Make Evil Fish Move Forever A Forever loop tells Evil Fish to do what is inside the loop FOREVER. Till the end of time. And then keep going! Choose Forever

Make Evil Fish Move Forever A forever loop tells Evil Fish to move 10 steps FOREVER. Till the end of time. Give it a try! Forever loops tell your charater to do what you say forever and ever

Uh-oh! He disappeared! Evil Fish disappeared. We have to tell him to stay on stage! If on edge, bounce

Now he’s going only back and forth… lets’ have him turn Use the turn motion block to tell him to turn Turn right 15 degrees

Now he’s spinning. Let’s randomize it! Random: let the computer pick a number! Let the computer choose a number to turn Evil Fish

Lets do that with the steps too! This makes it harder to guess where Evil Fish will move next!

Evil Fish is Ready for The Game! Let’s remember to tell Evil Fish to get on stage to start the game!

Let’s Save our Progress! Enter a name for your game Then click SAVE NOW

Time to Move The Tadpole First, we need to select the sprite we want to give instructions to. Click on the tadpole!

Follow The Mouse! For Tadpole to escape the evil fish, we need to make her move by following the mouse pointer around.

Follow The Mouse! For Tadpole to escape the evil fish, we need to make her move by following the mouse pointer around. Uh-oh. She stopped when he moved once. How do we make her always follow the mouse pointer around?

Follow The Mouse! Now tadpole will follow the mouse pointer forever.

Let’s Make it a Game! In order for a tadpole to grow into a frog, she needs to be able to avoid evil fish long enough to grow up! Let’s make it so that Tadpole has to stay away from Evil Fish for 20 seconds to become a frog!

Adding Time to The Game First, click on your stage. We are going to now set controls for the whole game, not just our actors/sprites

Adding Time to The Game When the flag is clicked, we want to wait 20 seconds then alert the game that the tadpole has won! From Control From Sensing

Adding Time to The Game After 20 seconds goes by, we need to send off a broadcast, which tells all the actors to pay attention and do something special! From Events. Choose New Message Broadcast frog

Adding Time to The Game When the actors hear the broadcast frog we need them all to do something! Tadpole should change into his frog costume. Evil fish should stop swimming because the game is over! When 20 seconds has gone by, all the actors will hear the message frog.

Tell Tadpole She Won! Click back on Tadpole. Let’s have her respond to the frog broadcast. Click on Event and choose When I receive... Change this to be frog

Make Tadpole Turn into a Frog! Tadpole needs to change into her Frog costume Click on New Costume and choose the Frog costume

Make Tadpole Turn into a Frog! Choose Frog, click OK

Make Tadpole Turn into a Frog! Go back to Scripts and Have Tadpole Change costumes when she receives the Frog message! Check your work! Click the flag. Do you see the timer? Does Tadpole turn into a frog?

Make Evil Fish Stop and Hide! Click back on the Evil Fish so that you can see the script for him. Click on this last one in the list to tell the other script (the one above that is moving evil fish) to stop running. Check your work! Click the flag. Do you see the timer? Does Tadpole turn into a frog?

Wait! Tadpole is still a Frog! We have to go back to the start and have Tadpole get her tadpole costume on! Tells tadpole actor to start in the tadpole costume

Now... if Tadpole swims away for 20 seconds, she turns into a frog!

But wait... What if Evil Fish catches Tadpole???

If Tadpole touches Evil Fish... then she loses An If...then loop tells a computer: IF something happens, THEN do something Find this in CONTROL Let’s put that in code! Touches the evil fish Choose evil Fish Find this in SENSING

If touching evil fish Drag touching onto the IF until it turns white Let’s put that in code! Send a message it’s game over Broadcast! If Tadpole touches Evil Fish... then she loses

Final instructions for tadpole Tell tadpole what to do if she hears game over! Tadpole hides! If Tadpole touches Evil Fish... then she loses

But Evil Fish wins! Tells everyone he won  So if Evil Fish hears GAME OVER… Tells Evil Fish to stop moving

Final project: