AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up...

Post on 03-Jun-2020

3 views 0 download

transcript

AN EASY INTRODUCTION TO

SCRATCH GAME CODING

By Mr. Johns Riverglen Computer Science 1

MAKE ALL OF THESE VARIABLES: 1. Click on the orange “variables” circle 2. Click on the white “Make a Variable” box 3. Select “For all Sprites” 4. Type “World Record” and click “ok”. 5. Do the same for the other variables below:

*A checkmark next to a variable means it will be visible in the game

FLAPPY HAPPY BIRD

1. Download all the graphics and sounds off of Mr. Johns’ website.

2. The first graphic is called “HappyFlappy1” on the website but when you download it it is actually named “yellow_flappy1”. When you upload it into Scratch as a new sprite, you can rename it. I suggest “Flappy”.

3. Suggested size for Flappy = 15% 4. With the Flappy sprite selected, click on “Costumes”

and upload the other “Flappy” files and name them “costume1”, “costume2”, etc. up to 6.

5. Upload “punch” (sound) 6. Upload “flappy” (sound) 7. Upload “flappy bird theme song” (sound) 8. Now start dragging and dropping code to create code

blocks for Flappy until they look exactly like the following examples.

9. The graphic in the upper left of the following pages shows which sprite you should be creating code for.

MORE ON NEXT PAGE FOR THIS SAME CODE BLOCK

MORE ON NEXT PAGE FOR THIS SAME CODE BLOCK

PILLARS1

1. Upload “pillars1” as a new sprite 2. Resize “pillars1” to 150% 3. Under Costumes, name it “costume7” 4. Upload “super-mario-kart-coin” (sound) 5. Code (see following pages)

MORE OF THIS CODE BLOCK ON NEXT PAGE

TITLE SCREEN

1. Upload “title screen” as a new sprite 2. Under Costumes, keep the name “title screen” 3. Use the “Paint” program in Costumes to replace Mr.

Johns’ name with yours! 4. Code (see following pages)

MORE OF THIS CODE BLOCK ON THE NEXT PAGE

MUSIC

1. Upload “music symbol” as a new sprite 2. Name music symbol “costume 1” under costumes 3. Upload “mute music symbol” as a costume and name

it “costume2” 4. Upload “flappy bird theme song” (sound) 5. Code (see following pages)

PAUSE

1. Upload “pause” as a new sprite 2. Keep it as “pause” in costumes 3. Code (see following pages)

PAUSED GRAPHIC

1. Upload “paused” as a new sprite 2. Keep it as “paused” under costumes 3. Code (see below)

GROUND

1. Upload “ground1” as a new sprite 2. Upload ground 2-16 as costumes for “ground1” 3. Code (see below)

SCORES

1. Upload “score” as a new sprite (it includes “World Record” and “Personal Best”)

2. Rename as “costume1” under costumes 3. Code (see below)

1. Add the following code to create a World Record and

Personal High. 2. Make sure these variables are visible (checked).

NEXT: Play your game until it works. Share the link to your awesome Flappy Happy Bird game with Mr. Johns!