Pong Game. Intermediate. LPo v1

Similar documents
Create a Simple Game in Scratch

Step 1 : Earth and Mars Orbit the Sun

In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0.

Let s start by making a pencil, that can be used to draw on the stage.

Lost in Space. Introduction. Scratch. You are going to learn how to program your own animation! Activity Checklist.

Add in a new ghost sprite, and a suitable stage backdrop.

You are going to learn how to create a game in which a helicopter scores points by watering flowers in the city.

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

Ghostbusters. Level. Introduction:

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Clone Wars. Introduction. Scratch. In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Create Your Own World

Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Scratch for Beginners Workbook

Fireworks. Level. Introduction: In this project, we ll create a fireworks display over a city. Activity Checklist Follow these INSTRUCTIONS one by one

In this project you ll learn how to create a platform game, in which you have to dodge the moving balls and reach the end of the level.

Brain Game. Introduction. Scratch

In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Flappy Parrot Level 2

Create Your Own World

Creating Computer Games

In this project you ll learn how to create a game, in which you have to match up coloured dots with the correct part of the controller.

Lesson 8 Tic-Tac-Toe (Noughts and Crosses)

Pong! The oldest commercially available game in history

Open the Tech Toys Scratch project. Your club leader will give you a copy of this project, or you can open it online at jumpto.cc/toys-go.

Project 1: Game of Bricks

Let s start by making a pencil that can be used to draw on the stage.

Create a game in which you have to guide a parrot through scrolling pipes to score points.

GAME PROGRAMMING & DESIGN LAB 1 Egg Catcher - a simple SCRATCH game

How to do automatic horizontal background scrolling in Scratch

Introduction to Turtle Art

Scratch Primary Lesson 5

CISC 1600, Lab 2.2: More games in Scratch

A. creating clones. Skills Training 5

Scratch Programming Lesson 13. Mini Mario Game Part 4 Platforms

Programming with Scratch

Lesson 2 Game Basics

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

Module 4 Build a Game

Fish Chomp. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Ada Lovelace Computing Level 3 Scratch Project ROAD RACER

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

Introducing Scratch Game development does not have to be difficult or expensive. The Lifelong Kindergarten Lab at Massachusetts Institute

Defend Hong Kong s Technocore

Scratching the Surface of Pong: Enriching Linear Equations with Computer Programming

Pong! The oldest commercially available game in history

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

Parallax Scrolling Tutorial Created in Drogheda by Seamus Minogue and updated for Clonakilty CoderDojo 15/06/2012 PARALLAX SCROLLING

INTERACTING SPRITES MODULE 3: INVESTIGATION 1. Anima9ng Sprites

Scrolling Shooter 1945

Game Making Workshop on Scratch

Rock Band. Introduction. Scratch. In this project you ll learn how to code your own musical instruments! Activity Checklist.

Programming I (mblock)

Meteor Game for Multimedia Fusion 1.5

ChatBot. Introduction. Scratch. You are going to learn how to program your own talking robot! Activity Checklist. Test your Project.

Module. Introduction to Scratch

abc 3 def. 4 ghi 5 jkl 6 mno. Computers Rule the World

Space Invadersesque 2D shooter

Robot Programming Manual

Explore and Challenge:

Tutorial: A scrolling shooter

Part II: Number Guessing Game Part 2. Lab Guessing Game version 2.0

Defend Hong Kong s Technocore

a. the costumes tab and costumes panel

15 TUBE CLEANER: A SIMPLE SHOOTING GAME

Instructional Document

The Beauty and Joy of Computing Lab Exercise 10: Shall we play a game? Objectives. Background (Pre-Lab Reading)

ICS 61 Game Systems and Design Midterm Winter, Mean: 66 (82.5%) Median: 68 (85%)

Tutorial: Creating maze games

Copyright 2017 MakeUseOf. All Rights Reserved.

04. Two Player Pong. 04.Two Player Pong

Create a Vector Glass With Layered Reflections to Create Depth

Alright! I can feel my limbs again! Magic star web! The Dark Wizard? Who are you again? Nice work! You ve broken the Dark Wizard s spell!

Scratch Coding And Geometry

Rifle Arcade Game. Introduction. Implementation. Austin Phillips Brown Casey Wessel. Project Overview

AIM OF THE GAME GLACIER RACE. Glacier Race. Ben Gems: 20. Laura Gems: 13

In this project you ll learn how to code your own musical instruments!

1) How do I create a new program? 2) How do I add a new object? 3) How do I start my program?

Assessment: Reverse Engineering

Where's the Treasure?

Computer with Scratch program.

PING. Table of Contents. PING GameMaker Studio Assignment CIS 125G 1. Lane Community College 2015

Unit 5: What s in a List

