Ibnovate Course 1 · The Young Builders
⏱ 60 minLive session

Session 17 — Levels & Challenge

Duration: 60 min · Format: live online

What you'll learn: by the end, you can use if/then decisions, detect collisions with the "touching" block, and give a game real win and lose conditions.

Soft skill focus — Resilience

Today you'll also grow Resilience. Building win and lose conditions means things break first — a runaway score, a message that never shows — and makers keep going until it works.

Try this: when your score explodes or your "You Win!" never appears, tell yourself "that's a bug every game-maker hits" — then try one fix at a time (add the respawn line, then re-test) instead of giving up or starting over.

Think about: What broke in your game today, and how did you keep going until you fixed it?

What you'll need


Hook

Think about these questions:

Here's the big idea: today your game learns to make decisions. It will check "is this touching that?" and then choose what to do — score, lose a life, win, or end.


Teach — If/then makes decisions

Here's how decisions work:

Build this in Scratch:

⚠ Watch for a runaway score: because the loop checks constantly, one touch can add hundreds of points. Fix it by adding, right after scoring, a reset — go to x: 0 y: 150 (send the apple back to the top) so it's no longer touching.

Quick question: the diamond slot needs a question that is true or false. Is "the apple" a good fit for it? What about "the apple is touching the basket"? (Answer: the second — it can be true or false.)


Teach — Touching, collisions, win & lose

The touching [ ]? block (Sensing) is how a game notices collisions — two things bumping into each other. It's the heart of catching, hitting, and dodging.

Picture the collision logic: if touching the wall, react; otherwise keep moving.

Diagram of collision logic: if a sprite is touching the wall it reacts, otherwise it keeps moving

Build this in Scratch:

Now try making it harder (levels):

Key idea: if/then + touching lets a game react — that's what turns moving sprites into a real, winnable, losable game.

Try it: to make the game harder, should the apple fall faster or slower? What block changes that? (Answer: faster; change the change y by number to a bigger negative.)


Activity

Now upgrade your catch game.

Build this, step by step:

  1. On the falling sprite: wrap the fall in foreverchange y by -5.
  2. Inside the loop, add if <touching [your catcher sprite]?> thenchange [Score] by 1, play sound [Pop], go to x: (pick random -200 to 200) y: 150.
  3. Add if <y < -150> thenchange [Lives] by -1go to x: (pick random -200 to 200) y: 150 (missed it — reset).
  4. Make sure Lives starts at 3 and Score starts at 0 on the green flag.
  5. Add a lose check: if <Lives = 0> thenbroadcast [game over]stop [all].
  6. Add a win check: if <Score = 10> thenbroadcast [you win]stop [all].
  7. Add a sprite that shows "Game Over!" on when I receive [game over] and "You Win!" on when I receive [you win].
  8. Test: catch apples to win, miss three to lose.

If something's not working, check:

Tip: change the win score or starting lives to tune how hard your game feels.


Check yourself

Try these — answers are after the arrow.

  1. What does an if/then block do? → It checks a true-or-false question; if it's true, it runs the blocks inside; if not, it skips them.
  2. Which block lets a game notice two sprites bumping into each other? → The touching [ ]? block (Sensing) — it detects a collision.
  3. How could you make a "You Win!" message appear when the score reaches 10?if <Score = 10> thenbroadcast [you win]; a sprite with when I receive [you win] says "You Win!".

Wrap-up


Tips & extra challenges

Vocabulary

Term Meaning
If/then A decision: if a question is true, do these blocks
Condition The true-or-false question inside an if/then
Touching A sensing block that detects a collision
Collision When two sprites bump into each other
Win / lose condition The rule that decides when the game is won or over

Resources

Practice set

Practise on your own. Answers are after the arrow.

  1. Make the score go up only when the falling sprite touches the catcher. → Inside a forever loop: if <touching [catcher]?> then change [Score] by 1.
  2. Stop one touch from scoring hundreds of points. → After scoring, move the sprite away so it isn't touching anymore: go to x: (pick random -200 to 200) y: 150.
  3. Take away a life when the sprite reaches the bottom of the screen.if <y < -150> then change [Lives] by -1 then reset its position to the top.
  4. End the game when lives reach 0.if <Lives = 0> then broadcast [game over]stop [all]; a sprite says "Game Over!" on when I receive [game over].
  5. Show "You Win!" when the score reaches 10.if <Score = 10> then broadcast [you win]stop [all]; a sprite says "You Win!".
  6. Make the game get harder as the player scores. → Store the fall speed in a Speed variable and change [Speed] by -1 every few points, so the sprite falls faster over time.

Going deeper (optional)

Common mistakes & fixes

If it's not working, check these common mix-ups:

What's next

Session 18 — Design & Showcase Your Game: you'll plan your own small game, build it using everything from this unit, playtest it with a partner, and present it to the class — the unit's build project.

Ibnovate · Build · Innovate
Type to search · Esc to close
Welcome back
Sign in to continue building.
Accounts are created by Ibnovate — ask your instructor for your login.
🔒