In the building menu two building overlap (gas burner and transport hub) #136

Closed
opened 2026-08-28 12:26:25 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Done in ea25318. Reproduced exactly as reported, and the cause is worth writing down because it was a bug waiting for the tenth structure.

The menu's rows were a written-down list of tops, read as tops[mini(row, tops.size() - 1)]. With every structure researched there are ten entries in three columns - four rows - and the list had three tops. The clamp put row 3 on row 2's position, and in that column order the tenth entry (gas burner) landed exactly on the middle of row 2 (transport hub). Identical rectangles, not merely overlapping ones.

A list that silently stacks whatever will not fit in it is not a layout, so it is computed now: a first top and a pitch that tightens when the band is short, floored at the row's own height - which is the guarantee that two rows can never occupy the same space however far the catalog grows. And the column count widens rather than adding a row the band cannot hold, so ten structures now sit in four columns of three rows instead of three columns of four.

The regression test unlocks the whole skill tree and checks every pair of visible entries - button, caption and price - for overlap. That is the shape of the bug rather than a coordinate that happens to be right today; it fails on the old code and keeps failing if the eleventh building brings the problem back.

Done in `ea25318`. Reproduced exactly as reported, and the cause is worth writing down because it was a bug waiting for the tenth structure. The menu's rows were a written-down list of tops, read as `tops[mini(row, tops.size() - 1)]`. With every structure researched there are ten entries in three columns - four rows - and the list had three tops. The clamp put row 3 on row 2's position, and in that column order the tenth entry (gas burner) landed exactly on the middle of row 2 (transport hub). Identical rectangles, not merely overlapping ones. A list that silently stacks whatever will not fit in it is not a layout, so it is computed now: a first top and a pitch that tightens when the band is short, floored at the row's own height - which is the guarantee that two rows can never occupy the same space however far the catalog grows. And the column count widens rather than adding a row the band cannot hold, so ten structures now sit in **four columns of three rows** instead of three columns of four. The regression test unlocks the whole skill tree and checks every pair of visible entries - button, caption and price - for overlap. That is the shape of the bug rather than a coordinate that happens to be right today; it fails on the old code and keeps failing if the eleventh building brings the problem back.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#136
No description provided.