ALFTANET
← All guides

The score the generator says is impossible

Every score posted to my leaderboards has to pass one test: could anyone have scored that in the time they played? In Talon and Lobshot the answer isn't guessed. The test works it out from the level generator.

My games keep score on the server, and a browser can't simply post a number. My guide to leaderboard cheating covers the main defences: a signed session token that can be used once, a rate limit, and a check that the score is believable for the play time. This piece is about that last check.

A line, not a guess

Every game has a function that says the most a run of a given length can score. It is always a straight line: so many points per second, plus a fixed allowance. Bricklash allows 700 a second plus 5,000. Updraft allows 1.6 gaps a second plus 15. A score above the line is refused.

The hard part is the slope. Too low, and a great honest run is refused, which the player sees as a "Retry" that can never work. Too high, and the check refuses nothing. For most of my games I measured a bot and added a margin. For Talon and Lobshot the test derives the slope.

Talon: every cavern, best case

Talon is my five-button cave flyer. You fly a salvage tug into a cavern, take the core in its claw and carry it out before a meltdown clock runs out. Caverns are a pure function of their number, so cavern 12 is the same for everyone.

Talon: a small tug above a launch pad on a teal alien surface, with a dark shaft leading down into painted rock, a minimap in the corner and a hint line about the controls
Talon's first cavern, on a local copy: the launch pad, the shaft down and the minimap. Every cavern is the same for everyone, which makes it countable.

That makes them countable. For caverns 1 to 40, the test adds up the most each could ever pay: every crystal and survivor banked at the top bulk rate, every turret and drone shot, the core, and every clear bonus at its maximum. Then it works out the least time each could take: down and back up the route at 260 pixels a second (the autopilot averages about 120), plus a floor for every grab, kill and landing.

The worst cavern is number 37, at 854 points a second. No cavern can pay more than 41,651 in total. The server allows 1,100 a second plus 45,000. The test fails if the slope ever drops below 1.2 times the worst case, or the allowance below the richest cavern. For scale, the autopilot scores 21 points a second.

Why the multipliers stop

Scoring that grows forever can't have a ceiling. In Talon the core's value stops growing at cavern 15, and the multiplier on kills and bonuses at cavern 10. In Lobshot the wave multiplier stops at 10. Those caps aren't there for balance. They are there so the line can exist.

Lobshot: the fastest possible wave

Lobshot is turn-based artillery: you lob stones from a catapult over hills at enemy siege engines. The test adds up the most each wave can pay: every point of every enemy's armour scored, the most direct hits that armour allows, the kills, and the doubled bonus for a wave cleared untouched. Against that it sets the least time a wave can take: its intro, one settle and the pause after a clear, which no input can skip. That's 3.6 seconds.

Lobshot wave 5: a blue catapult on a grassy hill on the left, a tall rocky hill in the middle, an enemy siege engine and a stone keep with a catapult on its roof on the right, under painted castles and clouds
Wave 5 on a local copy. Every fifth wave ends at a stone keep with 240 armour, which raised the most a run can score.

The derived top rate is 6,449 points a second. The server allows 8,300 a second plus 15,000, which is 1.29 times the most any run could have scored at every point. A second check guards the other side: a bot with perfect aim reaches wave 9 and scores 166 points a second, and the line must stay under 60 times that, or it is decoration. It is 49.9 times.

When the scoring changes

On 25 November Lobshot got a keep every fifth wave: 240 armour against a machine's 100, and a wreck bonus three times as big. The keep went into the derived maximum, and the server line moved from 7,800 to 8,300 a second in the same change. A scoring change that forgets the line fails the test, so it can't reach the live game and refuse the first great run after an update.

The other games

Not every game can be counted like this, but each has a reason for its line. Updraft's gates are a fixed 264 pixels apart and its speed tops out at 292 pixels a second, so its limit follows from two numbers. Moonhaul's autopilot scores about 58 points a second, about eleven times under its line. Rockfall's bot measures its own rate, and the test keeps the margin between 1.5 and 60 times. Fluxline's test replays the course generator's own flight and checks the line against it.

What the line doesn't do

It won't stop a patient cheat who plays slowly and posts a high but possible score. The session token, its single use and the rate limit do most of that work. The line only has to refuse the absurd without ever refusing a real run. Since 24 November a refused score also says so on screen, instead of offering a Retry that would send the same token again.