Skip to content
Zizeeria
Menu

News

A setting that could not be put back

Fix

The client has a look now, and getting there meant finding out that both of its scale settings were quietly destroying themselves.

The report was four words long and entirely accurate: with scaling, the whole interface goes strange. What made it tractable is that a client keeps its settings in a file, and that file said exactly what was being looked at — interface at seventy-four per cent, text at a hundred and sixty-three. A description of a fault is an argument. A saved state is a reproduction, and it can be photographed.

So it was, six times, at six combinations of the two sliders, all at the same window size and all through the same capture. That is more pictures than the problem seemed to warrant, and it is the reason four separate defects came out of it rather than one.

The first is the one that earns the title. The settings screen is built once and kept, so opening it a second time re-runs its setup over the same labels — and that setup read each label's original size straight off the label, which by then was carrying the size the screen itself had written on the previous visit. At a hundred and fifty per cent, the first visit showed text half again as large, the second showed it twice as large again, and the third was over three times the size it started at. Dragging the slider back to a hundred could not undo any of it, because the number it multiplied had moved with the text. Below a hundred it runs the other way and the words shrink toward nothing: sixteen points becomes eleven, then eight, then five.

Underneath that was a second one that only exists in the client people actually download. Two ways of asking a label its size disagree unless the display is at a particular resolution — which the editor is and a packaged build is not — so every write shrank the text by a further quarter, in the one configuration nobody here had ever measured. Both are gone: the original size is remembered once, per label, and read and written in the same units at both ends.

The other slider had the opposite fault. Above a hundred per cent it did nothing at all — not a little, nothing. The composition sits inside a box that shrinks it to fit the window, and that box divides out precisely what the setting multiplies in, so the two cancel and the arithmetic is exact. The pictures agree: a hundred per cent and two hundred came back within one byte of each other. Below a hundred it did work, and left the interface floating in the middle of the screen with the footer stranded above the bottom edge and the window buttons drifted in from their corner — which is what the original report was actually describing.

The box follows the window now. It is sized to exactly the space available, so its edges are the screen's edges at every scale, and anything anchored to one is anchored to the other. The footer sits on the bottom. The buttons sit in the corner. The interface gets smaller and the frame stays where it is, which is what making a UI smaller ought to mean. Seventy per cent is what a fresh install gets, because that is the one somebody looked at and liked, and it is worth being the default only now that the layout can reflow into it.

The part worth writing down is the part that went wrong while proving any of this. The compounding is a claim about what happens on the second and third visit to a screen, so the obvious check is to drive the real client, open the screen three times and photograph each. That harness cannot answer the question. The buttons move as the text grows, so scripted clicks miss them; and the step that waits for the screen looks for a line in a log it does not clear, so the second and third waits return immediately and the clicks race. Two runs produced a photograph of the login screen carrying an error message, and nothing in either run's output said the picture was of the wrong screen. Only opening it did.

So the decision moved out of the widget instead — the same move this project made a week earlier for the menu's screen choice, and for the same reason. A check that needs a running client is a check nobody runs, and a check whose apparatus can fail silently is worse than none. It is four small functions now, and a test that walks four scales against four visit counts with no world, no game instance and no interface at all. Put the old line back and it fails nine assertions, at exactly the values the arithmetic predicts. At a hundred per cent it stays green in both, which is the whole explanation for why nobody who never touched the slider could have seen this.

There was one more picture worth mentioning, taken while checking that none of the above had broken anything else. It showed the sign-in card as a black rectangle, the news panel empty and scattered black squares where letters belong — a total collapse, convincingly. It is a frame captured before the fonts had finished loading. Retaken twice it was normal both times. Nothing in the tooling can tell the difference; the only tell is that the file was fifty-six kilobytes away from the picture it should have matched, which is why it got opened rather than believed.

Along the way an adversarial pass over every button on every screen traced seventy-one controls to their handlers and found nine that promised something they did not do. Rebinding a movement key onto another movement key was accepted, and left two contradictory bindings on one key and one direction bound to nothing, while the screen said the rebind had worked. Closing the settings neither saved nor discarded, so a restart resurrected whatever had been changed. The character creator kept the previous name in the box, so pressing create again replayed the first request and reported a success that made no character. Create account told everybody to open a link that only one of two possible deployments sends. And the drawn envelope and padlock inside the text fields were taking the clicks aimed at the fields behind them.

Two releases went out, each verified before its installer reached the site rather than after: the published archive unpacked to an empty directory, the launcher pointed at the live channel, fourteen files fetched and checked, and the game started and drew. The second of them is the first version number this project has had with two digits after the last dot, which is where naive version ordering breaks — as text, 0.1.10 sorts before 0.1.9. The download page compares the three numbers separately and has since it was written, with a comment naming that exact trap. Today was the first time it was ever tested, and it was tested by looking at what the page offered.