Introduction

You are going to learn how to create an archery game, in which you have to shoot arrows as close to the bullseye as you can.

Step 1: Aiming arrows

Let’s start by creating an arrow that moves around the screen.

Activity Checklist

  • Open the ‘Archery’ Scratch project. Your club leader will give you a copy of this project, or you can open it online at jumpto.cc/archery-resources.

  • When your game starts, broadcast a message to shoot a new arrow.

    screenshot
    screenshot
  • Once this message has been received, set the arrow’s position and size.

    screenshot
    screenshot
  • Click the green flag to test your game. You should see your arrow get bigger and move to the bottom-left of the stage.

    screenshot
    screenshot
  • Add code to your arrow so that it glides randomly around the stage forever.

    screenshot
    screenshot
  • Test your game again, and you should see your arrow move randomly around the stage.

    screenshot
    screenshot

Save your project

Step 2: Shooting arrows

Let’s code your arrow to shoot when the space bar is pressed.

Activity Checklist

  • Stop the other script (the one moving the arrow) when the space bar is pressed.

    screenshot
    screenshot
  • Test your project again. This time, your arrow should stop moving when the space bar is pressed.

  • Animate your arrow, so that it looks like it’s moving towards the target.

    screenshot
    screenshot
  • Test your game again. This time, when you press the space bar you should see your arrow get smaller, as if it’s moving towards the target.

    screenshot
    screenshot
  • Once your arrow is at the target, you can tell the player how many points they have scored. For example, they could score 200 points for hitting the yellow.

    screenshot
    screenshot
  • You can also play a sound if they hit the yellow.

    screenshot
    screenshot
  • Finally, you need to broadcast the new arrow message again to get a new arrow.

    screenshot
    screenshot

Save your project

Challenge: Different scores

Can you add code to your game, so that you get a different score for hitting different parts of the target?

screenshot
screenshot

Save your project