1 / 16

Building a Game in Scratch

Building a Game in Scratch. Module 4 Lesson 1. Get out your notes!!. Learning Objectives. To learn about the process of project design. To be introduced to conditional statements in Scratch. Outline for the day. You will make a game today First we will look at Game Design.

bethe
Download Presentation

Building a Game in Scratch

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  7. Design a Game: Game Play

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

  9. 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).

  10. Sample Good Guy Code

  11. 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.

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

  13. 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

  14. Possible Good Guy Code

  15. 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

More Related