How to use the resource
'Pong Football' is designed to be used as a computational resource for Key Stage 2 pupils to support development of their computational thinking. As well as the original version of the game, there are several variations of the game which allow the children to implement techniques used in computational thinking (e.g. debugging, inputs/outputs, logical reasoning). The variations of the game involve three different debugging activities where the children are required to use their computational skills to debug the game.
Prior to attempting the debug activities, it is advised that the children have a basic understanding of Scratch, including how to use the backgrounds, sprites, costumes and sounds. With this basic understanding, allow the children to play the original version of the game, so that they can see how the game is meant to look when completed and means they can look within the game to explore the different algorithms used to create the game. This is also a good opportunity to introduce the idea of inputs, outputs and variables:
For example, you could ask the children to try and find examples of each of them; within Pong Football you could use the example of the up arrow being pressed (which is the input), which results in the paddle moving up (output) and each time the football hits the green zone on the right, the score (variable) increases by one.
Once the children have explored the original game suitably, they could move on to the following debugging activities:
Prior to attempting the debug activities, it is advised that the children have a basic understanding of Scratch, including how to use the backgrounds, sprites, costumes and sounds. With this basic understanding, allow the children to play the original version of the game, so that they can see how the game is meant to look when completed and means they can look within the game to explore the different algorithms used to create the game. This is also a good opportunity to introduce the idea of inputs, outputs and variables:
For example, you could ask the children to try and find examples of each of them; within Pong Football you could use the example of the up arrow being pressed (which is the input), which results in the paddle moving up (output) and each time the football hits the green zone on the right, the score (variable) increases by one.
Once the children have explored the original game suitably, they could move on to the following debugging activities:
Debugging Activity 1
Links to the National Curriculum
- Understand what algorithms are and how they are implemented on digital devices
- Use logical reasoning to correct errors in algorithms and programs.
- use sequence, selection, and repetition in programs; work with variables and various forms of input and output.
This activity allows pupils to look at algorithms and use logical reasoning to sequence programming blocks in order to execute a desired action.
Algorithms are step-by-step instructions that a computer follows to carry out a task, which can be decomposed into smaller parts to make them more simple and easier to understand. In order to help the children understand algorithms more, you could put them into a real-life context that the children may have encountered before. For example, instructions to make a pie. The instructions to make a pie are in a precise, step-by-step order and if you miss out one of the steps or complete them in a different order, the resultant pie will not be the same as you would have pictured it. This is similar to algorithms within computing, where if one of the programming blocks are missed out or put in the wrong order, the action will not be completed how you wanted it to be. For this particular debugging activity, the 'paddle' sprite is not working correctly; it does not move up and down when the up and down arrow keys are pressed. What the children need to do is use some of the programming blocks that are not currently connected to the sprite to create the correct algorithm to make the paddle move up and down when required (be careful though, some of the blocks aren't actually part of the algorithm). Click here to be directed to the Pong Football Debugging Activity 1. It is really important to remind the children that is it okay for the algorithm to not be perfect and correct the first time, encourage them to keep trying. The solution is below: |
|
Debugging Activity 3
Links to the National Curriculum
- Solve problems by decomposing them into smaller parts.
- Use sequence, selection and repetition in programs; work with variables.
- Use logical reasoning to detect and correct errors in algorithms and programs.
This activity continues the idea of decomposing algorithms to make them easier to understand, whilst also introducing the idea of variables. Variables are used in programming to store information that needs to be remembered within the programme.
Variables can be put into a real-life context for the children to understand, such as car parks. A lot of car parks have automated barriers which use variables to count cars in and out, which can then be used to see how many spaces are left in the car park. Or to make variables more relatable for a lot of children, they are often used in computer games, where the player's health or lives are decreased by receiving damage or increased by collecting items (in this case the health or lives are the variables which need to be remembered by the system). (Taken from BBC Bitesize) |
|
In Pong Football, three variables are used: Score, hits, and high score. The score variable increases by 1 each time the football hits the green zone on the right. The hits variable increases each time the football hits the paddle and is directly linked to the speed of the football, as shown on the explanation of the algorithms section on the Home page. The high score variable is the variable that is not working in this debugging activity, as the algorithm has been muddled up and a few extra programming blocks have been put amongst the ones that are needed. What is meant to happen, as in the original version of the game, is that when the Score variable increases to a number above the high score variable, the high score variable increases to the Score variable, and keeps doing that until the game is over. The high score variable then stays the same until the Score variable goes above it again.
What the children need to do this time is to arrange the programming blocks in the correct order to make the high score increase as it is meant to. Click here to be directed to Pong Football Debugging Activity 3. To make the activity harder: In order to challenge the children further, you could delete the variables from the sprites and allow the children to create their own so that they can explore and refine their understanding of variables. The solution is below: |