Extending the Pong Example Barb Ericson Georgia Tech June 2011.

Slides:



Advertisements
Similar presentations
GAME:IT Junior Ping Pong Objectives: Review skills from previous lessons Create a 2-player game Create a scoring display system Using old and new skills,
Advertisements

Create a Simple Game in Scratch
SimpleGameInAlice1 Barb Ericson Georgia Institute of Technology June 2008 Creating a Simple Game in Alice.
Mike Scott University of Texas at Austin
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
Scratch is a Visual Programming Language
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
A Christmas Scratch game
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.
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.
1 An introduction to programming concepts with Scratch (in 5 hours + homework)
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
Creating pong in scratch Learning objectives: To learn how to program Sensing via colour and sprite proximity O:\ICT\ks3\scratch\scratch Exercises\Creating.
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.
Scratch Internet- Open Chrome hit “Create” 1.
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.
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
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.
©Robomatter – Distribution or copying without permission is prohibited. 3B STEM Computer Science 1 ©Robomatter – Distribution or copying without permission.
Institute for Personal Robots in Education (IPRE)‏ CSC 170 Computing: Science and Creativity.
CoderDojo Roscommon. Today's Ninja Challenge: Create a GhostBuster Game Like This.
Catch the Clown Tutorial Tech Camp Fall 2008 Colorado School of Mines.
Geometry. 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 are.
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.
Scratch pong challenge Pong is a classic 1970s video game  Open the pongv1.sb2 file in Scratch  Click the.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
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.
Computer Programming Modeling a Passive Solar Home.
Variables and Random Numbers Computer App Session 4.
Drawing with the Pen Barb Ericson Georgia Tech June 2011.
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.
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.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
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.
Digital Art in Scratch part 2 Barb Ericson Georgia Tech Nov 2010.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
GAME:IT Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a simple.
ICT/COMPUTING RULES Only use software allowed by the teacher
Computer Programming Modeling a Passive Solar Home.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Communicating between objects MESSAGE PASSING. CHALLENGE Can YOU do WHACK a MOLE in less than 5 minutes?????
Scratch Helicopter Game
Create a Halloween Computer Game in Scratch
Dancing on Green Light.
Scratch for Interactivity
Madlib-Input, Strings, and Lists in Scratch
Spanish Mad libs with Scratch
Barb Ericson Georgia Institute of Technology June 2007
Scratch for Interactivity
Scratch Programming Intro
The One Where You Scratch
Breakout in Greenfoot Barb Ericson
Lesson Objectives To understand how to make sprites interact
An intro to programming concepts with Scratch
Game Over Module 4 Lesson 2.
Game development using Scratch
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Catch Game Cards Catch Game Cards Make a Card Go to the Top Fall Down
Presentation transcript:

Extending the Pong Example Barb Ericson Georgia Tech June 2011

Goals Learn about –Creating a variable to keep score –Displaying text to let the user know if s/he won or lost –Using broadcast and receive to allow sprites to communicate

Project Description We will add to the example in Games – 4 Pong to add a score that is displayed and tell you if you won or lost.

Big Picture Open the pong game example Create a variable to keep score Create new text sprites to tell you if you won or lost Use broadcast and receive to allow sprites to communicate

Open the Pong game Click on File then Open Select Examples and games and open 4 Pong

Create a variable Click on "Variables" and then on "Make a variable" Name the variable score –Click "OK"

Variable Tiles When you create a new variable a set of 5 tiles are created –First controls the display of the variable Uncheck to not display –Second sets the value of the variable –Third changes the value –Fourth shows the value –Fifth hides the value

Start Score at 0 Drag "set score to 0" from "Variables" category after the "go to x: 13 y:157"

Increment Score When the paddle hits the ball –Drag "change score by 1" from "Variables" –Drop before "move 5 steps"

Draw text sprites Use the paint editor to paint text sprites Select T for text –Select font type and size –Select color –Type the text

Hide text sprites Select sprite under stage view –Select Scripts tab –Drag out "when green flag clicked" from "Control" –Drag out "hide" from "Looks"

Broadcast when lost Two sprites can communicate using broadcast and receive –Have the ball broadcast the message "lost" –Click the down arrow to create a new message

Show text sprite When the "You Lost!" text sprite receives the message "lost" –Show the sprite

Add a way to win When the score equals 5 tell the user s/he won –And show "You Won!" sprite –Stop execution of all scripts

Challenges Make the ball speed up over time –Add another variable named speed –Move by speed each time you hit the ball with the paddle Play a sound when you lose or win Try to create two player game with two paddles

Concept Summary Variables –Can be displayed –Can be set to a value –The value can be changed Incremented or decremented You can create text sprites –That you hide when the game starts Two sprites can communicate using broadcast and receive