Week 5 — Loops & Our First Game

Focus Concept: Loops & Iteration
Mini-Project: Barrel Jumper (sprites, movement, collisions)

Connections to STEAM Learning

  • Computing: We will combine loops and collisions to create our first full game.
  • Maths: We will use ideas of timing and position to keep gameplay fair and balanced.
  • Art & Design: We will choose and design sprites that emphasise contrast and readability.
  • Engineering: We will carry out quick play-test cycles and fix bugs based on what we observe.

Objectives

  • Understand how loops repeat instructions automatically.
  • Compare loop types: repeat, for, while, and forever.
  • Use timing (pauses / millis) to control speed in loops.
  • Build a simple game with sprites that move and interact.

Success Criteria

  • I can explain what a loop and an iteration are.
  • I can choose the right loop for a task (fixed repeats, ranges, or until a condition).
  • I can use timing to make animations/gameplay smoother or harder.
  • I can make a game where sprites move, collide, and update a score.

Key Vocabulary

  • Loop — instructions that repeat automatically.
    • repeat / for: run a fixed number of times or across a range.
    • while: keep running while a condition is true.
    • forever: never stops (the “game loop”).
  • Iteration — one pass through a loop.
  • Timer / millis — the micro:bit’s clock in milliseconds (1000 ms = 1 s); useful for timing within loops.
  • Variable — a named box that stores changing values (e.g., score, speed, x, y).
  • Sprite — a sprite is a two-dimensional graphic object or image that can move freely in a digital environment. Sprites typically consist of pixel images and are used to represent characters, objects, backgrounds, and visual effects in video games and other interactive applications.
  • Collision detection — checking if two sprites touch.
  • Game loop — a loop that continually updates movement, checks collisions, and redraws.

Resources

  • MakeCode Editor: makecode.microbit.org
  • PRIMM Loop Demo (Week 5): Makecode Code
  • Introduction to Computing with micro:bit: Loops: Video
  • MakeCode Game reference (sprites, collisions): Reference
  • Loops in MakeCode (overview): Reference
  • Game Development for Noobs - Beginner Guide: Video
  • Learning to Code is Not Just for Coders - TEDx Talk by Ali Partov (founder of Code.org): Video
  • How curiosity paved the way to self-learning - TEDx Talk by Ray Wu: Video

Equipment

  • BBC micro:bits + USB cables
  • Chromebooks with internet access
  • Optional: headphones/speaker for sound effects

Safety & Setup Notes

  • Keep USB leads tidy and handle gently.
  • If adding sound effects, keep volume classroom-friendly.