Modifying a game
I can modify an infinite loop in a given program.
Modifying a game
I can modify an infinite loop in a given program.
These resources will be removed by end of Summer Term 2025.
Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.
These resources were created for remote use during the pandemic and are not designed for classroom teaching.
Lesson details
Key learning points
- An infinite loop can be modified.
- Changing values within loops can affect how the game plays.
- Existing code can be reused and modified for new sprites.
Keywords
Decompose - to break down a task into smaller, more achievable steps
Modify - to make changes to something
Predict - to say what you think will happen before it happens, based on what you already know or can see
Common misconception
Using a 'repeat 1000' block is just the same as using a 'forever' block to make a character keep doing something in a game.
Even though a repeat 1000 runs many times, a forever loop runs without an end point, which is better for actions that need to continue through the entire game.
To help you plan your year 4 computing lesson on: Modifying a game, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your year 4 computing lesson on: Modifying a game, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 2 computing lessons from the Using repetition in programming to create a game unit, dive into the full primary computing curriculum, or learn more about lesson planning.
Equipment
Pupils will need access to a device with block-based programming software. Examples in this lesson use Scratch https://oak.link/scratch
Licence
Prior knowledge starter quiz
6 Questions
Q1.What does an event block like the green flag do in a coding project?
Q2.What can repetition be used for in a sprite’s animation?
Q3.If you want to copy a part of your coding project exactly, what should you do?
Q4.What do we call a set of clear steps to solve a problem?
Q5.Put these actions in order for evaluating a coding project:
Q6.Match the process to its effect:
Repeats actions
Animates the sprite
Starts the program
Makes an exact copy
Assessment exit quiz
6 Questions
Q1.Which block will keep a character moving for the entire game?
Q2.What happens if you use a 'repeat 1000' block instead of a 'forever' block?
Q3.What is it called when you break a task into smaller steps?
Q4.Which of these is a good reason to decompose a large coding project?
Q5.Arrange these actions for reusing code for a new sprite:
Q6.Match the keyword to its definition:
Break into smaller steps
Make changes
Say what you think will happen
Use something again