School Logo
  Home       Parents       News       Pupils' Work       MA&T Programme
   

You are here MA&T Scratch Snowball Game

This game is not difficult, however it can be a little tricky to get the levels right!

Stage 'Backgrounds'

All files for this project (sprites & sound files) are on the public folder on the school's Intranet)

This game asks the user to use the arrow keys to direct a rolling snowball along the path of snow to reach the next level. If the snowball touches the blue you must start the same level again.

The backgrounds can be painted by filling the area with a dark blue (make sure to use the same blue for each background - copy and then edit avoids mistakes). Choose the large brush and white and paint the snow track.

 

 

Script for 'stage'

 

Create a new variable- call it 'level'

Continue with the script as in the diagram opposite.

 

 

Script for 'stage'

 

 

 

 

Import the sound file called "Let It Snow"

 

 

 

Continue with the script as in the diagram opposite.

 

 

Script for 'stage'

Create a new 'when I receive' and call it 'begin'

Continue with the script as in the diagram opposite.

   

Script for 'stage'




 

 

 

 

Create a new 'when I receive' and call it 'change level'.

Continue with the script as in the diagram opposite matching each level with the correct background.

(Create the first 'if' and duplicate it to speed things up changing the background level and number as required)

There are four costumes for the snowball - to make the second costume, copy the first, click on the edit button and then turn the image to the right three places and save. Do the same again for the next two costumes. This will give the image a rolling appearance when the costumes are changed quickly!
   

Script for 'snowball'

 

We want to place the snowball at the start of the game - in this version of the game it will be placed at X: -197 and Y: -137 (but if your drawing for the backgrounds is different you will need to change these numbers).

The snowball is too big so we have reduced the size to 20% (set size to 20%)

There are four costumes and we tell the computer to change the costumes very quickly (every 0.1 seconds) to give the effect of the snowball rolling.

Script for 'snowball'

Next we tell the program to follow the directions of the arrow keys on the keyboard by using the script opposite.

It is best to keep the steps small e.g. 3 steps and to make all the arrow keys move the same number of steps (even though I made a mistake and put 5 steps in the right arrow key!)

Script for 'snowball'



Next we tell the program to begin when the user presses a particular key - in this case the letter 'B'

Continue with the script as in the diagram opposite.

 

Script for 'snowball'

Next we set up the timer - in this case for 3 minutes (60 seconds X 3 = 180 seconds). Create a new variable and call it 'timer'.

We also add a message when the timer comes to an end.

And of course we stop all when the timer comes to an end.

Continue with the script as in the diagram opposite.

   

Script for 'snowball'

Here we tell the program what to do when the snowball touches either the blue outside the path of snow or the red at the end of the path of snow.

When the player reaches the red colour at the end of the level it is a trigger to change to the next level. (I have asked it to wait 2 seconds before going on to the next level but you can shorten this if you want to.)

You will notice a small change in the 'go to x: and y: positions - this is just to keep the snowball closer to the start of the path.

Continue with the script as in the diagram opposite.

   

Script for 'snowball'

 

The last bit of the script for the snowball is to tell it what to do when it receives a 'change level' notice.

Continue with the script as in the diagram opposite. (Don't forget to duplicate and paste to speed things up).