Which way is front?

No. 06

Every printer needs a clear tile in front of it. Until this week "front" was the same fixed direction for every machine in the shop, which made clearance a tax you paid rather than a space you could plan.

The request was one sentence: make the printers behave like physical objects.

That sounds like an art note. It turned out to be a simulation change, a save-format decision, and a long afternoon spent on where the light falls.

The rule that was already there

Clearance shipped yesterday. Every printer needs one empty tile in front of it, for the same reason a real machine does — you have to open it and reach into it, and a machine you have shoved against three neighbours is a machine you cannot work on.

Good rule. One problem: "front" was a fixed convention. It was always the row nearest the camera, for every machine in the game, because nothing in the model had ever carried a direction. Not the printers, not the benches. Not even your own character.

So every machine faced the same way, and their clear tiles could never be shared. Two printers side by side each carved out a private empty strip in front of themselves. You could not point them at a common aisle, because there was no pointing.

That makes clearance a tax: you pay a tile per machine and get nothing back for arranging them well. Rotation is the difference between that and a layout puzzle — turn a row of machines to face one corridor and the empty space starts doing two jobs at once.

The save version we deliberately did not bump

The specification for this change said to bump the save format version and add a documented no-op rung to the migration ladder. We didn't, and the reasoning is worth writing down.

facing is an optional field, and its absence already means the one direction every machine used to have. An old save is therefore already a valid new save — nothing about its shape changed, so there is nothing for the ladder to carry. A version rung that exists only to announce that nothing happened is noise, and the next person to read that ladder has to spend attention ruling it out.

The evidence that the default really is the old behaviour, rather than something we asserted: all 252 existing tests passed unmodified. Not adjusted, not re-recorded. If a later change ever makes facing required, that is the change that earns the bump — and it is written down where the decision lives, so nobody has to rediscover the reasoning.

The light was the hard part

The art has a rule we call the value-band law: the key light is fixed to the top-left of the screen, and floors, outlines, machine bodies and accents each occupy a locked brightness range. Machines read light-against-dark by construction rather than by somebody's judgement on the day.

Here is what that collides with. When you draw a box in this projection, only two of its side faces are ever visible: the two that meet the corner nearest the camera. The old code found them with a hardcoded corner index, which was correct for a slightly embarrassing reason — every call site happened to build its rectangle the same way round, so the nearest corner was always the same index.

Turn the box and that stops being true. The four corners move, but their cyclic order survives: it is still a rectangle walked round in sequence. So the visible pair is still "whichever two meet the nearest corner" — that corner is just no longer the index it used to be.

The four cases got worked through by hand before any code was written. Then, deliberately, they were not implemented as the formula that derivation produced. The code instead takes an argmax over the points it has already projected to the screen.

Those two are the same arithmetic when they are right, and they fail completely differently. A sign error in the formula draws a face on the object's far side — where nobody can see it, because it is facing away. The same sign error in the argmax version gives you a visibly wrongly-lit box, immediately, on the first frame.

That is this project's house rule pointed at geometry. When two correct-looking implementations are available, take the one whose failure mode is loud.

The same relabelling feeds the top face's shading and the corners the box hands back, so a decoration authored against the front — the enclosed machine's door, the insulation bands up the side of the tall one — follows the machine round automatically instead of staying on whichever side was originally west.

What is not done

Nothing in the game lets you turn anything yet.

The model carries facing, the renderer honours it, the depth sorting and the little ready badges above each machine were all corrected to use the turned footprint rather than the original one. All of that last part is a no-op today — it changes nothing until a machine is actually turned — and it was done now so that the day the control lands, it is already right, instead of a second pass rediscovering the same bug.

So the feature is currently real, correct, and invisible. That is a strange thing to ship and a normal thing to build.

The tile in front of a printer was always going to cost you something. What changes is whether it is only a cost.