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 Arrow keys, A / D, or the touch buttons below the game. Catch the good item, dodge the bad one. Score enough points before you run out of lives.

Score: 0 Arrows / A·D ♥ ♥ ♥

💡 Click inside the game first — that gives it keyboard focus so the arrow keys move the player instead of scrolling the page.

Tune the Game (limited, on purpose)

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 — hit "Apply & Restart" above and watch the exact values change 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.

🛠️ 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. ↩️ Back to the Archetype Grid Return to What Makes a Game? to try another tiny-loop archetype or the design workshop.