Game Design & Development · Tiny-Loop Tutorial · Archetype #1

Tutorial: Catch Game

Movement Spawning Collision Score & Lives Pre-built Sprites

This is the exact Catch Game archetype from What Makes a Game? — already built and running below. Play it, then swap the pre-built sprites, colors, and difficulty using the panel underneath. You can't break the loop itself; that part is locked. Once you've tuned a version you like, you'll build this same architecture two more times: with Scratch's blocks, then from real scratch in JavaScript.

🗺️ The Architecture

Every tiny-loop game starts as a concept, then gets broken into a core loop, a systems list, and a structure — before anyone touches sprites or colors. Here's the Catch Game's architecture:

🌱ConceptMove to catch the good things falling from the sky, avoid the bad ones.
→
🔁Core LoopMove → item falls → touch it → score or life changes → repeat.
→
🧩SystemsPlayer movement, item spawner, collision check, score/lives tracker.
→
🏁Win/LoseReach the score goal to win, run out of lives to lose.

The four systems, in order of execution every frame:

  1. Input system — reads which arrow key is held and moves the player rectangle left/right.
  2. Spawner system — every ~1 second, drops a new item (good or bad) at a random x position at the top.
  3. Physics system — every falling item's y position increases each frame (gravity).
  4. Collision system — checks every item against the player's box (AABB); good touch → +1 score, bad touch or missed floor → −1 life.

🎮 Play & Customize

Move with ← / → or A / D, point with the mouse, drag on a touchscreen, or use the touch buttons. Catch the good item, dodge the bad one. Score enough points before you run out of lives.

Score: 0 ♥ ♥ ♥

Keys only work while the game has focus. Press P or Esc to pause.

Tune the Game (limited, on purpose)

Content settings change how it looks and apply instantly. Rule settings change how it plays, so the round restarts.

Notice what you can't change here: there's no field for "how collision works" or "how items spawn." That's the engine — the part every version of this game shares. You're only tuning content, not rewriting architecture. That's the limit, on purpose.

What the two sliders actually touch in the engine: Fall Speed is added to every item's y-position each frame — and it also shortens the spawn timer (max(70 − speed×8, 25)), so faster items also arrive more often. Score to Win only moves the number the locked win-check compares your score against. Same engine code, different numbers in.

👀 Peek at the Code

The game running above is this code — nothing hidden. It's split into two parts on purpose: a small config object you just edited with the panel, and a locked engine that reads it.

✏️ Config — this is what the panel above edits
const config = {
  player: '🤖',
  good:   '⭐',
  bad:    '💣',
  bg:     'space',
  speed:  3,
  winScore: 10,
  startLives: 3
};

👆 This block updates live. Change anything in the panel and the matching value flashes here. There's no separate "demo" version of the code; this is it.

🔒 Engine — locked, shared by every version of this game
function update() {
  // 1. move the player from held keys
  if (keys.left)  player.x -= 5;
  if (keys.right) player.x += 5;

  // 2. spawn a new item on a timer
  if (timeSinceSpawn() > spawnRate) spawnItem();

  // 3. move every falling item down
  items.forEach(i => i.y += config.speed);

  // 4. check collisions, update score/lives
  items.forEach(i => {
    if (collides(player, i)) {
      i.type === 'good' ? score++ : lives--;
      i.remove = true;
    }
  });
}
This is what "architecture" means in practice: the config is the part of the design doc you filled out in Lesson 1 (goal, mechanic, feedback). The engine is the part no one writes twice — it's the same four systems for every Catch Game anyone ever builds, yours included.

🧪 Remix Challenges

The panel can only turn the knobs the engine exposes. To change the rules, you change the engine. Each challenge edits one system. Try them in your own copy once you've built it in Lesson 2.

TweakSpeed rampMovement system · one line

Right now the game is exactly as hard at 9 points as at 0. Make items fall faster as your score climbs, so the game gets harder as you get better.

items.forEach(i => i.y += config.speed + score * 0.2);
TwistA rare power-upSpawn + collision systems

Add a third item type: a ❤️ that shows up 5% of the time and gives back a life. You'll touch two systems: spawning picks the type, and collision decides what it does.

const roll = Math.random();
const type = roll < 0.05 ? 'heart' : roll < 0.65 ? 'good' : 'bad';
// …then in the collision check:
if (i.type === 'heart') lives = Math.min(lives + 1, 5);
TransformTurn it into a Dodging gameArchetype #2, from the same engine

Spawn only bad items and make the score the number of seconds you've survived. The player, spawning, and falling systems don't change at all. Only the scoring rule does. That's the Dodging game you build from scratch in Lesson 2: Catch with a different win condition.

🛠️ Now Build It For Real

You've played a working Catch Game and seen exactly how it's built. Next, build this same architecture yourself — twice, in two different tools.

🧩 Step 1 — Build It in Scratch

The "Build the Loop with Blocks" section above already shows the exact scripts — backdrop, sprites, costumes, variables, and all three scripts, block by block, in Scratch's own category colors. Open a Scratch tab side-by-side and copy each script exactly; the game should come to life the same way it does here.

Open a blank Scratch project tab →

Want more practice first? Scratch's official Chase Game tutorial covers similar ground with its own built-in guided steps.

Open the official Scratch Chase Game tutorial →
⚡ Step 2 — Code It From Real Scratch (Lesson 2) Write this same game loop, spawner, and collision system yourself in plain JavaScript and HTML5 Canvas — no engine, no blocks.