How to Tune a Game Mechanic: One Number at a Time

The demo is playing itself. Press a key or a button to take over.
The bar over her hat is the extra moment: 0.09 seconds after the edge in which a jump still counts. The blueprint's tested code decides every frame whether a press works.
Try it: Walk off the left ledge without jumping and press jump just after the edge. While the bar is there you still jump, and the star counts it. Wait until the bar is gone and the same press does nothing.
←→ walk Space jump
The numbers of a mechanic decide how it feels, and nobody gets them right on paper. You find them by trying: one number per try, twice and half before small steps, and a line in a log for each try with what changed in your hands. The jump in the game above has one number that matters most here, the extra moment after the ledge, and this lesson tunes it.
Also in this lesson 5 things to read up on 3 questions to check yourself
The idea
Once a mechanic holds up as a toy, its numbers are the next thing to decide. They are where a jump feels fair or stiff, and where a game ends up feeling like yours or like every other one. An AI can write any number you ask for. It cannot feel any of them. So the trying is yours, and the order of the tries decides whether you learn anything from them.
The rule of this lesson is short. Change one number, play, write down what changed, and only then change the next. If two numbers move in one try and the jump feels better, you do not know which one did it, and you cannot keep the good one and drop the other.
How it works
The game above is a jump with an extra moment: for 0.09 seconds after she walks off the ledge, a press still jumps. The bar over her hat is that moment running out. Three more numbers shape the same jump: she takes off at 12 units a second, gravity pulls at 32, and she never falls faster than 20. The game keeps all four fixed, so it is your measure of where you start. The tuning itself happens in your own game, or in a copy your AI builds.
Here is one round of tuning, in order.
- Say what should change, in one sentence. Not "make the jump better", but "late presses at a ledge feel eaten". That sentence picks the number for you.
- Pick one number. For that sentence it is the extra moment. The others stay as they are.
- Write down where you start. Play ten passes over the gap in the game above and press late on purpose. The box at the top left counts for you: the star is a jump that only worked because of the extra moment, the red cross a press that came too late. Write both counts down, with what your hands felt.
- Try twice and half. Make the moment twice as long, play the same ten passes, write a line. Then half as long, again ten passes and a line. Two values that far apart should feel different if this number matters at all. If even they feel the same, this is not the number you are looking for.
- Then go between. Once you know which side is better, try a value between the start and that side. Small steps come last, when you already know the direction.
Why only one number? Because the numbers hang together. Gravity decides how far she drops away from the ledge during the extra moment, so a change to gravity changes how the extra moment feels, though its own number did not move. If you change both in one try, you are feeling a mix.
The counts are a note, not a measurement of players. Ten passes by you tell you what you did, so that tomorrow you still know. Whether a change helps people who have never seen your game is a question for the next lesson, and, once you have many players, for a comparison of two versions.
What goes wrong
You tell your AI that the jump feels off. It answers with a better jump: a longer extra moment, a higher take-off, a little less gravity, a faster run, and a press remembered for a moment before landing. All five in one go. The jump does feel different, maybe better. A week later something about it feels floaty, and nobody knows which of the five to take back.
Some changes even hide each other. Raise the take-off and the gravity together, and the jump can end up as high as before, while she now drops away from the ledge faster during the extra moment. You feel that late jumps got worse, and the number for late jumps never changed.
You notice this shortcut in two places. When you ask what changed, the answer lists more than one number. And there is no log: nobody can say what the jump was like three tries ago. Ask your AI to keep the numbers in one place, to show you that file before and after each try, and to stop when more than one line changed.
Tell your AI
I want to tune one mechanic in my game: [name it].
What should change, in one sentence: [for example: late presses at a ledge feel eaten].
Before you change anything:
1. List every number this mechanic uses, each with a plain name, its value now, what it changes for the player, and where in the code it is. Move them into one place if they are spread out.
2. Tell me which one number speaks most directly to my sentence, and which other numbers also change how it feels. Those stay fixed.
Then, for that one number only:
3. Make three versions: as it is, half and twice. Let me switch between them with a key while I play, and show the value on screen.
4. After every change, run the mechanic's tests and show me their output. A new number must not break a rule.
5. Keep tuning-log.md with one line per try: the number, its value, and what I tell you I felt. Never write what I felt yourself.
6. Before each try, show me the numbers file before and after, so I can see that one line changed and nothing else.
Change no other number until I say so.
Try it
- In the game above, walk off the ledge without jumping and press as late as you dare, ten times. Write down the star and the cross. That is your starting line for 0.09 seconds, and you now know what the bar looks like when it runs out.
- Still above, jump from the ground and press again in the air. Nothing happens, at any length of the extra moment: that is a rule, not a number. If one of your tries ever lets her jump twice, the try broke the rule, and that is a bug to fix, not a feel to keep.
- In your own game, write one sentence about what should change, pick the one number, and play it as it is, at twice and at half. Three lines in a log, and you know which way to go.
Read up
Where to go deeper: the pages of ours this lesson builds on, and what others have written about its point.
The extra moment of this lesson as a whole blueprint: its four numbers with the range each may take, the edge cases such as a second jump, and the tested code.
Balance Your Game With AI: A Worked Example
For numbers you can work out before anyone plays: a target in one sentence, the sum behind a boss fight, and why one point of damage can decide it.
Once you have players: whether a changed number really moved a count such as wins, or whether luck alone could give that gap, and how many players it takes to tell.
A developer's own account of the numbers in his runner: acceleration that eases off as speed grows, a jump timer that depends on speed, gaps that grow with it, all found by trying numbers until it felt right.
A survey of research and developers' writing on how games feel, which sorts polish into tuning numbers, adding feedback and helping the player, with the moment after a ledge as its example of help.
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.
Your jump feels off. Your AI changes the take-off, the gravity and the extra moment after the ledge in one go, and the jump feels better. What do you not know now?
Next lesson How to Playtest: Watch Somebody Play and Say Nothing
How useful was this page?
Nobody has rated this page yet.