In the last of our series reviewing Scratch projects from the Raspberry Pi website, we are going to ‘Save the Shark’. This project highlights environmental issues and reinforces the concepts of clones and random blocks while creating a tablet-friendly game. Like any game in Scratch that involves position or movement coordinates, in ‘Save the Shark’, these are used to manipulate the position of the shark. Using the ‘mouse down’ block within an ‘if’ statement allows the game to recognise a touch on a touch screen or the click of a mouse.
For the shark to move horizontally, Scratch compares the x position of the shark to the x position of the cursor when ‘mouse down’ is sensed. It then reduces the x value accordingly to move the shark to the left. Once I’ve worked through this with the children, I then challenge them to use the same blocks but move the shark back to the right. This allows them to demonstrate their understanding of the code by identifying which blocks will cause the shark to move to the right.
We then get to introduce plastic waste. We don’t use the sprite itself but rather clones of the sprite, appearing in random costumes at random points along the top of the screen and moving at random speeds down the screen. All of this adds to the interest and variety of the game.
At this point, we need to create a variable to monitor the shark’s health. The children can then decide how much health the shark should lose with each plastic waste clone it encounters. This element can be used in any obstacle avoidance game where a player loses health. I encourage the children not to see the shark’s health as a percentage because in the next part of the project when the shark is eating fish, the value could go beyond 100.
Here, the children need to introduce fish to feed the shark. They add the appropriate sprite and copy the code used for the plastic waste but change the values relating to shark’s health to positive. Depending on how the children are doing, they can either attempt to edit the code themselves or we can adapt it together.
This completes a worthwhile and enjoyable project. When possible, we now have some tinker time where the children can add music and sound effects. There is also the opportunity to edit the sprites to make the game more personal and focused on their interests.
The last few month’s posts have been focused on developing the skills of learners. Next month, we will look at how teachers can develop their own pedagogical and technical skills. Thanks for reading!
by Steve Lewis