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

The demo is playing itself. Press a key or a button to take over.
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.
←→ walk, aim X dash
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:
- The press: what the player does, and what they choose in that moment.
- The rule: what decides what happens. How far, how long, how often, and what gives it back.
- The answer: what the player sees or hears, so they know what the rule decided.
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
- In the game above, dash and press again at once. The red cross is the answer to a refused press. Count how often you would have thought "it did not react" without it.
- Walk off the first ledge and dash while you fall. She flies level: that is the rule "she does not fall while it lasts", felt with your hands instead of read.
- Take the game you want to make and write its main mechanic in three lines: the press, the rule, the answer. If a line stays empty, or says "somehow", you have found the next thing to decide.
Read up
Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.
What Is a Core Game Mechanic? A Plain Explanation
Where the word comes from, how a mechanic differs from a rule and from a system, and how to find the one mechanic your game is built around.
The dash of this lesson as a whole blueprint: its states and moves, the edge cases a first try forgets, and the tested code your AI can build from.
MDA: A Formal Approach to Game Design and Game Research
A short paper that separates what you build from what happens in play and from what the player feels, and says why a designer and a player meet the same game from opposite ends.
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.
A friend tells you four ideas for a game. Only one says what the player presses and what happens then. Which one?
Next lesson Game Mechanic Ideas: Four Places Where Mechanics Come From
How useful was this page?
Nobody has rated this page yet.