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.

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.
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
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
Flappy bird guide for Scratch
Creating a Basic Pacman game
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.
Racing Car Game Using the keys to control a sprite.
Extending the Pong Example Barb Ericson Georgia Tech June 2011.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
LO: Learn how to develop your game further to include interactions with the device.
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.
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.
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.
 Make sure you are subscribed to announcements on Moodle.  Activity 4 will be due 48hrs after your lab ends.
Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman Year 9 ICT Autumn Term 2007.
Scratch Programming Lesson 2 First glance to programming logic.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
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.
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.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Image #1 Getting Started
Scratch Another computer programming language Developed by MIT in 2003
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Computer Programming Modeling a Passive Solar Home.
The If Block. IF The “if” block can be found in the control tab. The if block means, “IF this happens, THEN do this.” You can put blocks ON the if block.
Variables and Random Numbers Computer App Session 4.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
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.
Scratch Programming Lesson 1 Moving objects with sound and changing colours.
Today's Ninja Challenge: Write Your First Computer Game!
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 Helicopter Game
Movement Game Design (Scratch).
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
Scratch – Simple Programming
Loopy Motion Control.
Stopwatch Cards Stopwatch Cards
Scratch – Simple Programming
Sensing and Variables.
Lesson 1 Introduction to Scratch Basic blocks
Maze Race. Maze Race Race The first thing you need to do is change the background so click on stage. Then click on background. Now click paint Select.
Lesson Objectives To understand how to make sprites interact
Stopwatch Cards Stopwatch Cards
Go to =>
Stopwatch Cards Stopwatch Cards
Image #1 Getting Started
Game Over Module 4 Lesson 2.
Stopwatch Cards Stopwatch Cards
Sensing and Variables.
Creating a Simple Game in Scratch
Scratch Racing.
CSC 221: Introduction to Programming Fall 2018
Stopwatch Cards Stopwatch Cards
Stopwatch Cards Stopwatch Cards
Scratch – Simple Programming
Presentation transcript:

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 are stored. The SPRITES are where you store and select the STAGE and COSTUMES SCRIPTS AREA is where you put your instructions The SCRIPT BLOCKS are where the instructions of what your SPRITES can do !

What is a Sprite?  A Sprite is a character that plays in the game  Students can change their sprite, either by drawing a new one  Or choosing one from a file

Lesson 2 – Marble Racer

Design a racetrack and car  You need to design a simple racetrack and race car as viewed from above.  You will need to keep your design simple so that you can draw it using the paint editor  You will need to use clear colours as these will be used to detect the position of the car.

What will we learn?  Move a sprite using the keyboard.  Add to players to the game  Use the stop script to stop a game  Use the say block to announce a winner  Add a timer to show the winning time

Create a new background with the editor  Click on the stage and use the editor to draw a racetrack

Add a car sprite that you have designed

Use the up arrow key to move the car  Use the forever control block and the if control with the key pressed sensor to detect a key pressed and move the car.

Use the up arrow key to move the car  Use the forever control block and the if control with the key pressed sensor to detect a key pressed and move the car.

Use the other arrow keys to move the car  Test the program to make sure you can move the car in all directions. Change the move steps amount to slow down or speed up the car.

Use the other arrow keys to move the car  Test the program to make sure you can move the car in all directions. Change the move steps amount to slow down or speed up the car.

Add a second car  Use the a, s, w, z, keys to control the second car so you can have a two player game

Test your game  Get into pairs and play each others games to make sure that both cars move correctly in all directions.

Be a winner!  Create a finish line sprite so that when a car touches the finish line they win!

Key Point – Stop Script  Stop script  Use the stop script so that once a car has won the race another car cannot win. Try the game without the stop script.

What else do we need?  Add a timer to see how fast the winning car goes.  Stop the game if a car goes on the grass OR keep a score of the number of times the car goes on the grass  Reset the game once a car has won

Add a timer  Tick the timer on the sensing block to create a timer

Add a timer  Tick the timer on the sensing block to create a timer

Announce the winning time  Use the say block from the Looks controls and the reset timer from the sensing controls to announce the winning time

Announce the winning time  Use the say block from the Looks controls and the reset timer from the sensing controls to announce the winning time

Stop the car if it goes on the grass  Use the if control with the touching colour sensor to detect the car on the grass. Reset the car position when green flag clicked.

What now?  Get into pairs and play your games and see what improvements you can make.  Discuss your games with each other as you test them.  You made to need alter the size and orientation of the cars to get them both to fit on the start line.  You may want to change the value of move to slow the game down if you are crashing all the time.

Extension tasks  Create a timer for each car using variables  Make the car explode when it goes on the grass (hint: switch costumes)  How can you stop a car going backward around the course and crossing the finish line in the wrong direction?  Change the stage at the end of the race to show a new racetrack and start a new game