29
AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. Johns Riverglen Computer Science 1

AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

AN EASY INTRODUCTION TO

SCRATCH GAME CODING

By Mr. Johns Riverglen Computer Science 1

Page 2: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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

Page 3: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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.

Page 4: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 5: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 6: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 7: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

MORE ON NEXT PAGE FOR THIS SAME CODE BLOCK

Page 8: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

MORE ON NEXT PAGE FOR THIS SAME CODE BLOCK

Page 9: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 10: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 11: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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)

Page 12: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 13: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 14: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

MORE OF THIS CODE BLOCK ON NEXT PAGE

Page 15: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 16: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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)

Page 17: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 18: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

MORE OF THIS CODE BLOCK ON THE NEXT PAGE

Page 19: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 20: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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)

Page 21: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 22: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 23: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

PAUSE

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

Page 24: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 25: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy
Page 26: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

PAUSED GRAPHIC

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

Page 27: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

GROUND

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

Page 28: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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)

Page 29: AN EASY INTRODUCTION TO SCRATCH GAME CODING By Mr. … · “costume1”, “costume2”, etc. up to 6. 5.Upload “punch” (sound) 6.Upload “flappy” (sound) 7.Upload “flappy

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!