Spielerando

Lesson 5 of 16Test it before you build on it7 minFree

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

A pixel art beekeeper walks along a grassy ledge towards a gap. Past the edge a small bar above her hat runs down. In one pass she jumps while the bar still has some left and lands on the far ledge; in the next she presses too late and falls.

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.

Keys: ←→ walk Space jump

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

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.

  1. 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.
  2. Pick one number. For that sentence it is the extra moment. The others stay as they are.
  3. 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.
  4. 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.
  5. 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

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

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?

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

Next lesson How to Playtest: Watch Somebody Play and Say Nothing

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