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

Similar documents
Flappy Parrot Level 2

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

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 ll learn how to create a platform game, in which you have to dodge the moving balls and reach the end of the level.

Ghostbusters. Level. Introduction:

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.

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.

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

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 ll learn how to create a game in which you have to save the Earth from space monsters.

Brain Game. Introduction. Scratch

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

Scratch for Beginners Workbook

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

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.

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

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

Create a Simple Game in Scratch

Pong Game. Intermediate. LPo v1

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

Create Your Own World

Introduction to Turtle Art

Creating Computer Games

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

pla<orm-style game which you can later add your own levels, powers and characters to. Feel free to improve on my art

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

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.

G54GAM Lab Session 1

Programming with Scratch

A. creating clones. Skills Training 5

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

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

Lesson 2 Game Basics

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

Create Your Own World

Game Making Workshop on Scratch

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!

Module 4 Build a Game

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

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

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

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

Where's the Treasure?

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

Explore and Challenge:

Pong! The oldest commercially available game in history

CISC 1600, Lab 2.2: More games in Scratch

Ada Lovelace Computing Level 3 Scratch Project ROAD RACER

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

a. the costumes tab and costumes panel

Teaching Kids to Program. Lesson Plan: Interactive Holiday Card

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

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

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

Step 1 : Earth and Mars Orbit the Sun

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

Before displaying an image, the game should wait for a random amount of time.

Project 1: Game of Bricks

Controlling a Sprite with Ultrasound

Your First Game: Devilishly Easy

How to do automatic horizontal background scrolling in Scratch

More Actions: A Galaxy of Possibilities

Tilt Sensor Maze Game

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

Defend Hong Kong s Technocore

2D Platform. Table of Contents

GameMaker. Adrienne Decker School of Interactive Games and Media. RIT Center for Media, Arts, Games, Interaction & Creativity (MAGIC)

COMPUTING CURRICULUM TOOLKIT

Scratch Programming Lesson 13. Mini Mario Game Part 4 Platforms

Pong! The oldest commercially available game in history

1 Shooting Gallery Guide 2 SETUP. Unzip the ShootingGalleryFiles.zip file to a convenient location.

Copyright 2017 MakeUseOf. All Rights Reserved.

KEEPING SCORE: HOW TO USE SCORES, LIVES AND HEALTH

SAMPLE CHAPTER

GIMP Simple Animation Tutorial

Game Design Curriculum Multimedia Fusion 2. Created by Rahul Khurana. Copyright, VisionTech Camps & Classes

Tutorial: A scrolling shooter

04. Two Player Pong. 04.Two Player Pong

How to Create Website Banners

Now we ve had a look at the basics of using layers, I thought we d have a look at a few ways that we can use them.

Ask Jo: Quilt Designing on the Computer

Star Defender. Section 1

Using Game Maker. Getting Game Maker for Free. What is Game Maker? Non-event-based Programming: Polling. Getting Game Maker for Free

Using Game Maker. Oregon State University. Oregon State University Computer Graphics

Scratch Primary Lesson 5

Space Invadersesque 2D shooter

5.0 Events and Actions

Unit 5: What s in a List

Defend Hong Kong s Technocore

Maze Puzzler Beta. 7. Somewhere else in the room place locks to impede the player s movement.

DESIGN A SHOOTING STYLE GAME IN FLASH 8

EXTRA PRACTICE CHAPTER

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

GAME:IT Junior Bouncing Ball

INTERACTING SPRITES MODULE 3: INVESTIGATION 1. Anima9ng Sprites

Getting Started. with Easy Blue Print

GAME:IT Bouncing Ball

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

GRINDHOUSE MOVIE POSTERS

VACUUM MARAUDERS V1.0

Transcription:

Flappy Parrot Introduction In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0. Press the space bar to flap and try to navigate through the gaps in the pipes! Step 1: Make Flappy fall Start a new Scratch project. Delete the cat by right-clicking it and selecting Delete Replace the background with an outdoor landscape. desert is a good choice. Add the Flappy character. You ll need a sprite with costumes for wings 1

up and wings down. parrot is a good choice. Change the name of your sprite to Flappy. Give Flappy the following script: clicked go to x: -50 y: 0 forever change y by -3 Click the green flag, does Flappy start in the middle of the screen and then fall to the bottom? Step 2: Make Flappy fly Next, we want Flappy to flap upwards you press the space bar. Click on the Costumes tab and name the costumes wings up and wings down. Now switch back to the Scripts tab and add this script: 2

