Our Year 5 students have been exploring Scratch this term and learning lots about coding along the way. From small beginnings, the children have quickly developed a really exciting and creative understanding of just what’s possible in Scratch.
This learning has all come together in the last few weeks with a massive game building project, based on their class topic of a ‘Conservation Conversation‘. This project started out as a simple ‘falling objects’ type game where they were trying to collect pollution before it hit the bottom of the ocean. However this quickly developed into something far more interesting thanks to some incredible ideas from the children. First they wanted to make the game more random, with objects falling at different times in different places. Then several of them explored the idea of ‘power ups’ that would make the game easier or harder. The natural next step was to add a variable to hold a Score and after that we decided it would be fun to add a time limit variable to add to the pressure!
But they didn’t stop there – the children then developed even more elements in their games. Time limited boosters, sneaky tricks to get extra points, objects that immediately ended the game when caught. The list was endless!
Finally we all came together and explored how a micro:bit could be used as a game controller for these games. We used buttons as an input, before Rio came up with some quite brilliant code to use the motion sensor too!
This has been a hugely fun project and the children have been problem solving, debugging and creating new code with incredible skill and precision. They’ve even got into the habit of labelling their code as they go to make it easy to pick up and edit in the future!
Below you can see some of the code they’ve been constructing, as well as some of their games for you to play and enjoy!
For this game you need to use the Arrow Keys to move the paddle along the bottom of the screen.
Catch the pollution but beware of bad power-ups!
Press the Green Flag to start.
Cool Code in these Games
Randomising Game Elements
We quickly discovered that the games would be a lot more fun if we didn't know where or when objects would be falling from. The children explore Random blocks to create rules for the game to follow, but rules which would create an unpredictable outcome.
Variables: Timer, Score and More
Adding a Score and Timer was a great chance to spend more time exploring Variables. These clever bits of code can change their value at any time, making them perfect for adding five points or taking away a second on the timer. Some children even used the Score variable to trigger new levels starting!
Boosters
As well as pollution falling into the ocean, the children wanted to add other objects which would affect the gameplay in one way or another. Cue objects that add or remove time from the timer, ones which give you bonus points and even ones which make your paddle bigger or smaller. Bonuses, both good and bad, added a whole new dimension to the gameplay.
Micro:Bit Controllers
The last part of the project involved connecting our micro:bits to Scratch over Bluetooth to use them as an external gamepad. The children experimented with using the buttons too move left and right before Rio made a breakthrough (with the code above!) to make the tilt sensor work flawlessly. The micro:bits also came in handy for displaying the score and time remaining.
For this game you need to use the Arrow Keys to move the paddle along the bottom of the screen.
Catch the pollution but beware of bad power-ups!
Press the Green Flag to start.