Spielerando

Lesson 7 of 16Build the game around it7 minFree

From Toy to Game: A Goal and Something in the Way

A pixel art beekeeper dives into a lake for honey jars lying on its sandy bed. Ten bubbles at the top are her breath: under water they pop one after another, turn orange at the last quarter, and when none are left she loses a heart each second. She swims up, and the bubbles come back quickly in the air.

Under water the breath drains 5 a second after half a second of grace; at a quarter left the warning starts. At zero a hit of 10 lands every full second. In the air it comes back at 50 a second, and only her head counts, not her feet.

Try it: Wade into the shallows on the left: your feet are wet, the bubbles stay. Bob your head under for a moment and up again: still nothing, that is the grace. Stay down past the orange bubbles and count: one heart a second, and the first only a full second after the last bubble.

Keys: ←→ swim, wade ↓ dive ↑ swim up

This little game runs this blueprint's tested code in your browser. Nothing you press is sent anywhere. Its code on GitHub.

The game above is the playable demo of our blueprint Oxygen Meter. It runs that blueprint's tested code in your browser.

A mechanic that is good to press is still a toy. It turns into a game when there is something to reach and something in the way, and the mechanic is the only way through. In the game above the jars lie on the bed of a lake, the way to them is a dive, and the dive is paid for in breath.

Also in this lesson 4 things to read up on 3 questions to check yourself

The idea

After the toy test, your mechanic is worth pressing. Now it needs a reason. The quick answer is a number in the corner. A number counts, but counting is not a goal. A goal is something the player can see and try to reach. Resistance is what can stop her on the way. And your mechanic has to stand between the two, so that reaching the goal means using the mechanic well.

Greg Costikyan's essay in the reading list says the second half in one line: "Whatever goals you set players in a game, you must make them work to achieve their goals." The work should be your mechanic. If the work is something else, you have started a different game, and your mechanic is left on the side.

How it works

Play the game above in three parts.

The toy. Wade into the shallows on the left. Your feet are wet, your head is in the air, and the bubbles stay, because only her head counts. You can move around as long as you like. There is nothing to reach and nothing in the way.

The goal. Out over the deep water, honey jars lie on the sandy bed. The only way to them is down: her head goes under, and after half a second of grace the breath drains 5 a second. The goal asks for the mechanic.

The resistance. The breath is what can stop her. At a quarter left the bubbles turn orange. When none are left she loses a heart every second, and when the hearts are gone she faints and the count of jars starts again from nothing. That is what makes the count mean something: the resistance can take it away. Back in the air the breath comes back at 50 a second, ten times as fast as it drains, so every dive starts fresh and is a new decision: how far do I go before I turn back?

Now say your own game in one sentence of the same form. For the lake it is: to reach the jars, she has to dive, and her breath is what can stop her. Then test the sentence three ways.

  1. Take the goal away. Is there still a reason to use the mechanic? Without the jars there is no reason to dive.
  2. Take the resistance away. Does reaching the goal still need a decision? With endless breath the jars are a walk along the bottom.
  3. Look for a way round. Can the goal be reached without the mechanic? A jar in the shallows would be picked up wading, and never ask for a dive.

One more thing to look at. In the game above, a straight dive reaches all four jars with most of the bubbles still there. The breath can stop her, but where the jars lie now, it stops only a player who stays down too long. A resistance that never bites is not doing its job yet. Whether it bites depends on where the goal lies and on the numbers, and those you change one at a time.

These checks tell you that the parts of a game are there. Whether it is fun, they cannot tell you. That takes players.

What goes wrong

Ask an AI to make it a game and say nothing more, and the quick answer is a score bolted on: a point for every second under water, a coin counter, a high score table, a timer for the whole level. Each one is a number that goes up. None of them asks anything of the breath. A point per second under water even pays her for staying down, whatever she does there.

The same happens with resistance. Asked for danger, an AI adds a fish that bites. Now the danger is the fish, not the breath, and you have started a second mechanic before the first one is a game. A danger can be good, but it has to press on the mechanic: a fish that blocks the short way to a jar makes the dive longer, and the longer dive costs breath.

You notice the shortcut with two questions. For every number on the screen: which decision of the player moves it, and what can take it away? For the jar count above, diving to a jar moves it, and drowning takes it away. If the answer is "time" or "nothing", the number is bolted on. And for every danger: does it make the mechanic harder, or does it take its place?

Tell your AI

My game has one mechanic that is good to use: [name it]. I want to make it a game: something to reach and something in the way, with this mechanic as the only way through.

Before you build anything, write down and show me:
1. The goal: what the player can see and try to reach, and where it is.
2. The resistance: what can stop her, made of this mechanic's own limit, not of a new system.
3. One sentence in this form: "To reach ..., the player has to ..., and ... is what can stop her."
4. Three checks, each answered yes or no with the reason: Without the goal, is there a reason to use the mechanic? Without the resistance, does reaching the goal still need a decision? Is there any way to the goal that skips the mechanic?

Add no score, timer or counter that does not count the goal, and for every counter say what can take it away.

When I agree, build it. Write one test for every way to reach the goal and every way to fail, run them and show me their output.

Try it

Read up

Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.

Check yourself: three questions

Each answer is checked and explained at once. The questions are part of the quiz, so they count for your Game Coder IQ like any other.

Question 1 of 3Easy

You have a diving mechanic with a breath that runs out under water. Which of these turns it into a game, in the sense of this lesson?

All questions of this course · The quiz and the Game Coder IQ

Next lesson Core Loop in Game Design: The Round a Player Repeats

How useful was this page?

Nobody has rated this page yet.

One click, no account. It tells us which pages to make better next.

Last updated: 2026-11-27