From 5ab285adfd1fe070edf0f3d6a345283aacedb031 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 15:26:47 +0000 Subject: [PATCH] Leaf Sweep: slower, calmer opening Hands gather at about half the old rate at the start, Quick hands costs two sacks (25) and the rake about five (60), and the first instruction stays up until the sack is half full. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cw2rMA4m89wq5xtvEXdXsk --- README.md | 2 +- e63334287a3deaa3/windrow/js/game.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 37e95310..aa9e763a 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/patchwork-tower/`: Patchwork Tower (Back Room), a one-screen fix-it arcade game in pixel art for one player (one file, one canvas, Web Audio, no libraries, no Firebase except stats.js). It took the place of Hivefix; `e63334287a3deaa3/hivefix/index.html` is now only a redirect to it, so old links and bookmarks still work (`m/thumbs/hivefix.jpg` stays for the old What's new entry). Rivet, a repair bot with a wrench, hops between the windows of a brick tower at night (5 across, 4 down) and fixes each broken one until it glows; cracked windows take one fix, dark ones two, and fixing roots the bot to the spot. A gargoyle walks along the roof, stops over a column (more often than not the bot's), winds up (eyes red, a red arrow under the roof ledge on every column about to be hit) and kicks a brick straight down it. Clearing every window ends the floor (500 plus 10 for each second left of 60) and the next one starts with a new layout. **Rules** live between `// ==RULES==` and `// ==END RULES==`: no page, clock, sound or `Math.random` in there, so the same seed and presses always give the same game (`create(seed)`, `step(g, 1/120)`, `press(g, k)` for a tap and `hold(g, k, on)` while a key or button is down, with k one of up, down, left, right, fix; what should be heard goes into `g.ev` as words the page plays). `g.win[r][c]` is 0 fixed / 1 cracked / 2 dark; `g.blockV[r][c]` is a planter under the sill of (r, c), which blocks climbing between rows r and r+1; `g.blockH[r][c]` is an open shutter between (r, c) and (r, c+1), which blocks stepping sideways. **Tuning** is the constants at the top of the rules: a hop takes 0.12 s (`HOP`), a fix 0.26 s (`FIX`; 0.08 s with cocoa), a press made during a hop or fix is remembered for 0.3 s (`BUF`), a held direction or FIX repeats after 0.22 s (`REPEAT`), the wind-up is 0.4 s (`TELE`) plus 0.3 s on floor 1 shrinking to nothing by floor 4 (`TELE_EARLY`), 3 lives, a hit freezes the world for 1 s and restarts the bot at the door with 2 s of blinking. Per floor: 7 + 2 × floor windows broken (all 20 from floor 7), the chance one is dark is 0.15 + 0.1 × floor up to 0.75, one more planter or shutter each floor up to four (each on its own edge, redrawn until every window can be reached), the gargoyle walks at 55 + 9 × floor pixels a second, bricks fall at 65 + 11 × floor, and its rest between kicks is 1.5 − 0.13 × floor seconds, never under 0.35; the speeds stop rising at floor 12 (`TOP_LEVEL`). From floor 2, bats cross a row (an arrow blinks at that edge of the row for 0.8 s first, `BAT_WARN`); from floor 3 a kick sometimes (35%) sends a second brick down a neighbouring column 0.18 s later, chosen at the start of the wind-up so its arrow shows too. Cocoa appears on a sill now and then for 7 s: 6 s safe from everything, the first 4 with one-tap repairs, +300. The hit boxes are narrower than the sprites (9 pixels either side for bricks and bats). **Drawing**: the game is a 240 × 320 picture. `layout()` shows it at a whole number of device pixels per game pixel (the canvas is sized in device pixels and scaled back by 1/devicePixelRatio, its corner snapped to a device pixel), so pixels stay square and sharp on any screen; never size the canvas with CSS percentages or `vh`. The sky, skyline and brickwork are drawn once (`back`), the windows, planters and shutters are redrawn only when one changes (`g.winDirty`), and words use a 5 × 5 pixel alphabet drawn in code (`FONT`, capitals, digits and `+ - : ! .` only), not a web font. The loop runs the rules in fixed steps of 1/120 s and draws between steps, so it plays at the same speed on 60, 120 and 144 Hz screens. The game pauses when the tab is hidden or the window loses focus. **Saved in the browser only**: `patchwork-best`, `patchwork-mute` (in try/catch), keys under `keybinds:patchwork-tower`. Stats hook: `max('score', score)` and `max('floor', floor reached)` when a floor is cleared and at game over (the Leaderboards show best score). Controls: arrows or WASD hop (hold to keep hopping), Space, Z or X fix (hold to keep fixing), P, Enter or Esc pause, M sound, all rebindable under KEYS. On touch screens (`body.touch`): a d-pad (slide a thumb between arrows) and a round FIX button under the screen, or either side of it when the phone is sideways. How to play sits beside the screen when there is room, otherwise behind the ? button. A test hook (`window.__pt`) exists only when `navigator.webdriver` is set. It has Spanish: its words are in `patchwork-tower/es.js` (lang.js), with a Language switch in How to play; the canvas words are chosen to need no accents, since the 5×5 pixel font has none. **The Wardrobe** (captains only for now, like the other games' hidden cosmetics): 29 looks for Rivet in `patchwork-tower/wardrobe.js`, listed in `cosmetics.js` under `GAMES['patchwork-tower']` (15 paint jobs, 7 hats, 3 face pieces and 4 hop trails: sports kits, tin and chrome robots, pirates, suits and more). The page fetches `wardrobe.js` and `../cosmetics.js` only when `wardrobeOn()` is true (`PATCHWORK_PUBLIC`, the one line that opens it to everyone; a site captain through `captains.js`; or `?wardrobe=1` on localhost or in an automated browser), and then a hanger button appears in the top bar; for everyone else `WR` stays null and the bot is drawn exactly as before. Looks only: a paint job recolours the bot's own rectangles (cocoa still turns it gold, the blinking after a hit is unchanged), every paint stands out from the bricks at least 3.5 times (`MIN_CR`; factory teal is 4.1) and none is brick-orange or bat-lilac, hats sit on the head (some in place of the antenna), face pieces go on the visor, and hop trails are drawn under the bricks, bats and bot and fade within half a second. Opening it pauses a game in progress. What is worn is saved in this browser as `patchwork-look` (`{p, h, f, t}`, item numbers, 0 for none); nothing is sent anywhere. The words are in `es.js`. - `e63334287a3deaa3/flickerwood/`: Flickerwood (Back Room), an 8-bit maze chase for one player (one file, one canvas, Web Audio, no libraries, no Firebase except stats.js). Glim, a firefly, gathers every speck of pollen in a moonlit hedge maze (a glade) while four night critters come out of the hollow stump in the middle and chase its light. It is our own take on the maze-chase genre: the name, theme, characters, mazes, art, sounds, words and numbers are all ours, and only the genre's ideas are used. **The four critters** never find a path: at the middle of every tile each one picks the open way (never straight back) whose next tile is nearest, in a straight line, to the tile it wants (`target()`), and all of its character is in that tile. Swoop the bat wants Glim's tile; Gulp the frog wants the tile 3 ahead of the way Glim faces (`AHEAD`); Tangle the spider wants the point on the far side of Glim from Swoop (twice Glim's tile minus Swoop's); Dither the moth wants Glim while more than 5 tiles away (`NEAR`) and its own corner once closer. They take turns at two moods on a clock: **roost** (each heads for its own corner: Swoop top right, Gulp top left, Tangle bottom right, Dither bottom left) and **hunt**; every time the mood changes they all turn straight round, which is the tell. Glim is faster than they are in an empty corridor and a little slower while eating, turns can be pressed early and are remembered until the next gap, a turn started up to 4 pixels before the middle of a tile cuts the corner and gains those pixels (`CUT`; up to 3 pixels late it is still taken, `LATE`), and a reverse is taken anywhere. A **moonbloom** (four a glade) dazzles the critters: they turn round, go pale, slow to 60% and mostly run away, and touching one sends it home as a puff of dust for 100, 250, 500 then 1000 (`CATCH`); they flicker for the last 2 seconds, and a caught one rests 1.2 s in the stump and comes back out as itself. **Tunnels** at the edges (`~` tiles) wrap round and slow critters to 55%. A **find** (dewdrop, acorn, clover, toadstool, bluebell, feather, snail shell, moonstone, one kind a glade) shows under the stump for 9 s when 35% and again when 70% of the glade is eaten, worth 200 plus 100 a glade up to 1000. Our own twists: **Dash** (0.32 s at 2.1 times speed, then 6 s to recharge, shown as a meter) and the **chain** (each speck eaten within 1 s of the last carries it on; every 12 raises the multiplier on specks, up to 5 times). Specks are 5, moonblooms 30, clearing a glade 100 times its number up to 1000 plus 300 if no life was lost in it; 3 lives, one more at 6,000 and every 15,000 after, 5 at most. **Rules** live between `// ==RULES==` and `// ==END RULES==`: no page, clock, sound or `Math.random` in there, so the same seed and presses always give the same game (`create(seed)`, `startGame(g)`, `step(g, 1/120)`, `turn(g, d)` with d 0 right, 1 down, 2 left, 3 up, and `dash(g)`; what should be heard or shown goes into `g.ev` as words, and eaten tiles into `g.gone`). Positions in the rules are maze pixels; the page adds the score bar above. Glim and the critters are a tile, a direction and how far along it they are (`c, r, dir, off`), so they can never leave a path; they touch when both gaps are under 7 pixels (`HIT`, smaller than the sprites). **Glades** are the five `MAZES` at the top of the rules, drawn by hand as 23 rows of 21 letters (12-pixel tiles): `#` hedge, `.` pollen, `o` moonbloom, `-` path, `~` tunnel, `HHH` the stump with `G` its gate above the middle, `P` Glim's start, `B` the find, space outside the glade. Hedge Court is a full rectangle with a tunnel across the middle, Lily Pond has its corners cut off and tunnels top to bottom, Bramble Wheel is not mirrored (its bottom half is its top half turned half round) and has two tunnels, Mossy Ruin has tunnels both ways through the middle of each edge, and Moth Hollow is an hourglass with none; glade 6 is Hedge Court again, quicker. A new or changed glade must stay: every path one tile wide (no open 2 × 2), no dead ends, all joined up, a border tile that is a path matched on the opposite border, the start at least 8 steps from the gate with a way left and right (Glim sets off left), one moonbloom in each quarter, nothing but hedge next to the outside. A script checked all of that for the five glades when they were made (it is not in the repo), so check again by hand if you change one. **Tuning** is `tune(level)` and the constants at the top of the rules: Glim 66 pixels a second plus 1.3 a glade; critters 70% of that plus 3 points a glade (97% at glade 10); the dazzle 8 s less 0.67 s a glade, never under 2; roosts of 7, 7, 5 and 4 s (less 0.55 s a glade, never under 1.5) between hunts of 13, 15 and 18 s (plus 1.2 s a glade), then hunting for good; Gulp leaves the stump after 3 s, Tangle after 12 s or 30 specks, Dither after 28 s or 90 specks, all sooner glade by glade; from glade 3 Swoop speeds up 6% when 20% of the pollen is left and 12% under 8%, and keeps hunting through roosts; nothing tightens after glade 10 (`TOP_LEVEL`). Glade 1 is meant to be cleared by a first-time player: a test bot that only heads for the nearest pollen and runs when something is three tiles away clears it nearly every time. **Drawing**: the game is a 252 × 300 picture (a 14-pixel score bar, the 252 × 276 maze, a 10-pixel strip for spare lives, the dash meter and finds). `layout()` shows it at a whole number of device pixels per game pixel, so pixels stay square and sharp, and tries three places for it, biggest picture first: under the top bar with the key hint, under the bar without the hint, and between the bar's title and buttons (so a 1366 × 768 laptop with a short browser window still gets 2 ×); only when a whole number would be 1 is it drawn at 2 and shrunk smoothly to fit. Never size the canvas with CSS percentages or `vh`. Sprites are rows of letters turned into small canvases once (`bake`; Glim is drawn facing right and turned for the other three ways; two frames each; the dazzled look is the same shapes in two pale tones); the hedges, stump and tunnel marks are drawn once per glade (`mazeL`, and a lit copy `flashL` for the blink when a glade is cleared), the pollen sits on its own layer and each speck is wiped from it as it is eaten, the score bar is redrawn only when something on it changes, and words use a 5 × 5 pixel alphabet drawn in code (capitals, digits and `+ - : ! .` only). The loop runs the rules in fixed steps of 1/120 s and draws between steps. It pauses when the tab is hidden or the window loses focus. **Sound** is made in the page: square, triangle and noise blips in `SFX`, and a 16-bar tune of our own in A minor in `TUNE` (notes as numbers), booked a tenth of a second ahead on the audio clock; while a moonbloom is on, a quicker bright figure plays instead. Nobody has listened to it yet, so the loudness and the tune want a check by ear. **Saved in the browser only**: `flickerwood-best` (score), `flickerwood-glade` (furthest glade), `flickerwood-mute` (in try/catch), keys under `keybinds:flickerwood`. Stats hook: `max('score', score)` and `max('glade', glade reached)` when a glade is cleared and at game over (the Leaderboards show best score). Controls: arrows or WASD turn, Space or Shift dashes, P, Enter or Esc pause, M sound, all rebindable under KEYS. On touch screens (`body.touch`): swipe anywhere to turn (keep sliding to turn again without lifting), tap the screen to dash, or use the d-pad with a DASH button either side of it under the screen (pad on the left and DASH on the right when the phone is sideways). How to play, with a picture of each character, sits beside the screen when there is room, otherwise behind the ? button. A test hook (`window.__fw`) exists only when `navigator.webdriver` is set. It has Spanish: its words are in `flickerwood/es.js` (lang.js), with a Language switch in How to play; the canvas words are chosen to need no accents (the 5×5 pixel font has none), and glade and critter names stay English. **The Wardrobe** (captains only for now, like the other games' hidden cosmetics): 28 looks for Glim in `flickerwood/wardrobe.js`, listed in `cosmetics.js` under `GAMES.flickerwood` (14 kits, 7 hats, 2 face pieces and 5 trails: sports kits, a tin firefly, pirates, suits and more, all seen from above). The page fetches `wardrobe.js` and `../cosmetics.js` only when `wardrobeOn()` is true (`FLICKERWOOD_PUBLIC`, the one line that opens it to everyone; a site captain through `captains.js`; or `?wardrobe=1` on localhost or in an automated browser), and then a hanger button appears in the top bar; for everyone else `WR` stays null and Glim is drawn exactly as before. Looks only: a look swaps `SP.glim` for pictures of the same 16 × 16 size (so the spare Glims on the score bar wear it too), no kit recolours the glowing yellow tail or the halo (what tells Glim from the critters), and trails are drawn under the critters and Glim, fade in 0.4 s and are never small yellow dots that could pass for pollen. Opening it pauses a game in progress. What is worn is saved in this browser as `flickerwood-look` (`{k, h, f, t}`, item numbers, 0 for none); nothing is sent anywhere. The words are in `es.js`. - `e63334287a3deaa3/lanternhold/`: Lanternhold (Back Room), a co-op tower defense game for 1 to 4 players (one file, three.js r128 with `../autores.js`, `../netsmooth.js` for teammates' pointers, Web Audio, Firebase Realtime Database rooms under `rooms/lh-`, same project and rules as Rumble Karts; invite links go through the home page as `#lh-`; no Quick match, rooms hold up to 4). The name, the Gloom, the towers, the maps, the art and the sounds are all our own. The Gloom walks a road across a floating island (a 20 × 12 grid of 2 m tiles, `GW`/`GH`/`T`) to the lantern; each one that gets there costs lives (`lv` in `EN`: 1, 2 for Shellbacks and Splitblobs, 15 for the boss). Towers go on grass tiles only (not road, scenery or the lantern). **Rules** are plain data and pure functions near the top of the script, the same in every browser, so a client can work out wave previews and enemy health without asking: `MAPS` (Meadow Bend, one long road; Twin Fords, two roads that meet; Whorl Garden, a spiral, whose flyers come from their own pink gate, `fly`, so they don't skip almost the whole map), `DIFFS` (Easy, Normal, Hard: health factor, lives 30/20/12, starting gold 720/620/540, bounty factor and seconds between waves), `EN` (Gloomling; Skitter, fast; Shellback, armour 7 taken off every hit, at least a quarter always goes through; Duskmoth, flies straight at the lantern; Splitblob, splits into three Bloblets; Mender, heals the Gloom near it 5% a second; Gloomwarden, the boss on every 10th wave, armoured, slow, and calls two Skitters every 5 s), `TW` (Bolt Spire, quick single shots, two at once at level 3; Thumper, lobbed blasts that hurt groups, ground only; Frost Bell, rings out to slow and chip everything near it, bosses half as much; Spark Coil, lightning that jumps between enemies; Sky Lance, flyers only, splash on nearby flyers; Sun Lens, a long beam that ignores armour), each with three levels (`lv`: range, damage, seconds between shots and the upgrade's cost) and a target mode (First, Last, Strong, Close). Selling gives back 70% of what went into the tower (`SELL`). `waveDef(w, map)` builds wave w from a seeded random pool (new kinds join at waves 2, 4, 5, 6 and 8, and the wave a kind first appears always has a group of it), `hpScale` makes them tougher each wave and faster still after wave 30. Survive 30 waves (`CAMPAIGN`) to win; then Keep going is endless mode. Gold: every kill's bounty and every wave's bonus (25 + 5 a wave) is split evenly between the players (`income`), each player spends their own share, and the team list has +50 to give gold to a teammate. Sending a wave before its countdown ends pays 2 gold per second left. Speed 1×, 2× or 3× (`sp`, anyone can change it). Only whoever built a tower can sell it (anyone can once they've left); anyone can upgrade or retarget it. `simStep(S, dt)` runs the game at a fixed 30 steps a second in solo, behind the menu (a demo game, `attract`) and on the online host; `act(S, uid, a)` applies one action (`b` build, `u` upgrade, `s` sell, `m` target mode, `w` send the wave, `f` speed, `g` give gold, `c` continue into endless) and returns '' or what went wrong. **Online:** each player writes only their own node `rooms/lh-/players/`: `n` name, `c` colour, `x`/`z` where their pointer is on the board (drawn on the others' screens as a ring and a name tag from a short history, NetSmooth), `h` (always 0), `ts` (server time), `j` (when they joined), and `ac`, their last 10 actions as JSON, each with a rising number `i` and the game number `g`. The host is whoever has the highest `he` with a published state, else whoever joined first (`Net.elect`); it runs the game, takes each player's new actions (`takeActs`, at most once each, by `i`, and only for the current game), and publishes the whole state as JSON in its own node's `rs` about 5 times a second (`encodeRS`: phase, wave, lives, gold per player, towers, enemies, Thumper shells in the air and the last shots, so clients can draw them). Clients rebuild the game from it (`decodeRS`, which checks every value) and move the Gloom on between snapshots from its speed, easing towards the host's numbers. If the host leaves, the next player picks up the last snapshot and carries on (`he` goes up by one), and a tab in the background keeps the host's game running once a second. The host picks the map and difficulty in the room's lobby and presses Start; anyone joining later gets a share of gold (the average, at most 250). Nodes are removed on leave and onDisconnect. **Saved in this browser** (localStorage, all `lanternhold:`): `name`, `color`, `map`, `diff`, `gfx` (Pretty, with shadows, or Fast; Fast is the default on touch screens), `sound`, `room` (the last room code) and `best::`, the best wave held. **stats.js:** `max('wave', waves held)` and `add('bosses', n)`; the Leaderboards show Most waves held and Gloomwardens beaten. **Touch:** shown only on touch screens (`body.touch`): tap a tower button, tap a tile to see the tower there, tap it again to build; drag to move the board, pinch to zoom. The camera fits the board into the space the HUD leaves (`fitCam`, `measureHud`), and on an upright phone the wave box becomes a row under the top bar and the dock gets compact. **Drawing:** the island, scenery and lantern are merged meshes with vertex colours; enemies, health bars, shots and rings are instanced meshes (their colour buffers are made at full size in `whiteColors`, because three r128's `setColorAt` sizes the buffer from the mesh's current count); particles are one Points draw. Automated browsers get a test hook, `window.__lh`. It has Spanish: its words, tower names and descriptions are in `lanternhold/es.js` (lang.js), with a Language switch on the menu and the pause screen; map names and the Gloom's names stay English, and nothing translated is sent to the room. **Wardrobe (hidden: captains only for now).** `LH_PUBLIC = false` and `wardOn()` (captains.js's `may(false, 'wardrobe', 'lh-wardrobe')`; `?wardrobe=1` for tests on localhost or in an automated browser) decide whether the menu shows a Wardrobe button under the colour swatches; for everyone else `lanternhold/wardrobe.js` is never fetched and the game is exactly as before, unless a teammate wears something, in which case it is fetched to draw them. It has 30 items in four slots, numbered as in `../cosmetics.js` (`lh-…`): 12 tower banners (a small flag on a pole at the back-left of every tower that player builds, seen by the whole team: sports pennants, a gear, a pirate flag with an eye-patched skull, a ship's wheel, pinstripes, a crown; baked into the tower's base mesh through `towerParts`' new `ban` argument, so a tower is still the same draw calls and its shape, owner band and level gems are untouched), 9 lanterns (the lantern's stand and cage on the captain's own screen only: `lanternGeo()` is the usual one, and `world.core.body`'s geometry is swapped; the flame, halo and light stay where they are and the same size), 5 flame colours (the flame's and halo's colour on the captain's own screen only; the point light is not recoloured, the low-lives flicker and the red flash are kept) and 4 build bursts (in place of the usual puff in `fxBuild` when that player builds or upgrades, seen by everyone, from the same particle pool). Saved in this browser as `lanternhold:wardrobe` (`'banner.lantern.flame.burst'`); online, a player's own node carries `cz: 'banner.burst'` (written with `Net.upd`) only while one of those is worn. Older pages ignore `cz`, `rs` and the actions are unchanged, and a page draws the usual look for numbers it doesn't know. The test hook `window.__lh` adds `WD` (with `wear(slot, n)`), `wardOn`, `wdLoad`, `wearOf`, `towerViews`, `towerMesh`, `wx`, `wz` and `world`. Its words and item names are in `lanternhold/es.js`. -- `e63334287a3deaa3/windrow/`: Leaf Sweep (Back Room; first called Windrow, and the folder, the `WR` name in the code, the save key `windrow:v1`, `keybinds:windrow` and the stats name keep that), a calm single-player first-person game about clearing autumn leaves out of five walled gardens (three.js: the site's own r187 build, `/lib/three/r187/three.min.js` with its r128 layer, then `../autores.js`; no Firebase and no rooms, except `stats.js` for play time; no ads). The page is `index.html` (markup, styles, HUD and menus) plus five plain scripts in `js/`, loaded in this order: `world.js` (the areas, the collision grid and everything that stands still), `leaves.js` (the leaf simulation and its drawing), `audio.js` (every sound, made in code), `models.js` (gloves, sack, rake, blower, finder beams) and `game.js` (player, tools, money, HUD, menus, saving, the frame loop); `es.js` is its Spanish. Everything is drawn and textured in code; nothing is downloaded. **The start.** A new player stands on the doorstep of a garden house in the Front Yard (8 x 7 m of buried lawn with a stone path, one bin, low walls and a closed gate) with only their hands. It is a sixth area, `WR.AREAS[5]` (`WR.YARD`), added after the first five so the numbers in older saves keep their meaning; `WR.ORDER` is the order areas are listed in. Its leaves lie 1.5 times thicker (`dense`), and clearing it to 100% opens the gate to Gatehouse Court by itself, free. The screen shows a crosshair, the sack and the acorns, and one line of instruction at the bottom middle (`hintText` in `game.js`: hold to gather; sack full, empty it in the bin, with a bouncing marker over the bin; spend acorns in the shed; bought the rake; the gate is open), one at a time, each gone when done. Everything else appears when it first matters (`hudStatic`): percent cleared and the shed after the first sack is emptied, the tool bar with a second tool and only with tools owned, garden names, the Gardens tab and map, gate signs and the finder button once the court is open. The shed lists the sack, hands and rake at first and the rest as they become useful (`shedShows`). `state.seen` remembers which lines have been shown; a save that already has the court open skips them all. A scripted player clears the yard in about 100 game-seconds, with the first upgrade after the first sack and the rake after the third. **The garden** is flat, about 61 x 53 m, on one grid of 0.25 m cells (`WR.CELL`, 248 x 216; the plan in `world.js` is written at full size and every position is then multiplied by `WR.S` = 0.8, so the gardens are small and the leaves lie thick): `solid` blocks the player and the leaves, `gtype` is the surface (lawn, paving, decking, gravel: how far a leaf slides), `inlet` marks mulch-chute cells, `areaOf` says which garden a cell belongs to. The five big gardens are the first entries of `WR.AREAS` in `world.js` (Gatehouse Court, Orchard Walk, Lily Terrace, Glasshouse Row, Maze Lawn) with their gate cost, the garden that must be half cleared first, the bonus and the reward for finishing (sprint, kneel, higher jump, chutes that draw leaves in, a gold rake); bins, chutes, gates, trees, hedges and benches are lists just under it, and `WR.buildGrid` turns them into the grid, so moving a prop means editing its list only. Its last step, `seal()`, proves every leaf can be cleared: with all gates open it finds the cells a player can stand in, and any free cell with no standing spot within 2 m in a clear line (a slot behind a bench, say) is made solid, so neither leaves nor feet can get into it (5 cells with the present props; about 18 ms at load). **Leaves** are real objects, never removed by pointing: each has a place, a speed and a tumble, and leaves the garden only by being carried to a compost bin in the sack or by reaching a mulch chute. To stay cheap, resting leaves are asleep and cost nothing; each leaf sits in one grid cell (a linked list per cell), so a tool only visits the cells it reaches; and leaves do not collide one with another: a cell is a stack (each extra leaf rests 1.4 cm higher), a cell with 26 leaves turns sliding leaves away (40 for falling ones, about 56 cm) and a leaf near the top of a stack 5 taller than a neighbour slides off onto it. A leaf never moves more than 0.22 m in a step and its new place is rounded to what the arrays hold before the wall test, so nothing gets through or into a wall. That is what makes heaps against walls and rows in front of the rake. `Leaves.blow` is the blower (a cone; force falls with distance and with angle off the middle, 13 rays stop it at walls, leaves low in a heap are sheltered), `rake` carries the leaves under the head along with it, `scoop` sends the nearest leaves in a ring to the sack (they need a clear line from the player, except a garden's last 6 leaves, so none can be stranded behind a bench), `kick` is walking through them and `pull` the Draught grates reward. A leaf is two triangles: a flat card with one of four leaf shapes cut out of it (alpha test) by a 256 px atlas drawn in the page, tinted per leaf. They are drawn as instanced meshes, one per garden and leaf shape (20 draw calls); each mesh keeps its leaves in the order of the 4 m tile they started in and only the tiles where something moved are sent to the graphics card each frame. On top is one see-through 'litter' sheet whose opacity comes from a texture with one pixel per cell, so cleared ground looks clean about a second after its leaves go. **How many leaves** is the quality setting, in leaves per square metre of open ground (`WR.QUALITY`): Low 14 (27,600 leaves in the whole garden), Medium 24 (47,300), High 40 (78,800); Medium and High have a real shadow map from the low sun, drawn once (nothing that casts a shadow moves, except a gate opening), and Low has soft dark patches under the trees instead. Colours are written as screen colours and lit in linear light (`WR.lin`, sRGB output, ACES tone mapping), so any new colour or canvas texture must go through `WR.lin` or be marked sRGB. Phones start on Low, computers on Medium. Measured: with a fully upgraded blower sweeping through leaves the simulation costs 0.4 / 0.5 / 0.8 ms a step (1.4 / 3.0 / 2.8 ms at 4x CPU slowdown), with up to 2,800 leaves awake at once; looking across the first garden draws about 78k / 117k / 180k triangles in about 70 draw calls. Not measured: the cost of the cut-out leaves overlapping on a real phone's graphics chip (the test machines have none). `autores.js` lowers the resolution first; if frames stay slow for 8 s after that and the player never chose a setting, the game drops one leaf tier itself and says so. An area's leaves are worth the same in total at every tier (`units`; fewer leaves are each worth more), and the sack and the hands are measured in quality-free units too (an area's `leaves` number is its size in sack units; `Leaves.fill` is what one leaf takes), so progress and prices do not depend on the setting. Changing the setting scatters the leaves that are left again and keeps each garden's percent. **Looks and feedback.** `world.js` builds the house (door, lit windows, shutters, roof, chimney), trees with a crown of rounded masses shaded light above and dark below, walls with piers and caps, slatted benches, the fountain and a painted sky with cloud and a sun glow. `models.js` has rounded gloves on sleeves: open hands and the sack, a fist on the blower's handle, and two fists and forearms that follow the rake's handle in the garden itself. The blower shows wind streaks and lifts and tumbles leaves; landing from a jump throws leaves up and out, with a burst of loose leaves and a sound when it is a real heap; a rake stroke ends with a thump and a puff of crumbs; emptying the sack pours leaves into the bin; buying something pulses the HUD; 100% is a warm flash, falling leaves and a fanfare. **Tools and money.** Hands and sack, a rake (a stroke reaches out lifted, then drags back along the ground, so it pulls) and a blower (it pushes). Acorns come from leaves: at a bin when the sack is emptied (20% more for a full sack) or at once at a chute. `UP` in `game.js` is the shed (nine upgrades and their prices) and the arrays under it are what each level does; the models in `models.js` change with them. The leaf finder (F, or by itself when under 3% of a garden is left) lights the 8 nearest leaves of the garden you are standing in, and the journal map draws a dot for every leaf on the ground. **Saved data:** one localStorage key, `windrow:v1` (JSON): `acorns`, `earned`, `up` (upgrade levels), `unlocked` and `done` (per garden; six entries now, and a save with five is given the yard, open, as the sixth), `rewards`, `bagUnits` (what is in the sack, per garden) and `bagFill`, `gone` (share of each garden cleared), `tool`, `tut` (no longer used), `seen` (which instructions have been shown), `pos`, `secs`, `binFill`, `set` (look speed, volume, quality, flipped look, whether the player chose the quality), and `leaves` with `leafMul`: for each garden that has been touched, a base64 string of two 16-bit numbers a leaf (centimetres from the corner of the garden; 65535 = gone), about 250 KB at Medium and 420 KB at High once every garden has been disturbed; a leaf saved against a wall is stepped back out of it on loading. An untouched garden saves nothing and is scattered again from its seed. It saves 8 s after a change, on pause, and when the tab is hidden or closed. Keys are rebindable (`keybinds:windrow`); `autores.js` keeps its own scale. It is not in `account-nudge.js`'s KEYS, so it does not follow a Google account to another device, and it has no row in `leaderboard.js` or `miles.js`. **Touch:** `body.touch` is set on the first touch and shows `#touch` (left stick, Use, Jump, Run and Kneel once earned, a context button for bins and gates, and finder, journal and pause top right); the three tool slots at the bottom are tappable on any device. Portrait and landscape have their own positions in the style block; a drag on the view or on the Use button looks around. `WR.test` at the bottom of `game.js` is only for test scripts (start without a click, step the simulation, hold the tool, a simulation benchmark); nothing in the game calls it. +- `e63334287a3deaa3/windrow/`: Leaf Sweep (Back Room; first called Windrow, and the folder, the `WR` name in the code, the save key `windrow:v1`, `keybinds:windrow` and the stats name keep that), a calm single-player first-person game about clearing autumn leaves out of five walled gardens (three.js: the site's own r187 build, `/lib/three/r187/three.min.js` with its r128 layer, then `../autores.js`; no Firebase and no rooms, except `stats.js` for play time; no ads). The page is `index.html` (markup, styles, HUD and menus) plus five plain scripts in `js/`, loaded in this order: `world.js` (the areas, the collision grid and everything that stands still), `leaves.js` (the leaf simulation and its drawing), `audio.js` (every sound, made in code), `models.js` (gloves, sack, rake, blower, finder beams) and `game.js` (player, tools, money, HUD, menus, saving, the frame loop); `es.js` is its Spanish. Everything is drawn and textured in code; nothing is downloaded. **The start.** A new player stands on the doorstep of a garden house in the Front Yard (8 x 7 m of buried lawn with a stone path, one bin, low walls and a closed gate) with only their hands. It is a sixth area, `WR.AREAS[5]` (`WR.YARD`), added after the first five so the numbers in older saves keep their meaning; `WR.ORDER` is the order areas are listed in. Its leaves lie 1.5 times thicker (`dense`), and clearing it to 100% opens the gate to Gatehouse Court by itself, free. The screen shows a crosshair, the sack and the acorns, and one line of instruction at the bottom middle (`hintText` in `game.js`: hold to gather; sack full, empty it in the bin, with a bouncing marker over the bin; spend acorns in the shed; bought the rake; the gate is open), one at a time, each gone when done. Everything else appears when it first matters (`hudStatic`): percent cleared and the shed after the first sack is emptied, the tool bar with a second tool and only with tools owned, garden names, the Gardens tab and map, gate signs and the finder button once the court is open. The shed lists the sack, hands and rake at first and the rest as they become useful (`shedShows`). `state.seen` remembers which lines have been shown; a save that already has the court open skips them all. A scripted player that walks and aims perfectly fills its first sack in about 9 game-seconds, buys Quick hands (25) after its second sack, the rake (60) at about 45 s and clears the yard in about 150 s; a person takes longer. The "hold to gather" line stays until the sack is half full. **The garden** is flat, about 61 x 53 m, on one grid of 0.25 m cells (`WR.CELL`, 248 x 216; the plan in `world.js` is written at full size and every position is then multiplied by `WR.S` = 0.8, so the gardens are small and the leaves lie thick): `solid` blocks the player and the leaves, `gtype` is the surface (lawn, paving, decking, gravel: how far a leaf slides), `inlet` marks mulch-chute cells, `areaOf` says which garden a cell belongs to. The five big gardens are the first entries of `WR.AREAS` in `world.js` (Gatehouse Court, Orchard Walk, Lily Terrace, Glasshouse Row, Maze Lawn) with their gate cost, the garden that must be half cleared first, the bonus and the reward for finishing (sprint, kneel, higher jump, chutes that draw leaves in, a gold rake); bins, chutes, gates, trees, hedges and benches are lists just under it, and `WR.buildGrid` turns them into the grid, so moving a prop means editing its list only. Its last step, `seal()`, proves every leaf can be cleared: with all gates open it finds the cells a player can stand in, and any free cell with no standing spot within 2 m in a clear line (a slot behind a bench, say) is made solid, so neither leaves nor feet can get into it (5 cells with the present props; about 18 ms at load). **Leaves** are real objects, never removed by pointing: each has a place, a speed and a tumble, and leaves the garden only by being carried to a compost bin in the sack or by reaching a mulch chute. To stay cheap, resting leaves are asleep and cost nothing; each leaf sits in one grid cell (a linked list per cell), so a tool only visits the cells it reaches; and leaves do not collide one with another: a cell is a stack (each extra leaf rests 1.4 cm higher), a cell with 26 leaves turns sliding leaves away (40 for falling ones, about 56 cm) and a leaf near the top of a stack 5 taller than a neighbour slides off onto it. A leaf never moves more than 0.22 m in a step and its new place is rounded to what the arrays hold before the wall test, so nothing gets through or into a wall. That is what makes heaps against walls and rows in front of the rake. `Leaves.blow` is the blower (a cone; force falls with distance and with angle off the middle, 13 rays stop it at walls, leaves low in a heap are sheltered), `rake` carries the leaves under the head along with it, `scoop` sends the nearest leaves in a ring to the sack (they need a clear line from the player, except a garden's last 6 leaves, so none can be stranded behind a bench), `kick` is walking through them and `pull` the Draught grates reward. A leaf is two triangles: a flat card with one of four leaf shapes cut out of it (alpha test) by a 256 px atlas drawn in the page, tinted per leaf. They are drawn as instanced meshes, one per garden and leaf shape (20 draw calls); each mesh keeps its leaves in the order of the 4 m tile they started in and only the tiles where something moved are sent to the graphics card each frame. On top is one see-through 'litter' sheet whose opacity comes from a texture with one pixel per cell, so cleared ground looks clean about a second after its leaves go. **How many leaves** is the quality setting, in leaves per square metre of open ground (`WR.QUALITY`): Low 14 (27,600 leaves in the whole garden), Medium 24 (47,300), High 40 (78,800); Medium and High have a real shadow map from the low sun, drawn once (nothing that casts a shadow moves, except a gate opening), and Low has soft dark patches under the trees instead. Colours are written as screen colours and lit in linear light (`WR.lin`, sRGB output, ACES tone mapping), so any new colour or canvas texture must go through `WR.lin` or be marked sRGB. Phones start on Low, computers on Medium. Measured: with a fully upgraded blower sweeping through leaves the simulation costs 0.4 / 0.5 / 0.8 ms a step (1.4 / 3.0 / 2.8 ms at 4x CPU slowdown), with up to 2,800 leaves awake at once; looking across the first garden draws about 78k / 117k / 180k triangles in about 70 draw calls. Not measured: the cost of the cut-out leaves overlapping on a real phone's graphics chip (the test machines have none). `autores.js` lowers the resolution first; if frames stay slow for 8 s after that and the player never chose a setting, the game drops one leaf tier itself and says so. An area's leaves are worth the same in total at every tier (`units`; fewer leaves are each worth more), and the sack and the hands are measured in quality-free units too (an area's `leaves` number is its size in sack units; `Leaves.fill` is what one leaf takes), so progress and prices do not depend on the setting. Changing the setting scatters the leaves that are left again and keeps each garden's percent. **Looks and feedback.** `world.js` builds the house (door, lit windows, shutters, roof, chimney), trees with a crown of rounded masses shaded light above and dark below, walls with piers and caps, slatted benches, the fountain and a painted sky with cloud and a sun glow. `models.js` has rounded gloves on sleeves: open hands and the sack, a fist on the blower's handle, and two fists and forearms that follow the rake's handle in the garden itself. The blower shows wind streaks and lifts and tumbles leaves; landing from a jump throws leaves up and out, with a burst of loose leaves and a sound when it is a real heap; a rake stroke ends with a thump and a puff of crumbs; emptying the sack pours leaves into the bin; buying something pulses the HUD; 100% is a warm flash, falling leaves and a fanfare. **Tools and money.** Hands and sack, a rake (a stroke reaches out lifted, then drags back along the ground, so it pulls) and a blower (it pushes). Acorns come from leaves: at a bin when the sack is emptied (20% more for a full sack) or at once at a chute. `UP` in `game.js` is the shed (nine upgrades and their prices) and the arrays under it are what each level does; the models in `models.js` change with them. The leaf finder (F, or by itself when under 3% of a garden is left) lights the 8 nearest leaves of the garden you are standing in, and the journal map draws a dot for every leaf on the ground. **Saved data:** one localStorage key, `windrow:v1` (JSON): `acorns`, `earned`, `up` (upgrade levels), `unlocked` and `done` (per garden; six entries now, and a save with five is given the yard, open, as the sixth), `rewards`, `bagUnits` (what is in the sack, per garden) and `bagFill`, `gone` (share of each garden cleared), `tool`, `tut` (no longer used), `seen` (which instructions have been shown), `pos`, `secs`, `binFill`, `set` (look speed, volume, quality, flipped look, whether the player chose the quality), and `leaves` with `leafMul`: for each garden that has been touched, a base64 string of two 16-bit numbers a leaf (centimetres from the corner of the garden; 65535 = gone), about 250 KB at Medium and 420 KB at High once every garden has been disturbed; a leaf saved against a wall is stepped back out of it on loading. An untouched garden saves nothing and is scattered again from its seed. It saves 8 s after a change, on pause, and when the tab is hidden or closed. Keys are rebindable (`keybinds:windrow`); `autores.js` keeps its own scale. It is not in `account-nudge.js`'s KEYS, so it does not follow a Google account to another device, and it has no row in `leaderboard.js` or `miles.js`. **Touch:** `body.touch` is set on the first touch and shows `#touch` (left stick, Use, Jump, Run and Kneel once earned, a context button for bins and gates, and finder, journal and pause top right); the three tool slots at the bottom are tappable on any device. Portrait and landscape have their own positions in the style block; a drag on the view or on the Use button looks around. `WR.test` at the bottom of `game.js` is only for test scripts (start without a click, step the simulation, hold the tool, a simulation benchmark); nothing in the game calls it. - `e63334287a3deaa3/ebbwork/`: Flood Crew (Back Room; first built as Ebbwork, and the folder, the `ebbwork:v1` save key and the names in the code keep that name), a single-player first-person flood-drainage game: each job is a flooded place, and you work out why it flooded and get it dry (three.js r187 from the site's own build with its r128 layer, then `../autores.js`; no Firebase, no rooms, no stats.js, no ads). It is our own design: the name, the six places, the tools, the prices and the text are ours. **Files:** `index.html` (the page and its styles), `game.js` (drawing, controls, sound, HUD and menus), `core.js` (everything that is not drawing, with no DOM and no three.js in it, so `node` can load it: `require('./core.js')` gives `{EWSim, EW, EWMaps}`), `es.js` (its Spanish for `../lang.js`) and `preview.jpg`. **The water (`EWSim` in `core.js`):** a grid of 0.5 m cells, each with a ground height `g`, a barrier height `bar` laid on top, a depth `d` (kept in 64-bit numbers: with 32-bit ones a slow seep into a deep cell rounded away and volume drifted) and a flow through its right and bottom edge (`fx`, `fy`). Every step (1/30 s, fixed) each edge's flow speeds up by the difference in water surface across it and slows by friction (`fric`, `damp`), no cell may give more than it holds (flows out of a cell are scaled down together), and depths change by what flowed, so volume is conserved exactly: water only appears through `add()` and leaves through `take()`. Walls are `solid` cells. A 3 mm film (`FILM`) never flows, so floors keep real puddles in their dips. Blocks of 8 × 8 cells sleep when nothing in or next to them is changing; an edge into a sleeping block carries nothing and wakes it (leaving that out loses water across the edge). A big pool takes minutes to fall fully asleep because the film keeps creeping, so sleeping saves little while a map is draining; one step with every block awake costs about 1 ms for 128 × 128 cells on a desktop, and the biggest job is 68 × 48. **A job site (`EW.World`):** built from a map's `build(b)` with metres as the unit (x east, z south): `ground`, `shape` and `noise` set heights; `surf` sets the surface type and whether it can be dug; `wall` makes solid blocks (its `kind` is only for drawing); `drain` (a `rate` in m³/s and a `cap`: how much debris blocks it fully), `sinkArea` (water there leaves the map: a ditch or storm channel), `river` (cells held at a level: a stream that both feeds and takes water), `leak` (fed by a `valve` id, or `wrench: true` for a dripping joint), `valve`, `socket`, `litter`, `flood`, `spot` (a note the player gets when they walk near, kept in the journal), `sign`, `station` (the depot's board, bench and van) and `noJob` (cells that don't count). `step(dt)` runs leaks, the river, pumps, drains, sinks, the water and the debris, in that order. Debris floats in more than 5 cm of water, drifts with the current and towards a running drain, strands when the water drops, and blocks a drain by lying within 0.85 m of it (`clog`): a drain's rate is `rate × (0.03 + 0.97 × clear^1.6)`. The job is done (`isDone`) when the water left in the job's cells, not counting the film, is at most 3% of the most there has been (`World.DONE`) and nothing is still coming in. **Tools (each one a function on the world, so a test can call it):** `rake` (push or pull debris), `scoop` and `pour` (the 30-litre bucket), `squeegee` (moves water under 7 cm one cell along), `dig` and `pile` (soft ground only, down to `DIGMAX` 0.64 m; piling uses the spoil you dug), `placeBarrier` (three cells in a row, four directions, `BARH` 0.36 m; refused on drains, ditches and the river), `placePump` / `setHose` / `placeGen` (a pump runs when it is on, has a socket or a live generator within cable reach and has a hose end; water it takes goes to the hose end's cell, so emptying into the same pool does nothing, and it only leaves the map if the hose end is on a sink or the river; a generator standing in more than 14 cm of water stops), `takeDebris` (the sack: removes debris for good), `setValve` and `fixLeak`. **The jobs (`EWMaps`, in order; a job opens when the one before has a star):** Marlow Row (a back yard: a drain buried in leaves and a split pipe with its stop tap round the side; the first play walks a new player through it with `TUT`), Pell Street (three hidden drains, a dripping joint, a paving dip that keeps a puddle), Tanners Field (allotments in a hollow with no drain: a trench through the bank to the ditch; a choked pipe that sits too high to finish the job), Fenny Underpass (a dead sump: pump from a wall socket with the hose over the crest to the storm channel, and a water main valve at the far end), Wharf Cellar (the river seeps in through a doorway: sandbags, then pump up the steps; it is dark, so `sky: 'cellar'` gives a head torch) and Mill Lane (a stream through its bank, a culvert under a raft of debris, a walled garden that needs the pump and the generator, a hollow to trench). `EWMaps.depot` is the depot: not a job, a yard with the job board, the gear bench and the van, and a puddle to try tools on. Each map has `pay`, `par` (the target time in seconds) and `needs` (what the job board suggests bringing, shown only after the player has been there once, so the first visit is for finding out). Stars: one for finishing, a second inside 1.6 × `par`, a third inside `par` with 1.5% or less left; pay is `pay × (0.6 + 0.2 × stars)`, halved when the job has been done before. **Gear** (`GEAR` in the page): tools with `slot: 1` take one of the van's five places (seven with Van racking); the rest are upgrades (more sandbags, long hose, cable reel, second pump, waders, racking). Prices are set so that one-star pay alone affords each next job's tool. **Storage:** localStorage `ebbwork:v1` only: `{v, coins, gear, load, jobs: {: {stars, best, n, seen}}, set: {sens, vol, q, inv}, tut}`; keep `v: 1` and these names working if you change it. Nothing is sent anywhere. **Drawing:** the ground and the water are each one mesh with a vertex at every cell centre and their own shaders (`terrainMat`, `waterMat`): the water's vertices carry its depth and speed, a dry cell beside water takes its neighbours' surface height with a negative depth, and the shader throws away everything shallower than 4 mm, so the shoreline is a smooth line where the surface meets the ground and no squares show. Shallow water is see-through and deep water murky; ripples follow the flow; on High graphics the scene is drawn once more upside down into a small picture (`renderReflection`) so the water mirrors the buildings, and Low reflects the sky only. Graphics: Auto starts High on computers and Low on touch screens and Chromebooks, and steps down to Low for the rest of the visit if frames stay under about 34 a second for nine seconds, after `../autores.js` has had its chance to lower the resolution (`quality`, `autoLow`); it never steps back up by itself. Walls and props are two merged meshes (`Batch`: brickwork and plain), debris is three instanced meshes, and things the player puts down are rebuilt together when they change (`rebuildDyn`). **Sound** is all made in the page with the Web Audio API (`sfx`, `audioTick`): steps and wading, splashes, raking, digging, a gulp when a drain runs shallow, the pump's hum, and a lapping that fades as the place dries. **Touch:** a walk stick on the left (push it right out to run), drag anywhere else to look, and Use, Alt, Jump, Duck, Do and Turn buttons in `#touch`, shown only on touch screens; the tool bar moves to the top there. A slow frame is caught up rather than played in slow motion: up to a quarter of a second, as up to eight water steps and the walking split into 40 ms pieces. **Tests:** `window.__ew` (the world, the player, `start(id)`, `ff(seconds)` to run the water ahead, `use()`, `select()`) is for tests and tuning from the console. To check a changed map can still be finished, load `core.js` in node, build `new EW.World(map)` and call the tool functions and `step(1/30)` until `isDone()`; every job was checked that way when it was made. **To add a job:** push a map onto `MAPS` in `core.js` after the last one (ids are saved, so never rename or reorder them), give it `needs`, `pay` and `par`, put its Spanish in `es.js`, and finish it with a node script before trying it by hand. - `e63334287a3deaa3/daily/`: Daily Puzzles (Back Room), the dashboard for every daily puzzle. No libraries, no network except stats.js. `DAILY_GAMES` at the top of the script lists every daily game (`slug` = folder = storage key `daily:`, name, icon, `cat`: word, geo, logic, est (Estimation) or soccer, a one-line blurb, `ready`), plus `EXTRA` link cards under Play together (Puffer Party, `chip` in place of a daily status). Tiles only show for `ready:true` games, and "Coming soon" ones are listed under each category; flip `ready` when a game's folder lands. For each game it reads the shared record `daily:` (written by the game when a daily ends: `{ v:1, days:{YYYYMMDD:{done,win,score,tries,time}}, played, wins, streak, maxStreak, last, dist }`) and shows today's status (Not played, Solved in N / in m:ss, Done, or Missed) and the game's 🔥 streak (only while its last win was today or yesterday). Deepword is read from its own `deepword:` keys. The summary counts today's finished puzzles, the overall streak (days in a row, ending today or yesterday, with at least one daily done, worked out from every game's `days`), and counts down to local midnight; when every ready game is done it shows an "All done today" banner. stats.js (`data-game="daily"`): `max('streak', overall)` and `add('done', 1)` once per game per day (remembered in `daily-hub:counted`). It re-reads storage when the tab comes back into view or another tab writes, so finishing a puzzle in another tab updates it. Test hook: `window.__dh` under webdriver (`setToday`, `render`, `streakOverall`). A game whose win shouldn't read "Solved in " gives a `show` template (`{tries}`, `{score}`, `{time}`; `{score|hint}` adds the word, plural unless the number is 1, and `zero` is the text used when the number is 0): Crosslet shows its time, Ninefold puzzles solved of 3, Crossbar squares, Stat Duel calls right, Top Bins entries found, Quartets mistakes (Perfect for none), Sleight hints, Poopdle moves, Mainstream its points, Yardstick its total out of 500 and Thereabouts its average miss (`{score|x100}`: a score saved as a hundred times a decimal, so 137 reads "1.37×"). A missed puzzle's tile has the finished look but no ✓. Poopdle and Thereabouts are under Logic. `RETIRED`, under `DAILY_GAMES`, holds the daily puzzles taken off the list on 18 Nov 2026 (the least played; see the Back Room page above): they have no tile and aren't in today's total, but their records still count toward the overall streak, so taking a puzzle off never shortens anyone's streak, and a category with nothing listed (Soccer, for now) isn't shown. To bring one back, move its line back into `DAILY_GAMES`. The daily games don't have Back Room or phone-page cards of their own: the Daily Puzzles card and tile are the way in (the phone thumbnails in `m/thumbs/` are kept for if they ever do). - `e63334287a3deaa3/hunch/`: Hunch (Back Room, a daily puzzle on the Daily Puzzles page), a five-letter word guess in six tries, like Wordle. No libraries, no network: `words.js` holds `window.WORDS5 = { ANSWERS, GUESSES }` as space-separated strings, 2,019 answers (common, school-safe, no plurals) and 6,334 more allowed guesses (8,353 in all), written for the site and checked by a script (five letters a–z, no repeats, every answer also a guess, a blocklist for rude words). `ANSWERS` is already in daily order (a fixed seeded shuffle): day n after 1 November 2026 (puzzle #n+1, from the player's local date) uses `ANSWERS[n % length]`, so new answers must be **appended** to keep past days unchanged. Scoring marks greens first, then yellows only for as many copies as the answer has left. Hard mode (Settings, only before a game's first guess) makes every green stay put and every found letter be reused; High contrast swaps green/yellow for orange/blue. Unlimited mode picks random answers and never touches daily stats. Storage: the shared daily record `daily:hunch` (`{ v:1, days:{YYYYMMDD:{done,win,score,tries,time,hard?}}, played, wins, streak, maxStreak, last, dist }`, 60 days kept; the Daily Puzzles page reads it), the day in progress `hunch:day` (`{ d, g:[guesses], hard, t0 }`), Unlimited `hunch:free`, settings `hunch:settings`, `hunch:seen` (how-to shown) and `hunch:mode`. stats.js (`data-game="hunch"`): `add('wins')`, `max('streak')`, `min('fewest')`. The page is generated from the same engine as Fourcast (`CFG` at the top of the script: boards, rows, offset); keep the two in step when fixing the engine. Tile size is worked out in `fit()` (bigger of the layouts that fit); on a sideways phone the keyboard sits right of the board. Test hooks: `window.__wg` under webdriver (`setToday('YYYYMMDD')`, `type(word)`, `score`, …). Thanksgiving Day 2026 (`TG_DAY`) has its own answer, FEAST, set in `answersFor` for Hunch only; every other day and Fourcast are unchanged. **Spanish:** `es.js` has its words (lang.js), with a language switch in Settings; the words are English by design and tagged "En inglés". diff --git a/e63334287a3deaa3/windrow/js/game.js b/e63334287a3deaa3/windrow/js/game.js index 6c8e6f7f..45abf7a3 100644 --- a/e63334287a3deaa3/windrow/js/game.js +++ b/e63334287a3deaa3/windrow/js/game.js @@ -11,9 +11,9 @@ /* ---------- upgrades (the shed) ---------- */ var UP = WR.UPGRADES = [ - { id: 'sack', name: 'Bigger sack', text: 'Carry more leaves before a trip to the bin', costs: [35, 110, 260, 600, 1300] }, - { id: 'hands', name: 'Quick hands', text: 'Gather faster and reach wider', costs: [15, 60, 180, 480] }, - { id: 'rake', name: 'Rake', text: 'Drags a whole row of leaves toward you with every stroke', costs: [40] }, + { id: 'sack', name: 'Bigger sack', text: 'Carry more leaves before a trip to the bin', costs: [40, 110, 260, 600, 1300] }, + { id: 'hands', name: 'Quick hands', text: 'Gather faster and reach wider', costs: [25, 80, 200, 500] }, + { id: 'rake', name: 'Rake', text: 'Drags a whole row of leaves toward you with every stroke', costs: [60] }, { id: 'rakeW', name: 'Wider rake', text: 'A broader head moves more leaves a stroke', costs: [120, 320, 800], needs: 'rake' }, { id: 'blower', name: 'Leaf blower', text: 'Pushes leaves away in a cone of wind', costs: [350] }, { id: 'power', name: 'Stronger motor', text: 'The blower pushes harder', costs: [300, 700, 1500], needs: 'blower' }, @@ -21,7 +21,7 @@ { id: 'value', name: 'Rich compost', text: 'Every leaf pays 15% more', costs: [90, 220, 500, 1100, 2400] }, { id: 'shoes', name: 'Light boots', text: 'Walk 10% faster', costs: [70, 190, 450] } ]; - var SACK = [30, 55, 90, 140, 210, 320], HAND_RATE = [9, 14, 21, 30, 42], HAND_REACH = [0.95, 1.1, 1.25, 1.45, 1.7]; + var SACK = [30, 55, 90, 140, 210, 320], HAND_RATE = [4, 9, 17, 27, 40], HAND_REACH = [0.95, 1.1, 1.25, 1.45, 1.7]; var RAKE_W = [1.0, 1.4, 1.9, 2.5], BLOW_P = [20, 28, 38, 50], BLOW_R = [4.5, 5.8, 7.2, 9], BLOW_H = [0.3, 0.36, 0.42, 0.5]; WR.sackCap = function (s) { return SACK[s.up.sack]; }; WR.rakeWidth = function (s) { return RAKE_W[s.up.rakeW]; }; var TOOL_NAMES = ['Hands', 'Rake', 'Blower']; @@ -210,7 +210,7 @@ if (room <= 0) { fullT -= dt; if (fullT <= 0) { fullT = 2.5; Au.full(); $('hBag').classList.remove('shake'); void $('hBag').offsetWidth; $('hBag').classList.add('shake'); } } else { handAcc += HAND_RATE[state.up.hands] / per * (kneeling ? 2 : 1) * dt * 1.15; var n = Math.floor(handAcc); - if (n > 0) { handAcc -= n; var took = leaves.scoop(tx, tz, reach, Math.min(n, room), p.x, p.z, leaves.alive[curArea] <= 6); if (took) { handAnim = 1; if (!state.seen.grab) { grabbed += took; if (grabbed >= 25) { state.seen.grab = 1; hudT = 0; } } } } + if (n > 0) { handAcc -= n; var took = leaves.scoop(tx, tz, reach, Math.min(n, room), p.x, p.z, leaves.alive[curArea] <= 6); if (took) { handAnim = 1; if (!state.seen.grab && state.bagFill >= cap * 0.5) { state.seen.grab = 1; hudT = 0; } } } } } else handAcc = 0; handAnim = Math.max(0, handAnim - dt * 3);