Seven-Second Sectors: How TUNL Paces a Run

A difficulty curve tells you how hard the game is at any moment. It does not tell you what the run feels like. This is the story of replacing a pile of independent curves with a plan, and measuring whether it worked.

Devlog · 20 September 2026 · all posts

For the first dozen versions, TUNL's difficulty was a set of separate curves. Stalactite spacing had a curve, mine spacing had a curve, coin spacing had a curve, and each one was a function of how far into the cave you were. Each curve made sense on its own. Together they produced a run that felt lumpy, and when I finally measured it, the numbers said the same thing the feel did.

What the audit found

I replayed the real spawners and the real physics with bots at four skill levels, a hundred runs each, across 24 different daily seeds. Then I looked at when new things happened and where the bots died. Four problems stood out:

The idea: a run is a sequence of sectors

Instead of separate curves, I wrote a plan. A run is a sequence of sectors, each seven seconds long at a fixed reference speed. Sector 0 is the safe opening flight. Each sector after that either introduces exactly one new thing or turns up something you already know. A "SECTOR n" notice appears at each boundary from the third onward, so a player can feel the structure.

The length is measured in seconds, not pixels, on purpose. The cave keeps accelerating, so a fixed number of world-pixels is less and less time as a run goes on. A sector defined in pixels would keep getting shorter. Defined in reference seconds, and converted back to world position by integrating the reference speed trend, a sector boundary is still a pure function of position. That matters because the whole game has to stay identical for every player: I wrote about why in the daily cave post.

SectorScoreWhat is new
00 - 50Open corridor. Gold and hourglass coins.
150 - 110First stalactites, shield coin
2110 - 180Ammo, magnet
3180 - 250First mine (alone, centred), bomb coin
4250 - 330Boulders
5330 - 410Chicanes, faded in
6410 - 490Cannons
7490 - 580Falling stalactites
8580 - 680Poison coin
9680 - 770Drain coin
10+770 and upNothing new. The rates keep growing.

Two rules decide the order. Tools come before the threat they answer. The shield coin shows up a sector before the first mine, so a player has one to spend. And the tools cannot come too late, because the daily missions ("collect five ammo", "grab two magnets", "use three bombs") are cumulative for the day and have to stay reachable for casual players, whose runs end around the second or third sector. Before I moved any coin gate, I checked the mission list.

Densities are rates, not spacings

Inside a sector, the density of a hazard is a rate per reference second: stalactite slots at two per second in sector 1, growing 14% per sector, and easing to 8% per sector from sector 8 onward. Mines start at 0.28 a second in sector 3, growing 20% per sector and then 10%. The spacing in pixels is derived from the rate, and it keeps a hard floor, so the rates can grow without limit and every run still ends. The mine is what guarantees that, because a mine can sit anywhere across the corridor, so no amount of corridor width makes a fast enough cave survivable.

Each sector is also a sawtooth. Its first fifth runs at 55% of its target density, with extra coin candidates as the payout, and then it ramps from 80% up to 115% toward the next boundary. So the player gets a breather at the start of every sector, then rising pressure, then a new idea. A steady climb is exhausting. A climb with rests is something people call fair.

Tune by measured rate, never by the spacing number. Placement rules veto objects that would land somewhere unfair, and the fraction they veto changes with density. Halving a spacing value does not double the hazards, and the coupling is exactly how the mine count tripled the first time. So every tuning pass ends with a replay that counts the objects actually placed per real second.

Hull scratches: forgiving the wall, not the spike

The second big change was for the beginners who died at the first wall. A ship now has two hull scratches. A wall contact spends one, bounces the ship back inside and says "SCRAPE!". With none left, the next contact ends the run.

They started as a temporary aid that expired in sector 3. Once every run began by flying into the tunnel mouth with lethal walls from the very start, it made sense for them to last the whole run, and they do. The grace period after a scratch protects against the wall only. Stalactites, mines, boulders and shots stay lethal, and the ship does not blink. If the grace covered everything, a good player could scrape a wall on purpose to fly through a stalactite field, so the rule is that scratches forgive wall mistakes and direct hits are the shield's job.

I also tried the obvious alternative, a free shield at the same moment. It mostly helped the strong tier, who used it to survive a stalactite later, and lifted their median run by about 72%. It rewarded skill that did not need the help, and I dropped it.

Did it work?

The same bots, on the same seeds, before and after. "Average" is the tier whose behaviour matched real players best in the previous version.

Bot tierMedian scoreReaches 100Dies within 8 points of walls turning lethal
Beginner65 → 954% → 39%41% → 3%
Average107 → 15532% → 70%16% → 2%
Good205 → 40180% → 91%1% → 1%
Expert715 → 928100%0%

The average tier's death rate per sector became a ramp (38%, then 60%, then 68% in the first three hazard sectors) instead of a cliff. That is the shape I wanted: a run should end gradually more likely, not suddenly certain.

What it did not fix

Experts still hit a reaction-time wall around sectors 10 and 11, where 63% and then 77% of expert runs end. Before the plan it was 100% at sectors 7 and 8, so that is a real improvement, but it is not the smooth ramp the earlier sectors have. I tried two obvious fixes: a slower growth of stalactite length and a slower ramp of chicane probability. Both measured as no-ops. The lever that is left is the speed itself, and I have left it alone, because the speed never plateaus on purpose, and a cave that stops getting faster is a cave that has stopped asking anything new of a very good player.

What I would keep

Two habits. First, plan the sequence of what a player meets, not just how hard each thing is: one new idea at a time reads as a game teaching you, while five at once reads as a game piling on. Second, never trust a difficulty change until a simulation has told you where each kind of player dies. Both of the biggest surprises here, the mine count and the first-wall deaths, were invisible from playing and obvious from a table.

You can read the player-facing version of the same plan in the how-to-play guide.

Play today's cave