Published on

Lesson 7: Class Project Part 2

Authors
  • avatar
    Name
    Jakeydmonkey
    Twitter

Intro

Last week, our students were given the time to explore projects on Scratch made by a community of their peers (you can explore some of these projects here). They were particularly interested in the following project:

https://scratch.mit.edu/projects/839376396/

I instantly saw how this project utilizes key concepts in programming such as loops, if statements, variables, and even randomization. So, we decided to use the rest of our classes to build a game much like this one.

Part 2: Building a Boomerang

Time to spice up our game a bit! Let's build another obstacle to avoid to make the game a little more difficult.

First things first

  • Go to the teacher's project and test play the game. This is what you will be building today.
  • Now go to the skeleton code you will be modifying. You can test it out by playing it. Notice how it's different from the teacher's project? It's your job to complete the code to make it work the same as the teacher's.
  • Make a Remix of the project.

Making the Lightning Rotate

  • In this project, we will be using the Lightning sprite as a boomerang. First, move to the Lightning sprite page.
  • Now, you may have noticed that the Lightning in the skeleton code does not rotate like a boomerang should. It's your job to make the lightning rotate. Can you add code to the following section to make the lightning rotate? (Hint: to rotate means to TURN FOREVER).

Making the Player Lose a Life When Touching Lightning

  • Now, for this game to work, the Player must lose a life whenever it is hit by the Lightning Boomerang.

  • The following code defines that the Player loses one life IF it touches a dot. Can you add a condition in the green block that will tell the program to subtract a life from the Player IF it TOUCHES LIGHTNING?

You're ready!!

  • If you were able to do the above, your program should be working smoothly! How high can you score?