Spielerando

Lesson 1 of 16Find a mechanic6 minFree

What a Game Mechanic Is: A Press, a Rule and an Answer

A pixel art beekeeper stands on a high stone ledge at dusk. She dashes across a gap to a second ledge in a flat line, leaving a faint trail, then dashes off the end of that ledge and falls a long way to a meadow below. A single square at the top goes dark when her dash is used and lights again when she lands.

A dash goes 18 units a second for 0.18 seconds, so it always covers the same distance, and she does not fall while it lasts. After it she waits 0.4 seconds, and in the air she has 1 dash until she touches the ground again.

Try it: Walk off the first ledge and dash right away while falling: she flies level and makes it. Dash, then press again at once: the red cross shows the press did nothing. Dash off the second ledge and press while you fall: the square is dark and nothing happens until you land.

Keys: ←→ walk, aim X dash

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 Dash. It runs that blueprint's tested code in your browser.

A game mechanic has three parts: something the player does, a rule that decides what happens, and an answer the player can see. If one of the three is missing, there is nothing to build yet, and an AI that is asked for it anyway fills the gap with whatever is most common. This lesson takes one mechanic apart, the dash in the game above, and then you write yours down in three lines.

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

The idea

Most game ideas start as a picture in the head: a beekeeper in the mountains, a platformer in pixel art, a sad story about a lost hive. A theme, a genre and a story are not mechanics. They say what a game is about and what it resembles. None of them says what the player presses and what happens then.

A mechanic says exactly that, in three parts:

Play the game above for a minute before you read on. It is one mechanic and nothing else. There is no goal, no enemy and no score, and still there is something to find out with your hands.

How it works

Here is the dash above, taken apart.

The press. One button. The direction is the one she faces when you press, and it cannot be changed while she dashes. That is all the player chooses: when, and which way.

The rule. A dash lasts 0.18 seconds, and while it lasts she does not fall. After it she waits 0.4 seconds before the next one may start. In the air she has 1 dash until she touches the ground again. A press during a dash or during the wait is ignored, not kept for later.

The answer. She flies in a flat line and leaves a faint trail. The square at the top goes dark when the dash is used and lights again when she lands. And when you press too early, a red cross shows that the press did nothing.

Look at the last one again. Every press gets an answer, also the one that is refused. Without the cross the rule would be just as right, and the game would feel broken: you press, nothing happens, and you cannot tell whether that was the rule or a bug.

So here is the check for anything you call a mechanic. What do I press? What decides? How do I see it? If you cannot answer one of the three in a sentence, it is not a mechanic yet. It is a wish, and wishes are what an AI fills with averages.

What goes wrong

The usual first message is something like: make me a platformer about a beekeeper with a cool dash. The AI builds a dash, and it works. But how long does it last? Does it work in the air, and how often? Does a press during the wait count later, or not at all? You did not say, so the AI decided silently, with the most common values it knows.

Each of those was a decision about how your game feels, and you were not in the room for any of them. That is how a game ends up like every other one: not through one bad choice, but through a dozen choices nobody made.

The part an AI leaves out most often is the third. It builds the press and the rule, because a test can check them, and gives the refused press no answer at all. Try it in the game above: dash, and press again at once. Now picture the same moment without the red cross and without the dark square. Nothing in the rule changed, and the dash feels unreliable.

You can catch both before any code exists. Ask your AI to write the three parts down first, and to list every decision in them that you did not make.

Tell your AI

I want to add one mechanic to my game: [name it in two or three words].

Before you write any code, write the mechanic down in three parts and show them to me:
1. The press: what the player does, with which button or gesture, and what they choose in that moment.
2. The rule: what happens then, in plain sentences. Include how long it lasts, how often it can be used, what gives it back, and what happens to a press that comes too early.
3. The answer: what the player sees or hears in every case, also when a press is refused.

Then list every decision in those three parts that I did not make myself, each with the value you would pick and one other value worth trying. Wait for my choices.

After that, draw the mechanic as states and moves, write one test for every move, build it, run the tests and show me their output. Do not add anything I did not ask for.

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

A friend tells you four ideas for a game. Only one says what the player presses and what happens then. Which one?

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

Next lesson Game Mechanic Ideas: Four Places Where Mechanics Come From

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