diff --git a/README.md b/README.md index bd1ac441..cbdf6c25 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/mainstream/`: Mainstream (Back Room, a daily puzzle on the Daily Puzzles page), Deepword turned upside down: ten prompts a day ("Name a capital city in Europe"), 30 seconds each, and the aim is the answer **most** people would give. The player types (no choices); an answer that isn't accepted can be tried again while the clock runs, the first accepted answer is final, and they can pass. No libraries, no network, no Firebase, no multiplayer; it uses the daily word games' shell (`../wordplay/kit.js` and `kit.css`). **Answers** come from Deepword's bank: the page loads `../deepword/prompts.js` (never edits or copies it) and has the same `norm`, `parseList`, `safeRe`, `oneOff` and `nearMiss`, so the same spellings, stray plurals and small typos count. **Boards:** `boards.js` sets `window.MAINSTREAM_BOARDS`, 342 rows of `[question, [ten answers], optional {extra spelling: board answer}]`: the question must be, word for word, one of the bank's questions, and the ten answers are that prompt's most common answers in order, written the way they should be shown (any accepted spelling). **The boards are prepared estimates, not survey results and not what players answered**, and the page says so (How to play, the start card, under every board): they started from the bank's commonness weights (5 = what most people say first) and the order inside a weight is a judgement call, tilted towards what a US school pupil would say. Chosen prompts are plain categories only (no letter filters, no word puzzles), each with 25 or more accepted answers; prompts where an obvious answer is missing from the bank were left out (for example "something you could find in space", which has no "planet"). The extra-spelling map is for the few lists where the bank holds one thing twice ("bike" and "bicycle" under "something with wheels"); a stray plural of a board answer also scores as that answer even where the bank lists the plural separately ("brownie" and "brownies"). **`node check.js`** (in the folder, no libraries) reads both files the way the page does and fails if a question isn't in the bank, a prompt has under 25 accepted answers, a board doesn't have ten answers, a board answer isn't accepted, two board answers are the same answer, or there aren't 250 to 350 boards; run it after editing `boards.js` **or Deepword's bank**. If a board stops matching the bank anyway, the page leaves that prompt out rather than score it wrongly. **Scoring (version 1, `SV`):** board places 1 to 10 score 100, 84, 70, 58, 48, 40, 32, 26, 20, 16; an accepted answer off the board scores 10; a pass or a time-out 0. Prompts 1 to 3 count ×1 ("Spring"), 4 to 7 ×2 ("Stream") and 8 to 10 ×3 ("River"), so a perfect run is 2,000 and the last three prompts are 45% of it. Bands: Up the creek (under 500), Backwater (500+), In the flow (1,000+), Main current (1,400+), Full flow (1,700+), Pure mainstream (1,900+). A daily run of 1,000 or more is the "win" that keeps the streak (below that the Daily Puzzles tile reads Missed, like the other scored dailies). The table, the bands and the weights are this game's own. **Which ten:** `dailyPicks(day)` deals the whole list out ten a day: each cycle of 34 days shuffles every category with a seed (`mainstream-cycle--`), lays the categories end to end and gives day d every 34th prompt from position d, so no prompt comes back inside a cycle, every day mixes all seven categories (three from one at most), and everyone gets the same ten in the same order; 340 of the 342 are used each cycle. **Adding, removing or reordering rows changes which prompts future days get** (a day already started keeps its ten, saved by their questions). Unlimited deals ten random prompts, two a category at most, and never writes anything. **The clock** counts only while the page is on screen and no window (How to play, Statistics) is open, and the prompt is blurred while one is; an answer sent up to 0.7 s after zero still counts, and an accepted answer still in the box when time runs out counts too. A reload in the middle of a prompt comes back to a "Carry on" card with the time that was left. **The strip under the mode switch** is the run drawn as a river in ten stretches that widen with the multiplier; a finished stretch is filled as far as that answer placed (the top answer fills the channel, an off-board answer is a thread, a pass or time-out a dry dashed bed). After each answer the board shows all ten with bars as long as their points, the player's row marked; the results list opens each prompt's board again. On a phone the Enter and Pass buttons don't take the cursor out of the box (the keyboard stays up between tries), the keyboard drops for the board, a phone on its side gets the board in two columns, and under 300 px of height (sideways with the keyboard up) only the prompt, the clock and the box show. Reduced motion turns off the row, fill and shake animations. Storage: the shared daily record `daily:mainstream` (`score` = points, `tries` = top answers, `dist` = band 0 to 5, 0 the best), `mainstream:day` (`{ v, sv, day, picks: [questions], res: [{ a: answer shown, r: place 1-10, 0 off the board, -1 passed, -2 out of time }], left: ms left on the prompt being asked, done }`; points are worked out again from `r`), `mainstream:stats` (`{ v, runs, sum, best, tops, hits, asked, days: { YYYYMMDD: { sv, s, r } } }`, 60 days kept, each with the scoring version it was scored under) and `mainstream:seen`. It doesn't load `stats.js` (which talks to Firebase) and has no Leaderboards entry yet; adding both later is one line each. A test hook (`window.__ms`) exists only when `navigator.webdriver` is set, and `window.__WP_TODAY` sets the day as in the other kit games. **Spanish:** `es.js` has its words (lang.js), the shared shell's included; text built in code goes through `TR()` and the page redraws on a switch. The prompts and board answers come from Deepword's English bank and stay English (`data-noi18n`, tagged "En inglés"). - `e63334287a3deaa3/lunge-line/`: Lokop (Back Room; first released as Lunge Line, and the folder, the room prefix `gd`, the `lungeline:` storage keys, `keybinds:lunge-line` and the stats id `lunge-line` all keep that name on purpose, so saved settings, stats, leaderboard rows and invite links carry over), an 8-bit side-on sword tug-of-war for two (one small canvas, Web Audio, no libraries; Firebase Realtime Database, same project and rules as Rumble Karts, prefix `gd`; invite links go through the home page as `#gd-`; Quick match uses `rooms/gd-pub-1` to `gd-pub-6`, preferring a room where someone is waiting alone, and always plays the standard rules on a random arena; in the Parties list as `{ k: 'gd', … max: 8 }`). **Rules:** one touch of a blade kills; a blade is deadly on contact (thrust, lunge, or walking or jumping into the point), unless the other blade is held at the same height in the way. Three heights (low, middle, high); moving your sword across theirs disarms them; switching into a thrust within 8 ticks of it landing is a parry (white flash, the attacker staggers). Up above high raises the sword to throw; a high guard deflects throws, crouching and rolling dodge them. **Facing:** a fencer always faces the way they last pressed and turns at once (a press the other way while standing turns on the spot; a tap the way you face is a short step; holding runs); standing still never turns you, there is no auto-turn or backpedal, so walking away turns your back; the finisher and stomp only work facing the fencer on the floor (or standing over them). **Going down:** a tap of down lowers the sword one height; holding down for 8 ticks (`crouchHold`), or pressing it with the sword already low or with no sword, crouches (`p.cr`, a deep squat drawn about 40% of standing height, body 22 px high instead of 54: under a middle or high blade, a low one still hits; the sword is tucked in, so it neither blocks nor cuts; shuffle at `crawl`; let go to stand; `p.hd` counts how long down is held). Down while running rolls (under middle and high blades, not low ones). **The kick** (down held + attack on the ground, armed or not, with no need to wait for the crouch; state `SWEEP`, how `kick`): a 7-tick wind-up on one hand, a slide of about 60 px along the floor until tick 21 that hits with the whole leg (body to foot, 30 px ahead, so it lands from blade range out to about 100 px), then getting up until tick 36; a sword held low and facing the kick stops it (the kicker is touched); it knocks the other fencer flat and their sword flies off a short way (they can mash any button to get up sooner); it goes under a middle or high guard, but a sword held low touches the kicker first, and a low thrust started on reaction beats it. Pushing into a ledge from a jump climbs it (never out of a pit). **Hanging:** a fencer falling past an edge (`world.edges`: any corner of ground or end of a platform with a drop of 50 px or more beside it and room to stand above) whose hands (`REACH`, 50 px above the feet) pass its level within 8 px of it grabs it and hangs (state `HANG`: feet `HANG_D` = 44 px below the edge, facing it, sword put away so it neither blocks nor cuts; `p.ex`, `p.ey`, `p.es` are the edge). Holding down while falling drops past on purpose; the runner dropping into their own winning pit never grabs (anyone else does grab a pit's lip). Up or jump pulls you up (the `CLIMB` state, 14 ticks, onto the ledge 12 px in); down or a new press away from the wall lets go, and you can't grab again for `regrab` (30) ticks. You can hang as long as you like, but the hands and head come up to the ledge, so a low blade from up there touches you (a middle or high one goes over), and a kick or a stamp (attack standing over them unarmed, or with the sword up) knocks you off (`kd` with how `off`). Of several edges or ledges in reach, the nearest (then the highest) is taken, so the choice never depends on list order. Bots pull themselves up (Easy after about 0.75 s), or let go when the opponent is right below on firm ground. Unarmed: punch, the kick and dive kick (attack in the air) knock down; a high guard skewers dive kicks; attack near someone lying down finishes them. Crouching over a dropped sword picks it up (the nearest, the one in front on a tie; two reaching for one, the closer gets it). **Long stages and the camera:** each stage is a long stretch you can roam both ways (2,400 to 2,880 px; the camera shows 640 of it). The camera's focus is part of the match state (`S.cam`, with its speed `S.cv` and the runner's look-ahead `S.la`, all in `hashState`), so every mode and both online players agree on it and the rules use it. With nobody on the run it follows the midpoint of the fencers, and the edges of its 640-px window (`VIEW`) are soft walls: they stop you going further out but never push, so the two can't get more than a screen apart, but together they can walk anywhere along the stage. With a runner it looks ahead of them (`look` 150 px, so they sit about a third of the way in from the trailing edge), swings round (`lookV` 5 px a tick) only when the runner actually moves the other way (turning on the spot does nothing), and keeps a defender who is ahead of the runner in the picture; the defender can't run off its leading edge (nor more than 580 px ahead of the runner). A defender off the trailing edge for more than `lost` (45) ticks is left behind (`lost` event): they vanish with a puff (no paint, no touch, no death counted) and come back like after a touch. The camera eases (`camK`), speeds up gently (`camA`), slows in proportion to the distance left so it never overshoots, has a top speed (`camV`, 10 px a tick) and a 1.5 px dead zone; it never shows past a stage's ends; a stage change cuts straight to the new stage. The only solid walls are the two ends of the stage: the winner of the last duel (Tide right, Bloom left) passes through the end on their side into the next stage; nobody else can leave it. The loser respawns after about a third of a second (`respawn`) 250 to 320 px ahead of the runner (or, with nobody on the run, on their own side of the opponent at a similar distance), found by searching the ground (`findSpot`/`spotOK`): inside the stage and the window, on level ground with the same height a little either side, not by a ledge, not under a roof lower than 60 px, not on top of anyone; if the runner is about to leave the stage there is no room, so they wait for the next stage. Gaps kill. **The ending:** the last stage at each end finishes in a pit (the last `PIT` = 92 px of the line, `world.goal`); the fencer who has the run wins by dropping into their own end pit (`S.win`, a `win` event, and the simulation then stands still), while anyone else who falls in just dies and comes back like any other fall. The page then plays the drop: a moment of falling, a cut to a long shaft with walls and streaks rushing past and the winner tumbling (about 2.5 s, with a falling-whistle sound), then a big pixel banner " WINS" and a bar with Next game and Menu; any key (Esc goes to the menu) or a tap on the picture starts the next game with the same settings (online: back to the lobby and ready at once, winner stays on; tournament: the bracket). **Code:** everything that decides the match is in `