A Classic rank-up that draws taller grows in place; the changelog and help record the change #148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3792-a-classic-rank-up-that-draws-taller-grow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3792
Step 6 of plan #3561: Classic grows a rank-up that draws taller in place by decision D9, and cross-fades it under reduced motion. changelog.md and the in-game help record the whole plan's change.
What it delivers
remodel). A plot whose D8 model at its new rank draws taller than its old building was last drawn is drawn as its own mesh in its city's building material, while the city's merged mesh leaves its plot out. Each frame poses the mesh's y byriseScale(start, from, clock), withfromthe old drawn height over the new one andstartthe clock of its first frame, so it climbs over the same 0.68 s as a Boomtown growth. The mesh carries its plot inuserData.plots, so a tap on it picks the plot. The monument's tower step counts it at its new height, and the tower swaps at once, as on main (D11). When the growth ends, its mesh leaves, the budget gets it back, and the city's mesh is rebuilt with the building at its new height.fadeInuniform of the onecity-swatch-fadeprogram, which compiles as the kit arrives (if ( ( bayer < fadeCut ) != ( fadeIn > 0.5 ) ) discard;), so no program is added. A fallen building's reduced-motion fade uses the same program withfadeIn0.rankupcheck's name now says what it covers in every finish, including Classic's growing and fading meshes. Its checks are unchanged: no WebGL or shader error, and no program added from before the rank-up to the scene's end, in every finish with and without reduced motion.Tests
src/client/render/city-layers.test.ts, with the stand-in kit of step 5. Nine rank-2 plots rank up to rank 3. Six draw taller and three draw shorter, and the tower steps 4 → 8. With the growing six counted at their old heights it would step to 4.
pickreturns its plot. The tower's top right after the rank-up is the new step's. From RISE_SECONDS on, its own mesh is gone and the merged mesh holds the building at its new height and model. No own mesh is left, and the budget is back to 0.city-swatch-fadekey, which is among the programs compiled as the kit arrived. Both compile to the same GLSL, with the same discard line. TheirfadeInis 0 and 1, and they share the cut, which runs t / FADE_SECONDS. At each of the 16 Bayer thresholds, exactly one of the two keeps the cell. After FADE_SECONDS both are gone, their materials are disposed once, the budget is back to 0, and the merged mesh holds the new model. With the budget at 23, no cross-fade starts, the budget stays at 23, and the merged mesh holds the new models at once.drawnModelsnow reads a plot's own mesh through its matrix, so a plot that grows during the rule test's walk still names its model. The reduced-motion fall test checks the new discard line andfadeIn0.Fail before: the head's city-layers.test.ts run against the base's code (
4d55866) in a whole-tree copy fails 7 of 21. Those are the 6 new tests and the fall-fade test, whose discard line changed.Mutation checks, each from a whole-tree copy outside the checkout with one edit (
diff -rshows only that edit). The control passes 21/21, and each mutant fails the test aimed at it:from: 0)fadeIn: false)fillleaves a changing plot out of the tower's heightsframedoes not rebuild the city's mesh when a change endsconst height = kit.drawn[from])heightOfreturns 0 for a fade)Draw checks
The draw checks, the Node timing, the renders and the play check ran on
35c8013. The head,91f0ebf, changes only city-layers.test.ts after it.The growth and the cross-fade draw only while a rank-up changes, and the Map Yard's cities hold still while it benches, so the bench is not run. One load per arm and view in Classic (
?finish=0), from base4d55866and head35c8013built fromgit archivetrees and served with vitepreview(). Calls and triangles are identical:grown=fullNode timing of
CityLayer.present, with the kit's OBJs parsed from assets/ and fitted asloadKenneyandloadFittedfit them. The city is grown out at 80,80 (seed 7, 160² open map, 338 growth steps to the population cap). Its last 40 growth steps that rank a building up (20–23 buildings) are each presented from the step before, 5 timed rounds after a warm-up. On the head, 27 of the 40 grow and 13 draw no taller. Three sessions on s32, at a load of about 2–4, with paired per-step medians:Paired head − base per step: +0.28, +1.21 and −0.24 ms for the grown steps, and +0.44, +1.32 and −0.15 ms for the at-once ones. That is within the sessions' noise: the head's present adds only a map of the old layout's plots and two D8 walks per re-modelled plot. A growing rank-up costs one more rebuild of its city, the same as a present, 1.1 s after it. On the base, the frame after the growth's span takes 0.0002 ms.
Renders for the Reviewer
Attached to #3792. Each shows the Wreck Yard's
rankupscene in Classic at&zoom=3, the watched plot ranking 9 → 10, with frames at device scale 2 cropped around the plot. Every page threw no error and added no program (data-addedempty):3792-classic-rankup-motion.png: frames −0.1, 0.02, 0.1, 0.2, 0.3, 0.45, 0.6, 0.7 and 1.2 on the head. The new building's top pixel row reads 82, 79, 77, 75, 73, 71, 71 and 71 from 0.02 on: it climbs to its height by 0.6 s and holds there.3792-classic-rankup-still.png: under reduced motion, frames −0.1, 0.02, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3 and 0.6. The old building dithers out as the new one dithers in, and the new one stands alone from 0.3.3792-classic-rankup-base.png: the base's frames, for reference. The new building stands at its full height (top row 71) from 0.02.3792-classic-rankup-context.png: the head's frames −0.1, 0.02, 0.3, 0.6 and 1.2 over the whole focus, with the rank-1 container appearing at once on the empty plot and the monument.Play
The esbuild bundles of src/ai/sim.ts and src/bench/net.ts built from the base and head trees are byte-identical, after the tree path in esbuild's module comments is normalized (sha256 beb944e8… and 78c5cbf6…). So the AI matches and
npm run benchwere not run. MAP_VERSION stays.Gates
sak-gate fast(tracker gate run 465, run 864's #1) on35c8013: passed,npm test1012/1012.sak-gate full(tracker gate run 466, run 864's #2) on35c8013, clean tree: passed,npm test1012/1012 andtest:phone182/182, therankupcheck in Classic with and without reduced motion included.sak-gate full(tracker gate run 479, run 892's #1) on91f0ebf, the head with the two rank-up-during-a-change tests, clean tree: passed,npm test1014/1014 andtest:phone182/182.