Game Maker Tutorial Creating Maze Games Written by Mark Overmars

Module 2 Drawing Shapes and Repeating

Introduction. Overview

Introduction to programming with Fable

Cato s Hike Quick Start

Write algorithms with variables. Phil Bagge code-it

Once this function is called, it repeatedly does several things over and over, several times per second:

Creating Drag and Drop Objects that snap into Place Make a Puzzle FLASH MX Tutorial by R. Berdan Nov 9, 2002

SAMPLE CHAPTER

No Evidence. What am I Testing? Expected Outcomes Testing Method Actual Outcome Action Required

Getting Started. with Easy Blue Print

How to create a survey with SurveyMonkey

Lesson 1 Getting Started. 1. What are the different ways you interact with computers?

VACUUM MARAUDERS V1.0

STEP-BY-STEP THINGS TO TRY FINISHED? START HERE NEW TO SCRATCH? CREATE YOUR FIRST SCRATCH PROJECT!

Assessment. Self Assessment. Teacher Assessment. Date Learning Objective(s) Achievement or. NC Level: Game Control Student Booklet P a g e 1

Transcription:

Pong Game Intermediate LPo v1

Programming a Computer Game This tutorial will show you how to make a simple computer game using Scratch. You will use the up and down arrows to control a gun. The space bar will be used to fire at a moving target.

1. Right click on the cat sprite and delete it. 2. Create a new sprite and draw something in the shape of our gun. 3. When the game first starts (when we click the green flag), we would like our gun to be at the middle-left side of the screen. Enter the following commands into the Scripts box. This tells the computer that when the green flag is clicked, the gun should be positioned at (-200,0), the left side of the screen.

4. Now, we need to control the gun using the up and down arrows. Enter the following. They tell the computer to move the gun up when the up arrow is pressed, and to move it down when the down arrow is pressed. Its common sense. 5. Click the green flag to start the script and test whether the controls work. 6. Now, we need to create our target. Create a new sprite (as in step 2) and draw a target (a red circle). At the beginning of the game when the green flag is pressed the target should position itself at the middle-right side of the screen. Create the following code for the target. 7. The target should automatically begin to move up and down. Change the code you created in the previous step to: This tells the computer to initially set the position to (200,0), then point the sprite upwards, it then repeats whatever is inside the forever loop forever. In this case it is moving the spite forwards by 10 units, checking to see if it has reached the edge of the screen, and if it has changing its direction.

8. Your project should now look like this. Test to see if it works by pressing the green button and playing around with the up and down arrows. 9. Now, we need to create a bullet for the gun. The bullet will be fired by pressing the space bar. Create a new sprite in the shape of a very small square (as in step 2). This will be the bullet. When we first start our game we need the bullet to be hidden, because we have not yet fired our gun. Create the following code for the bullet. This tells the computer to hide the bullet when the game starts (when the green flag is clicked).

10. Now, when we press the space bar to fire the bullet, the sprite should appear. It should appear at the same position as the gun. Enter the following code. Its meaning is self explanatory. 11. We would like the bullet to move after it has been fired. Change the code in the previous step to: The additions to this code tell the computer to keep increasing the x- coordinate of the bullet by 10 until its x- coordinate is greater than 230. Then the bullet will disappear again. 12. Test to see if the program works by clicking the green flag, then use the up and down arrows to move the gun, then press the space bar to shoot the bullet.

13. If the bullet hits the target we need the target to disappear. Select the target by clicking Sprite 2. You should be able to see the code you entered in step 7. Every time the target moves a step we need to check to see if it is touching the bullet. Change the previously entered code to the following: This tells the computer to keep checking whether the target is touching the bullet, and if it is it hides the target, signifying a hit. This is needed if we wish to restart the game after we have shot the target. The target disappears if it is shot so we need to make it reappear. 14. You have finished creating the basic game. Test to see if your program works!

Making the Game More Challenging 15. Let s make the game more challenging by introducing a limit to the number of times the gun can be fired. Click on Variables and create a variable called shots. 16. When the game first starts, we need to set the number of shots available. This can be done inside the code for any of the three sprites. Click on sprite 1 and change the code previously entered in step 3 to the following. This sets the number of shots available to 3. Click the green flag to see it work. Notice that the value of shots is displayed in the game window. 17. When we fire the gun we need to reduce the value of shots by 1. Click on the bullet and change the code entered in step 11 to:

18. When the value of shots is equal to zero we should display a game over message. After the bullet has been fired to the right and has disappeared, check the currently value of shots. If it is equal to zero, stop the game. Change the code entered in step 11 to: 19. The game is now complete! Play it by clicking the green flag. Experiment with other Scratch functions and add more features to the game. You can add sounds, display messages etc