Programs are built from sequence, selection, repetition and variables, and they only become good products when they are tested with the people who will use them.
We are learning to
- We are learning to use coordinates, loops, selection and variables to build an interactive program.
- We are learning to use random numbers and the mod operator to make a game that changes every time it is played.
- We are learning to plan tests, find and fix bugs, and check that a program does what it should.
- We are learning to improve a digital outcome using feedback from real users.
Success criteria: I can…
- I can control a sprite with the arrow keys and keep it on the stage using its x position.
- I can make a sprite fall from a random position at the top of the stage and start again when it reaches the bottom.
- I can use if, else and mod to decide whether a caught number scores a point or loses a life.
- I can use variables to keep track of the score, lives and the chosen times table, and reset them at the start.
- I can write a test plan with expected and actual results, including unusual cases, and fix the bugs I find.
- I can make at least two changes based on user feedback and explain why.
Week by week
12 lessons · 4 assessment points
- 1
Week 1
- DiagnosticLesson 1 skills check: students build a sprite that moves 10 steps when the space key is pressed and says its x position, and answer three questions on loops and if blocks. Note who has used variables and if, else before.
Lesson 1Play it, then pull it apart
Play a finished example of the catch game and identify its inputs, outputs, rules and variables.
- Play (10 minutes): students play the teacher's finished example game for five minutes.
- Pull it apart (15 minutes): in pairs, students list the inputs (arrow keys, typing the times table), the outputs (sprite movement, score and lives on screen, sounds), the rules and the things the game must remember (score, lives, table).
- Skills check (20 minutes): the Lesson 1 diagnostic.
- Set-up (5 minutes): students create and save a new project named with their initials and v1. The teacher emails the Year 4 teacher today to book Lessons 8 and 12.
Lesson 2Users and the brief
Find out what the Year 4 users need and write a brief and specifications for the game.
- Users (10 minutes): read the Year 4 teacher's answers to the class's questions: which tables the class is practising, how fast they read, how long a game should last, and whether they can type a number.
- Brief (15 minutes): students write a brief naming the users, the need (fun practice of times tables) and the context (played in class on a laptop).
- Specifications (20 minutes): at least five testable specifications, for example 'instructions are under 30 words', 'the player chooses a table from 2 to 10', 'a game lasts about two minutes', 'works with only the arrow keys and number keys'.
- Check (5 minutes): partners check that each specification can be tested.
- 2
Week 2
Lesson 3Coordinates and the catcher
Use x and y coordinates to place sprites and move the catcher with the arrow keys, keeping it on the stage.
- Coordinates puzzle (10 minutes): the stage is 480 by 360, from x = -240 to 240 and y = -180 to 180. Students say where a sprite ends up after go to x: -200 y: 150 (top left) and x: 0 y: 0 (centre).
- Model (10 minutes): compare when right arrow key pressed, change x by 10 with a forever loop containing if key right arrow pressed then change x by 10. Students notice the forever loop moves smoothly without the key-repeat pause.
- Build (25 minutes): students make the catcher start at x: 0 y: -150 and move left and right with the forever loop. They stop it leaving the stage: if x position > 220 then set x to 220, and the same for the left side.
- Save (5 minutes): save as v2.
Lesson 4Falling numbers
Make a number sprite fall from a random place at the top and start again when it reaches the bottom.
- Opener (5 minutes): show a game where the number always falls in the same place. Ask why it would get boring.
- Model (15 minutes): go to x: pick random -220 to 220, y: 170; set my number (a variable for this sprite only) to pick random 1 to 50; say my number; repeat until y position < -170: change y by -3. Wrap this in a forever loop so it starts again at the top.
- Build (25 minutes): students add a falling number sprite and test it. Students who finish add a second falling sprite by duplicating the first.
- Save (5 minutes): save as v3.
- 3
Week 3
- FormativeLesson 5 catch check: the teacher sets the table to 4 and checks that catching 12 adds a point and catching 13 loses a life. Students also work out 20 mod 6 and 18 mod 6 on paper (2 and 0) and explain which is a multiple of 6.
Lesson 5Catching and checking: mod and selection
Use if, else and the mod operator to decide whether a caught number scores or loses a life.
- Remainders warm-up (10 minutes): 24 ÷ 6 has remainder 0; 25 ÷ 6 has remainder 1. In Scratch, 24 mod 6 = 0 and 25 mod 6 = 1, so a number is a multiple of 6 when the number mod 6 is 0. Students work out 35 mod 5 (0) and 38 mod 5 (3).
- Model (10 minutes): create score and lives variables and a temporary table variable set to 4. In the falling sprite: if touching catcher then: if my number mod table = 0 then change score by 1, else change lives by -1; then send the sprite back to the top.
- Build (20 minutes): students add the catch check to each falling sprite.
- Catch check (10 minutes): the Lesson 5 formative.
Lesson 6Game state: start, choose and game over
Reset the variables at the start, let the player choose the times table, and end the game when lives run out.
- Bug hunt (10 minutes): run a version without resets twice. Students spot that the score carries over from the last game.
- Model (15 minutes): when green flag clicked: set score to 0, set lives to 3, ask 'Which times table do you want to practise?' and wait, set table to answer, broadcast start game. Falling sprites start when I receive start game. When lives = 0, broadcast game over, switch to a game over backdrop and stop all.
- Build (20 minutes): students add the start and game over sections.
- Save (5 minutes): save as v5.
- 4
Week 4
- FormativeLesson 8 user testing record: each student records what their Year 4 testers did, where they got stuck, and the feedback they gave, then lists the top three changes in order of importance.
Lesson 7Test plan and debugging
Write and run a test plan, including unusual cases, and fix the bugs found.
- Opener (5 minutes): a short story of a game that worked for its maker but broke when someone else played it.
- Test plan (15 minutes): students write a table with columns for the test, the input, the expected result and the actual result. Tests include usual cases (table 5, catch 15), boundary cases (catch 50 with table 5, number at the edge of the stage) and unexpected inputs (typing 0 or a word for the table).
- Test and fix (25 minutes): students run every test, record results and fix bugs. For the table input, they add a check: repeat until answer is from 2 to 10, ask again.
- Prepare (5 minutes): students write instructions for the Year 4 testers, under 30 words.
Lesson 8User testing with Year 4
Watch Year 4 students play the game, without helping, and record what happens.
- Briefing (5 minutes): watch, don't help; note where testers hesitate; ask open questions afterwards, such as 'What was confusing?' and 'What would make it more fun?'
- Testing (30 minutes): each Year 8 student has one or two Year 4 testers play the game and fills in the user testing record.
- Feedback (10 minutes): testers answer three questions on a smiley-face card: Was it fun? Was it easy to understand? Would you play it again?
- Thank you (5 minutes): the Year 8 class thanks the testers.
- 5
Week 5
Lesson 9Prioritise and fix
Decide which feedback to act on first and make the most important changes.
- Sort (15 minutes): students sort their feedback into must fix (breaks a specification or stops play), should fix (makes it clearly better) and could fix (nice to have).
- Fix (30 minutes): students make their must-fix changes first, testing each one, and record what they changed and why.
- Save (5 minutes): save as v6.
Lesson 10Difficulty and polish
Make the game get harder as the player scores and add an instructions screen.
- Demonstration (10 minutes): a speed variable starts at 3. Each falling sprite uses change y by (0 - speed). When score goes up by 5, speed changes by 1.
- Build (25 minutes): students add a speed variable and an instructions backdrop that shows before the game starts, using broadcasts to move from instructions to play.
- Retest (10 minutes): students rerun the test plan to check nothing they changed has broken an earlier feature.
- Save (5 minutes): save as v7.
- 6
Week 6
- SummativeFinal game and evaluation (Lessons 1 to 12): the Scratch project, the brief and specifications, the test plan with results, the user testing record, and a written evaluation (Lesson 12) that judges the game against each specification with evidence, explains two changes made from user feedback, and describes one bug and how it was fixed. Marked against the unit success criteria.
Lesson 11Code review and final testing
Review a partner's code for readability and run final tests against the specifications.
- Code review (20 minutes): partners check each other's code: are variables and messages named clearly, are there comments on the main scripts, is there leftover code that does nothing? Each gives two suggestions.
- Tidy (15 minutes): students act on the review, add comments and delete unused blocks.
- Final test (15 minutes): students test every specification and record the evidence for the evaluation.
Lesson 12Showcase and evaluation
Show the finished games to the Year 4 class and write the evaluation.
- Showcase (25 minutes): the Year 4 class plays the finished games. Year 8 students note whether the changes they made from the testing feedback worked.
- Evaluation (20 minutes): students judge the game against each specification with evidence, explain two changes made from feedback and describe one bug they fixed.
- Hand in (5 minutes): final project, test plan, user testing record and evaluation for the summative.
Cross-curricular links
- Mathematics and Statistics: multiples and remainders (the mod operator gives the remainder after division), and coordinates in all four quadrants on the Scratch stage.
- English: writing short, clear game instructions for younger readers and a written evaluation.
Resources
- Scratch on a device for each student, and the teacher's finished example game (Lesson 1)
- Skills check task and questions (Lesson 1)
- Questions for the Year 4 teacher and their answers (Lessons 1 and 2)
- Brief and specifications template (Lesson 2)
- Stage coordinates diagram with the corners labelled (Lesson 3)
- Remainders warm-up and catch check sheet (Lesson 5)
- Test plan template with columns for test, input, expected result and actual result (Lesson 7)
- User testing record and smiley-face feedback cards (Lesson 8)
- Must, should and could sorting table (Lesson 9)
- Code review checklist (Lesson 11)
- Evaluation template (Lesson 12)
- Bookings with the Year 4 teacher for Lessons 8 and 12