PortuguêsPlay

Behind the scenes

The fairness rule for the walls

Hexapulso’s walls are drawn at random, and the run never stops speeding up. What stops the draw from building an impossible sequence? A calculation made for every row before it is born.

The problem with random walls

Picture a row with its gap at the top and, right behind it, another with its gap at the bottom. If the second comes glued to the first, no reflex will save you: the arrow takes a fixed time to go halfway round. A game that draws carelessly creates deaths that aren’t the player’s fault.

The worst-case calculation

Before placing a row in the arena, the game looks at the previous one and asks: what is the worst place the player could be?

  1. For each open side of the previous row (where the player may have gone through), the game measures how many sides away the nearest open side of the new row is.
  2. It keeps the largest of those numbers. That is the worst case: the player who went through the gap farthest from the next one.
  3. It works out how long the arrow takes to cross those sides, at the speed it has at that moment of the run.
  4. It adds a fixed slack: 0.13 s on Normal, 0.11 s on Hard and about 0.10 s on Insane and Freak.

The new row is born at a distance that gives at least that much time. If the difficulty’s regular interval is longer than that, the regular interval applies.

Rows of walls one after another in a run on Hard
The distance between two rows depends on how many sides separate the gaps.

The special cases

Items have a rule too

Sparks and power-ups only spawn in rows with more than one open side. In a single-gap row, the item would sit on the only way through and you couldn’t dodge it. That would make the achievements that ask you not to pick up sparks or power-ups a matter of luck. When this rule came in, the chance of an item appearing went up, so the total number of items per run stayed the same.

How this is tested

A calculation that is right on paper can be wrong in code. So there is a test bot that plays by itself: it looks at the next row and goes to the nearest open side, with no tricks. After every change to speed or patterns, the bot has to survive 150 seconds without crashing, on every difficulty. The 150 s aren’t arbitrary: that is the point where a run stops speeding up. If it crashes, the change isn’t released.

What the rule doesn’t promise

It guarantees there is always enough time to reach the gap, for someone who reacts right away. It doesn’t guarantee it is easy: the slack is about a tenth of a second, and the run gets 2.6 times faster from start to finish. And two Freak features aren’t about time but about reading correctly: inverted controls, which come with a 1 s warning, and white walls, where the way through is the opposite of the usual.