space key pressed switch costume to wings down repeat 10 change y by 6 switch costume to wings up repeat 10 change y by 6 Click the green flag, are you able to control Flappy with the space bar? Do you notice that sometimes you press the space bar but Flappy doesn t move? We ll fix that next Step 3: Fix the controls We d like Flappy to respond every time we press the space bar. But we push the space bar Flappy begins two loops of movements. If we push the space bar again before these loops have finished, Scratch ignores the second press. To solve this, we ll use a variable to count up how many flaps we need to do. Disconnect the blocks under the space key pressed and put them to the side (we ll use them in a few moments.) Make a new variable For this sprite only and call it flaps. Add the following script by draging in the blocks you put aside: 3

clicked set flaps to 0 switch costume to wings up forever repeat until flaps = 0 change flaps by -1 switch costume to wings down repeat 10 change y by 6 switch costume to wings up repeat 10 change y by 6 Finally, add to your space key pressed event: space key pressed change flaps by 1 Click the green flag, does Flappy now flap once for each time you press the space bar? Step 4: Add the pipes Next we ll add some obstacles for Flappy to fly through. 4

Click on the Paint new sprite button. Name your costume pipe. If the costume is in Bitmap Mode click on the Convert to vector button. Click on the Zoom - so that you can see the entire drawing area. Click on the Rectangle, pick a colour, and click on the Filled rectangle button. Click and drag two boxes, one from the top middle and one from the bottom middle as shown: You can shade your pipes by clicking on the Color a shape button and click on the Horizontal gradient button. Choose two shades of the same colour one for the foreground and one for the background. When you click to fill the shapes, the colours will fade between your chosen colours. Name your sprite Pipe. Step 5: Make the pipes move 5

Next we ll make the pipes move and arrange them randomly to provide an obstacle course for Flappy. Click on your Pipe sprite and select the Scripts tab. Add the following scripts: I start as a clon e clicked hide set size to 200 % forever create clone of myself wait 2 secs go to x: 240 y: pick random -80 to 80 show repeat 120 change x by -4 delete this clon e Click the green flag, do pipes appear with gaps to fly through at different heights? If you find it difficult to navigate Flappy through the pipes without touching them, you can make the gap bigger in the pipe sprite by editing the costume. Step 6: Detect collision with the pipes To make the game a challenge, the player needs to guide Flappy through the gaps without touching the pipes or the edges of the screen. Now we ll add some blocks to detect if Flappy hits something. Let s add a sound to play Flappy collides. Click on the Flappy 6

sprite then on the Sounds tab. Click the Choose sound from library button. Pick a collision sound for Flappy. The screech sound is good. Now click back on the Scripts tab. Add the following script: clicked wait until touching edge? or touching Pipe? play sound screech say Game Over! broadcast GameOver stop other scripts in sprite Click on the Pipe sprite and add a script: I receive GameOver stop other scripts in sprite Click the green flag, does the game end Flappy touches a pipe or the edge of the screen? Step 7: Add scoring The player should score a point every time Flappy makes it though a pipe. Let s add that next. Let s add a sound to play Flappy scores a point. Click on the Pipe 7

sprite add a score sound. bird is a good choice. Now click back on the Scripts tab. Make a new variable For all sprites and call it score. Add a block to set the score to 0 the flag is clicked. Add the following block: I start as a clon e wait until x position < x position of Flappy change score by 1 play sound bird Click the green flag, does the player score points for flying Flappy through the pipes? Things to try How many ways can you make this game easier or harder? Well done you ve finished the basic game. There are more things you can do to your game though. Have a go at these challenges! Challenge 1: add a high score Make a new variable called hi-score the game is over check if you need to set a new high score: 8

I receive GameOver if score > hi-score then set hi-score to score stop other scripts in sprite Click the green flag, does your score update the hi-score? Challenge 2: add gravity When something falls under gravity it doesn t usually fall at a fixed rate. For this challenge we will make Flappy fall as if under gravity. Add a new variable For this sprite only to Flappy and call it rise. Change Flappy s falling script: 9

clicked set rise to 0 go to x: -50 y: forever 0 change y by rise change rise by -0.4 And change Flappy s flapping script: clicked set flaps to 0 switch costume to wings up forever repeat until flaps = 0 change flaps by -1 switch costume to wings down change rise by 8 wait 0.2 secs switch costume to wings up wait 0.2 secs Click the green flag, does Flappy now accelerate falling and flapping? 10

Challenge 3: fall off screen When the player loses make Flappy fall off the bottom of the screen before ending the game. Replace the broadcast GameOver block with broadcast Fall Now add the following scripts: I receive Fall repeat 10 turn 5 degrees I receive Fall repeat until change y by y position < rise -180 change rise by -0.4 hide broadcast GameOver Don t forget to add a show block and reset Flappy s direction the game restarts. Click the green flag, does Flappy now fall off the screen after hitting a pipe? Does Flappy reappear in the correct orientation restarting the game. 11

Well done, you ve finished! Now you can enjoy your game! Don t forget you can share your game with all your friends and family by clicking on Share on the menu bar! 12