Forest+Archery+Game



This lesson will cover: Your teacher will show you the screencasts to see how to create this game.
 * Decision statements
 * conditional loops
 * variables
 * random numbers
 * animation
 * sound
 * Introduction**
 * Introduction**

Let’s look again at the two main things we need to code in our game:
 * Task 1: Designing the solution**
 * 1) moving the target
 * 2) shooting the target


 * Try to code your program from the algorithms given, rather than looking at the screencast again.**

**Algorithm to move target (in Target sprite)**
when flag is clicked repeat forever glide in 1 second to a random position* // * x is a random number from -240 to 240 //

// y is a random number from -180 to 180 //

**Algorithm to move sight and shoot (in Sight sprite)**
when flag is clicked repeat forever go to mouse location //(the mouse x and mouse y positions)// if the mouse button is down //(the user has clicked the mouse)// if the sprite is touching the target sprite add 1 to score variable play Pop! sound Say “Hit!” for 0.5 seconds


 * Task 2: Hit and miss**

Change your code to make the program count **misses** as well as **hits (taking off 1 point from the score)**:

If touching target change score by 1 play Pop! sound Say “Hit!” for 0.5 seconds else change score by -1 play sound say “Miss!” for 0.5 seconds

Add a timer **variable** to your program which makes the game last 30 seconds. Make the variable appear on the screen as it counts down from 30 to 0. when flag is clicked repeat 30 times wait 1 second change time by -1 stop all scripts
 * Task 3: Against the clock**

Using ** if ** and touching colour blocks, change the program so that when the target is hit, it adds the following to the score:
 * Task 4: Bullseye! **
 * White – 1 point
 * Black – 2 points
 * Blue – 3 points
 * Red – 4 points
 * Gold – 5 points (and says “Bullseye!”)

Adapt the program so that the user will **never** get a negative score.
 * Task 5: Stay positive!**


 * Hint**: take off a point only if the score is above zero.


 * Extensions**
 * Forest Archery Game Extension Tasks**


 * Media**