Week 10 — Arrays & Crashy Bird
Focus Concept: Arrays (lists) and coordinated game behaviour
Mini-Project: Crashy Bird (built step-by-step)
Connections to STEAM Learning
- Computing: We used arrays to store multiple values and loops to update them efficiently.
- Maths: We explored indices, ordering, and the idea of checking when a number is a multiple of another by testing if the remainder is 0.
- Engineering & Technology: We built a cycling game engine where many objects update each cycle.
- Art & Design: Participants customised speed, timing patterns and visual effects.
This week we explored arrays, an essential programming idea that lets us store and organise many related values at once.
We began with small examples to understand how arrays work, then applied the concept in stages to build our own version of Crashy Bird, a scrolling obstacle game.
Objectives
- Understand what an array/list is and why it is useful.
- Select an item from a list using its index.
- Recognise how arrays help games manage multiple moving objects.
- Build a project using loops, movement and collision logic.
Success Criteria
- I can explain that an array holds many items in a single variable.
- I can describe what an index is.
- I can explain how games use arrays to track multiple obstacles.
- I can write a project where many elements update each cycle.
Key Vocabulary
- Array / List — a variable that stores many values in order.
- Element — one item inside a list.
- Index — the position of an element (starting from 0).
- Loop — repeats instructions, often once for each element.
- Collision — when two sprites share the same position.
- Random — chooses an unpredictable value.
- Remainder — what is left after dividing two numbers; used to check for multiples.
Part A — Exploring Arrays
We created simple lists of choices. Pressing a button picked a random index and showed the item stored in that position.
This helped participants understand:
- arrays store many values together
- each value has an index
- the program can use that index to select an item
Part B — Rock–Paper–Scissors with Arrays
We explored how arrays can also store images, not just words or numbers.
Shaking the micro:bit selected a random index and displayed the corresponding icon.
This also prepared us for Crashy Bird, where we later choose a random gap position in an obstacle row.
Part C — Crashy Bird (Build & Test)
We built a scrolling obstacle game using an array of obstacle sprites.
Steps:
- Create a bird sprite that moves up/down with buttons.
- Create an empty array to store obstacles.
- Use a loop to move every obstacle left each cycle.
- Every few cycles, spawn new obstacles with one random gap.
- Remove old obstacles that leave the screen.
- Detect collisions between the bird and any obstacle.
Maths Connection
We discussed how to check if a number is a multiple of another:
If remainder of (number ÷ divisor) = 0, the number is a multiple.
Participants used this to control how often new obstacles appeared.
Try These Mini-Challenges
- Create different timing patterns.
- Change game speed.
- Add score or sound effects.
Resources
- MakeCode Editor: Link
- Crashy Bird reference project: Link
- MakeCode Arrays Overview: Link
- Maker MakeCode — Arrays Reference: Link
- Arrays in micro:bit: Video
Equipment
- BBC micro:bits + USB cables
- Laptops / Chromebooks with internet
Safety & Setup Notes
- Test code frequently to catch early mistakes.
- Handle USB cables carefully.
- Encourage pair debugging (one reads, one tests).