Chase Game

First do all the steps following the online tutorial...

  1. Add a Backdrop
  2. Add a Sprite
  3. Move Right & Left with Arrow Keys
  4. Move Up & Down with Arrow Keys
  5. Add another sprite
  6. Move randomly
  7. In octopus sprite, when touching play sound
  8. Create score variable
  9. In octopus sprite, when touching add score

Change into a Catching Game

Save a copy

First go to File>Save as a Copy… rename it to “Catch Game”

change sprites & backdrop

  1. Octopus sprite: go to Costumes and choose a different sprite (ie. Bowl). Then rename it.
  2. Star sprite: go to Costumes and choose a different sprite (ie Apple). Then rename it.
  3. Backdrop: change backdrop to something simple, easy to see fruit & bowl.

Falling fruit

First, delete forever/glide loop from Flag event.

Now we need to make the fruit start along the top of the screen. Add:

  • Go to ‘random position’
  • Set y to ‘180’

To help you understand why we set Y to 180, look at this tip about the stage size...

So now click on the green Flag and the fruit should be along the top of the screen somewhere…

  • Take what you already have and put it inside an IF-THEN block…
  • Test if it’s is close to the bottom (-170).
    • If y position < -170, then it should move back to the top in a random position

Make it go down a bit at a time

  • change y by ‘ -5’ and put it inside the forever loop at the top

Catching it

We need to set the fruit back to the random top position whenever we catch it.

  • First move the code for touching the fruit into the bowl sprite’s code…
  • and delete from the bowl.

So bowl just has arrow key actions… 

For the fruit should have 2 separate Flag actions…

  • change the touching to ‘bowl’…
  • also load ‘Pop’ sound and play that instead of ‘Wand’ sound….

Add the following inside the IF TOUCHING loop, so when you’ve collected the fruit, it disappears and jumps to the top of the screen again.

  • Go to ‘random position’
  • Set y to ‘180’

Score: start at 0

Before the forever loop for the fruit, add a Set Score action…

bonus points

Duplicate the apple sprite and go into Costumes – change the fill color with the Paint Bucket

In the code, change score by ‘2’ instead of ‘1’.

Victory message

New sprite – make it text. Type out text “You Win” with a nice font, and  resize so fills canvas.

In the code for this sprite, have it only show when the score reaches ‘10’. And stop everything (no more falling fruit)…