Game Rig

Home/Blog/Difficulty curves

Difficulty curves that work

Two games here ramp difficulty in two shapes and a third refuses to ramp at all, and the numbers that separate them are constants in the source rather than impressions from a playtest.

Neon Snake takes six milliseconds off its tick interval every five pellets, from 155 ms down to a floor of 70. Written as a constant that reads like a straight line. In the unit a player can feel it is nothing of the sort: the snake gains 0.26 cells a second going from level one to level two, and 1.10 going from fourteen to fifteen, from steps of exactly the same size.

Speed is the reciprocal of an interval, so anything subtracted from the interval bends. Snake ramps inside a run and never stops; Drift Circuit holds three fixed standards and does not ramp at all. Both work, and the constants show what each one cost.

Subtracting from an interval is not a straight ramp in speed

Snake's whole difficulty setting is one expression, 0.155 - (level - 1) * 0.006, clamped at 0.07, with a level ending every five pellets. Every row below falls out of it.

Neon Snake: the tick interval, what it means in cells a second, and the size of each step
LevelTick intervalCells a secondGain since the level beforePellets eaten to arrive
1155 ms6.45—0
4137 ms7.30+0.3115
8113 ms8.85+0.4535
1289 ms11.24+0.8155
1571 ms14.09+1.1070
1670 ms14.29+0.2075

Read the fourth column against the second. Each level removes the same six milliseconds, and what that buys grows from a quarter of a cell a second to more than a whole one. The first five levels, twenty pellets of work, are worth 1.18 cells a second; levels eleven through fifteen are another twenty pellets and they are worth 3.56. Nobody chose a curve, and a curve is what shipped.

The bottom row is the floor doing something no author would pick. The clamp bites at level sixteen, so the last step delivers +0.20 cells a second instead of +1.10, and every level after it is a duplicate. Long runs finish on a plateau while the score attached to each pellet keeps climbing.

The field is 32 cells across, so the far wall is 4.96 seconds away at level one and 2.24 at level sixteen, both inside a single run.

The easy thing to get wrong is which quantity to scale. A proportional cut landing on the same 70 ms at level sixteen removes 5.16 percent a level: 155, 147, 139, 132 and 125 ms across the first five levels, against the 155, 149, 143, 137 and 131 the game uses. That version is harder through the middle and gentler at the end, and the two curves cross at level thirteen. Multiplying the interval by a constant and multiplying the speed by a constant are the same curve, so an exponential ramp is one shape described in two units; linear against proportional is the choice that actually differs.

Level five is a step, and a step is legible

The tick ramp is invisible while it happens, which is why the page prints the pellet value over the board and fills a speed bar beside it. The other change is a step and needs no explaining: no obstacles below level five, then one more per level up to four, so the board goes from still to moving between two consecutive pellets. Twenty pellets reach level five, thirty-five reach level eight, and the count stops there.

A step has an advantage a slope cannot match, which is that a player can point at it. A death just after the board started moving gets filed under a rule rather than under bad luck. In Maze mode the same boundary also discards the wall field and lays a fresh one, so one event carries three changes at once.

Drift Circuit does not ramp at all

Drift Circuit is a time trial with three circuits and a gold, silver and bronze time on each. Nothing about the car changes with progress because there is none to speak of: a lap is a lap, and the run begins and ends inside the same fixed rules. The difficulty is the circuit and the clock, both chosen before the player arrives.

The three circuits in Drift Circuit: road width against the three medal standards
CircuitRoad widthGoldSilverBronzeSilver divided by gold
Sunset Loop152 units37.0046.0057.001.24
Harbour Bend134 units40.0050.0062.001.25
Terminal Three118 units42.0052.0065.001.24

The medals read like scaled copies. Silver lands between 1.24 and 1.25 times gold on every circuit, and bronze is the same multiple over silver, so three standards are one judgement and two multiplications rather than six. That is a cheap guard against the commonest tuning mistake there is, where the middle standard sits so close to the top one that it stops meaning anything.

The step between circuits is smaller than the step inside them. Gold moves 37 to 40 to 42, an 8.1 percent rise and then a 5.0 percent rise, while the road narrows from 152 units to 134 and 118, close to 12 percent each time. A player holding a gold on Sunset Loop is already within a few seconds of one on Terminal Three.

Why a rising hazard puts the decision at the end of a run

The formal idea worth borrowing is that a difficulty curve is a hazard function: the chance of failing in the next second, given that the run has survived this far. Isaksen and Nealen model difficulty in exactly those terms, with Monte-Carlo simulation and survival analysis, and ask how a curve shifts as skill and learning rate change.

A flat hazard produces memoryless runs. If the chance of dying next second is the same at second five as at second five hundred, then run lengths follow an exponential distribution and past survival says nothing about future survival. Difficulty held perfectly constant is that case, which is an argument for Drift Circuit's fixed times rather than against them.

Snake is the other case. The hazard climbs with the speed, so a run at level fourteen is in more danger than it has ever been, and it is also collecting 75 points a pellet instead of 10. Risk and payoff peak together at the end, which is why the closing stretch of a good attempt decides whether there is another. That is reasoning from the constants rather than a measurement: the hazard claim follows from the interval falling and the board getting busier, and the reward claim is arithmetic on one line of the game.

That reward is far steeper than the difficulty paying for it. A pellet is worth 10 at level one and 85 at level sixteen while the count needed for the next level stays at five, so eight and a half times the payout arrives for roughly twice the speed — the same multiplication problem that points, combos and multipliers meets from the other direction.

Making the ramp visible is the cheapest fix available

None of this matters if the shape stays hidden. Snake prints the pellet value and the level over the board and draws a ten-segment speed bar, a real attempt at showing the curve rather than the run. It does not quite land: the bar fills to the level capped at ten, so it sits pinned at full from level ten onward while the interval keeps falling from 101 ms to 70. The last six levels are where a long run spends its time, and the indicator is flat across all of them.

More segments would not fix it. The fix is to plot the quantity being felt rather than the index driving it, on a bar spanning 6.45 to 14.29 cells a second with the current value marked. Where the tick itself is applied, and what happens when it drifts away from the display, is the subject of the fixed-timestep piece.

Pros

  • Every value in the ramp is a named constant, so the curve can be read out of the file instead of guessed at from play.
  • The level is the whole difficulty state, so there is no hidden adaptation to desynchronise or to explain.
  • One fixed curve makes scores comparable between two players and two sittings, which is what lets a best score mean anything.
  • A step can be pointed at by the player, so the death that follows it is filed under a rule rather than under luck.

Cons

  • One curve serves every player, so a strong one spends four levels waiting and a weak one never clears the first obstacle step.
  • The clamp at the top turns the last level into a duplicate, quietly removing the end of the ramp long runs are built on.
  • A ramp written in the wrong quantity bends without anyone choosing it, which is what a constant subtracted from an interval does.
  • Nothing recovers a bad opening: two early deaths leave a run permanently behind the pace a clean start would have set.

Sources