Repository navigation
perf: menus that show at once, one layout rule for every screen - #1 8000 span>
Merged
Merged
Conversation
The 90 course holes' maps are made from data/holes.txt before dev and build (public/maps/course.json, 46 KB gzipped) and drawn with no read of the chain. Any other version's map is read once and kept in the browser's Cache under its id.
Cards show a picture of the gnome (public/portraits, drawn by media/gnomes/portraits.mjs) where each ran a WebGL scene: the menu's panels, the Duel's picks, the Builder's sign. The picker and the win card keep the live gnome, over his picture until the first frame. A pick's hole draws from the site's map at once, the ghost's path over it once replayed. Yourself is a card of its own (no empty map), the board's six first players are the cups' tiles on the picks' three columns, with no box that scrolls. A menu screen centres its content in its frame and fades what scrolls under its foot the same way everywhere.
The start screen no longer waits for builder.wasm: it loads behind it and is awaited where it runs (a draft's state, a file, a published hole, the editor). The sign carries the one gold button, Build a new hole, beside its world; the templates and your holes follow, on shorter cards with their links on one baseline, the badges all from their top.
In idle moments: the course's maps, the gnomes' pictures, the community's first maps, and builder.wasm on a computer only.
The course's maps and the gnomes' pictures are fetched beside the game. Click to start waits for them only while they are not in, 2 s past the game at most; then they finish behind it. builder.wasm stays an idle prefetch, on a computer only.
The start showed for a frame ahead of a first run's hole, and empty ahead of a player's drafts.
On the menu, in idle moments: the Duel's picks and their bests (kept a minute), so it opens with its gnomes and its holes' lanes. On a computer only, after builder.wasm: the Builder's page and its screens' code.
Fetched at the title it took the link from the game's own start: a first visit's title went from 3 s to 14 s and more on a slow link.
✅ Deploy Preview for gno-golf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Menus that show at once, and the same layout rules on every screen.
Faster
web/public/portraits/, made by the game's own renderer), not one WebGL scene each. Live 3D stays where a gnome moves (the picker), with its picture under it until the first frame.data/holes.txtat build time (course.json, 46 KB gzipped). A map is used only when the chain's hash of the hole's data matches the file's, so a republished hole never shows old lanes. Community maps are kept in the browser by id (versioned, checked when read back, 300 at most).builder.wasm; it loads in the background and is awaited only to check, test or publish. If it fails, the screen says so with a retry.Production build, 4x CPU, 120 ms a request, two visits (ms):
Screens
Checked
SKIP_GNO=1 scripts/check.sh: all green, 1238 tests (new ones for the map cache, the course-map hash match, idle cancel, the phone gate and the rival picks' cache).scripts/e2e-builder.sh: 211 passed.