Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building a Game in Scratch

Similar presentations


Presentation on theme: "Building a Game in Scratch"— Presentation transcript:

1 Building a Game in Scratch
Module 4 Lesson 1 Get out your notes!!

2 To learn about the process of project design.
Learning Objectives To learn about the process of project design. To be introduced to conditional statements in Scratch.

3 Outline for the day You will make a game today
First we will look at Game Design. Once the game is designed we will implement the game in Scratch

4 Design a Game: “Run Away”
When you start a programming project it is a good idea to brainstorm away from the computer. We will start with a simple game. It has 2 characters and a background. Answer the following to help generate ideas about your game. Complete the following before you get working in Scratch.

5 Design a Game Description of your Good Guy character
Description of your Bad Guy character Description of the Background you would like to use for your game.

6 Design a Game: Controls
Key Used Movement Up Arrow Move Up Down Arrow Move Down Left Arrow Move Left Right Arrow Move Right Space Bar

7 Design a Game: Game Play
Game Feature Working? Bad Guy moves randomly so the Good Guy can’t guess where he is going The Good Guy starts with 5 lives (Later Lessons) If the Good Guy is touching the Bad Guy then the Good Guy loses a life. (Later) If the Good Guys lives become equal to zero the game stops and a Game Over background appears (Later) When the Game restarts the background is reset and the lives are initialized back to 5. (Later)

8 Design a Game: Improvements
Enter improvements for your game.

9

10 Building the Game Open Scratch and remove the Cat
Add your two characters. (Good Guy/ Bad Guy) Add your background Program the Good Guy’s movements Select him Add scripts for right arrow (Change x by 10), left arrow (Change x by -10), up arrow (Change y by 10), down arrow (Change y by -10).

11 Sample Good Guy Code

12 Program the Bad-Guy Sample description of motion
He will be moving forever (Forever loop) Change x by (Pick random -20 to 20) Wait 0.2 sec Change y by (Pick random -20 to 20) Wait 0.1 sec Turn (pick random -90 to 90) If on edge, bounce Test it. Does the bad guy move around randomly? Modify as needed to get the motion you would like.

13 Refine these values to improve the Bad Guy’s movements.
Sample Bad Guy Code Refine these values to improve the Bad Guy’s movements.

14 Ouch!!! Getting the Good Guy to react to bumping into the bad guy.
This will need to be checked forever. (Loop) Say Ouch Change the character (fisheye, you can pick another effect) Test

15 Possible Good Guy Code

16 Extensions Enhance the Good Guy functionality by including a costume change when moving in different directions Add special movement keys for the Good Guy. A jump, … Alter the speed and motion of the Bad Guy to make it more realistic. Turn in the current version of your game YourNameMod4Lesson1


Download ppt "Building a Game in Scratch"

Similar presentations


Ads by Google