ALFTANET
← All guides

A course generated once, checked forever

Fluxline's course is the same for everybody. A program built it once, segment by segment, and threw away every stretch it couldn't prove you could fly. Then I committed the result.

Fluxline is a one-button game I built on 5 November 2026. A small glowing mote flies right on its own. One tap flips its charge between plus and minus. Charged nodes push it away or pull it in, and you steer it through gate after gate. That is the only control.

The rules in one file

Like charges repel and opposites attract. The pull follows an inverse square, works only up and down, and reaches 300 pixels either side of a node, fading to nothing at the edge. Touch a node's core, a gate or one of the rails at the top and bottom, and the run is over.

All of these rules live in one file. The game flies the mote with it, the course generator uses it to search for a way through, and the test replays those searches through the real game. With one copy, the three can't disagree.

Fluxline zone 3: a red plus mote with a trail on the left, a gate with a narrow gap, and two red plus nodes and one blue minus node beyond it, between a blue rail at the top and a red rail at the bottom
Zone 3, on a local copy flown by the test pilot: a + mote, a narrow gate, and three nodes waiting beyond it. The top rail is − and the bottom rail +.

Why the course is fixed

The leaderboard compares the same flight for everyone, so the course can't be random per player. It is 320 segments of 760 pixels, each ending in a gate, in 40 zones of eight. After the last segment it loops back to the middle. Zones get faster (240 to 400 pixels a second), the gaps narrower (210 to 124 pixels), and the nodes more numerous and stronger. From zone 3 some nodes swap charge every 130 pixels you fly. That's by distance, never by the clock, so a node is in the same state for everyone at the same spot.

Build a segment, then try to fly it

The generator builds the course one segment at a time. For each candidate it searches over flip timings with the real rules, deciding on a 0.1-second grid and keeping at most 300 paths at each decision. A human can flip at any instant, so a player always has every option the search had, and more.

A segment is kept only if the search gets through it from two kinds of start. The first is the chain: the exact state the previous segment's chosen path arrives in. Chained from the start, that is one complete flight through the whole course. The second is 18 more starting points spread across the previous gate: three heights, three vertical speeds and both charges. So if you came through the last gate a little off the planned line, you are never left in a segment with no way through. Every node sits at least 300 pixels from its segment's ends, so each segment can be checked on its own.

A segment that fails is rebuilt from a new seed. On my latest run the generator tried 497 candidates to keep 320, ran 7,048 searches and took 22 seconds.

What the generator found

The first version had no field on the rails. Between nodes the mote simply drifted, and you had no control at all. The generator measured how often a gate came down to how you happened to leave the one before. So the rails got a weak field of their own: the top rail is minus and the bottom plus. A plus mote always drifts up and a minus mote down, even with no node near. I tuned it with the generator's numbers, not by feel.

Checked forever

The course isn't generated when you load the game. It was generated once and committed as a file. Every test run builds it again and compares the result byte for byte with that file. Change one constant in the rules and the course no longer matches, so the test fails until the course is rewritten. A rule change can't quietly leave an unflyable stretch behind.

The test also feeds the generator's planned flips to the real game code. They fly all 320 segments without a crash. That proves the game flies by exactly the rules the course was checked with.

Scoring

One point per 10 pixels flown, 10 times the zone for each spark, 25 times the zone for each gate, and 25 times the zone again for a bullseye through the middle fifth of the gap. The multiplier stops at zone 10, which lets the server set a ceiling of 600 points a second plus 3,000. The test checks that the line is at least 1.2 times the most a run could score and under 60 times the replay's rate.

Updraft is my other one-tap flyer, where the fairness comes from a fixed flap arc instead. Gravity Dash was the first.