Sub topic 14
Balancing with Playtests and Telemetry
This chapter assumes you can read short Python samples. It also assumes you know the level curve (xp_to_next), unlock rules, and skill trees from earlier chapters, and that progression rules live in data files you can edit without changing code. Here you will learn how to find pacing problems with real players and how to change the numbers safely.
Why a curve on paper is only a guess
A formula such as base * growth ** (level - 1) tells you how much XP a level costs. It does not tell you how long a player takes to earn that XP. That depends on how fast players kill enemies, how often they quit a quest, and which activities they prefer. Two kinds of evidence close the gap:
- Playtests are sessions where real people play while you watch or record them. They tell you why something feels wrong.
- Telemetry is data the game sends automatically, such as "player reached level 7 at minute 94". It tells you how many players are affected and where.
Each covers what the other cannot. Telemetry shows that 30% of players quit at level 8 but not the reason. A playtest shows a player confused by a locked door but cannot tell you whether that confusion is common.
Set targets before you measure
Data only means something when you compare it with an intention. Before testing, write down targets for each system. Examples:
- Level 2 takes about 10 minutes. Each later level may take up to 1.5 times as long as the one before it.
- At least 70% of players who start the caves finish them.
- Every non-starting skill is chosen by between 15% and 90% of players who could take it.
These numbers are your design hypotheses. Without them, every result looks acceptable or every result looks alarming. Keep the targets next to the progression data so that tuning has a stated goal.
Running useful playtests
A playtest is cheap to run and easy to waste. Follow these practices:
- Test with the right players. Developers know the rules, so they skip the confusion new players hit. Use people who match your intended audience.
- Stay quiet. If you explain the unlock rules, you hide the problem. Note where the player hesitates, then ask afterward.
- Ask for prediction. Ask "what do you think you need to do next?" at gates and skill choices. Wrong predictions show unclear goals.
- Record time and mood. Note the moments of boredom ("I'm just grinding now") and of frustration ("why can't I enter?"). These map directly onto XP rates and unlock conditions.
- Change one thing between rounds when you can, so you know which change produced the effect.
Five to eight players per round is usually enough to find the most obvious problems. A small group will not give you reliable percentages. Use telemetry for those.
What to log
Log events, not summaries. An event records that something happened, who it happened to, and when. Useful progression events include:
| Event | Fields | Question it answers |
|---|---|---|
| `level_up` | player, new level, total minutes played | How long does each level take? |
| `gate_blocked` | player, content name, missing condition | Which requirement stops players? |
| `content_completed` | player, content name, minutes spent | Is content too short or too long? |
| `skill_learned` | player, skill, points left | Which skills are popular or ignored? |
| `respec` | player, skills refunded | Do players feel locked into mistakes? |
| `session_end` | player, level, last activity | Where do players leave? |
Always log the player's level and total playtime with each event. Without those fields you cannot compare players at the same point in the game.
Reading pacing from level-up events
The first analysis is time per level. The code below turns level_up events into the median minutes each level took, then flags any level that takes much longer than the one before it. It uses the median because a few players who leave the game open for hours would distort an average.
from statistics import median
# One record per level-up: (player_id, new_level, total_minutes_played)
events = [
("a", 2, 10), ("a", 3, 25), ("a", 4, 60), ("a", 5, 130),
("b", 2, 12), ("b", 3, 30), ("b", 4, 70),
("c", 2, 9), ("c", 3, 22), ("c", 4, 55), ("c", 5, 120), ("c", 6, 150),
]
def minutes_per_level(events):
"""Median minutes spent earning each level, keyed by the level reached."""
reached_by_player = {}
for pid, level, minutes in events:
reached_by_player.setdefault(pid, {})[level] = minutes
durations = {}
for reached in reached_by_player.values():
for level, minutes in reached.items():
# Level 1 is reached at minute 0.
previous = 0 if level == 2 else reached.get(level - 1)
if previous is not None:
durations.setdefault(level, []).append(minutes - previous)
return {level: median(values) for level, values in sorted(durations.items())}
def pacing_spikes(durations, max_ratio=1.5):
"""Levels that take more than max_ratio times as long as the previous level."""
levels = sorted(durations)
return [
level
for level in levels[1:]
if level - 1 in durations and durations[level] > max_ratio * durations[level - 1]
]
durations = minutes_per_level(events)
print(durations)
print(pacing_spikes(durations))The output is {2: 10, 3: 15, 4: 35, 5: 67.5, 6: 30} followed by [4, 5]. Levels 4 and 5 are the spikes. Level 6 is fast, but only one player reached it, so you should not trust it.
Reading drop-off
Time per level shows where progress slows. Drop-off shows where players leave. Count how many players reached each level, then look at the share that went on to the next one. A sudden drop at one level suggests a specific cause, such as a gate, a hard boss, or a long grind. A gradual decline across the whole game is normal, because not everyone finishes every game.
When you find a drop, look for the cause in this order:
- Did the level take much longer than its neighbors?
- Did many
gate_blockedevents happen just before players left? - Did a new mechanic, enemy, or screen appear there?
- Did the reward at that level feel smaller than the effort?
Reading skill tree data
For skills, compare pick rates. The pick rate is the number of players who learned a skill divided by the number who could have learned it.
SKILL_PLAYERS = 100
picked = {"slash": 98, "whirlwind": 71, "berserk": 12, "execute": 10}
def pick_rate_flags(picked, total_players, low=0.15, high=0.9):
"""Mark skills taken too rarely ('low') or by nearly everyone ('high')."""
flags = {}
for skill, count in picked.items():
rate = count / total_players
if rate < low:
flags[skill] = "low"
elif rate > high:
flags[skill] = "high"
return flags
print(pick_rate_flags(picked, SKILL_PLAYERS))The output is {'slash': 'high', 'berserk': 'low', 'execute': 'low'}. The flags need interpretation:
slashis the root skill that every other skill requires, so a high rate is expected. It is not a problem.berserkat 12% suggests that most players thinkwhirlwindis better. That is a choice that is not meaningful.executeat 10% is partly explained by its prerequisites. It needs bothwhirlwindandberserk, so it can never be more popular thanberserk. The low rate is a symptom of theberserkproblem and not a separate fault.
This is a common confound. A low pick rate can come from weak power, from an expensive cost, or from a prerequisite that few players take. Check the dependency structure before you buff the skill itself.
The tuning loop
Balancing is a repeated cycle, and each pass should be small.
Because your progression rules are data, step B is a change to a number such as growth, an XP reward, or a skill cost. This is the main payoff of the data-driven approach. You can test a new curve without rebuilding the game.
Good habits for this loop:
- Change one variable per round. If you alter
growth, XP rewards, and a skill cost together, you cannot tell which one fixed the problem. - Fix the cause, not the symptom. If level 5 is slow, check the XP sources before you simply lower the level 5 cost. A lower cost can leave level 6 just as slow.
- Keep a changelog. Record each value change with its date and reason. When the numbers shift later, you can trace why.
- Compare against a baseline. Keep telemetry from the old version so you can tell whether the change helped.
Edge cases and traps
- Survivorship bias. Players who quit early never appear in late-game data. A level that looks fine may only look fine because the frustrated players left earlier.
- Mixed player types. The median hides different groups. Fast players and casual players can both be unhappy while the median looks healthy. Split the data by playtime or by early-game behavior when you can.
- Metrics that become targets. If you only chase "time per level", you may make levels faster without making them more fun. Pair numbers with playtest observations.
- Exploits show up as outliers. A player who levels in a third of the median time may have found a grinding loop or a bug. Investigate it before you raise or lower the curve for everyone.
- Tuning for the current build only. New content changes the XP available per hour. Re-check the curve after each content update.
- Privacy. Log gameplay events keyed to an anonymous ID, not names or other personal data, and follow the rules for the regions where you ship.
Putting it together
A practical workflow for a new progression system:
- Write targets for time per level, content completion, and pick rates.
- Run a small playtest to catch obvious confusion at gates and skill choices.
- Ship the data to a larger test group with the events from the table logged.
- Run the analysis scripts, and look for spikes, drop-offs, and skewed pick rates.
- Use playtest notes to explain each anomaly, then change one value in the data.
- Repeat until results sit inside the targets, and re-check after every content update.
Exercise
Telemetry shows that the skill execute has a 10% pick rate, berserk has 12%, and execute requires both whirlwind and berserk. A teammate wants to raise the damage of execute right away. What should you check first, and why?
Show answer
Check the pick rate of its prerequisites first. Because execute requires berserk, its pick rate cannot exceed berserk's 12%, so the low rate is largely caused by the unpopular prerequisite and not by execute itself. Look at why players avoid berserk (weak effect, high cost, or a clearly better alternative in whirlwind) and fix that first. Then measure execute again among players who actually owned both prerequisites, since that is the group that could choose it.
Exercise
A level-up analysis of 4 players shows level 7 takes twice as long as level 6. Should you change the curve? Give two reasons for your answer.
Show answer
Not yet. First, 4 players is too small a sample for a reliable median, so the spike may be noise. Second, the data may be biased, since players who found level 6 or earlier levels frustrating may have already quit, and a few slow players can skew the result. Collect more data, compare against your written target ratio, and use a playtest to find a cause before you change the value.