diff --git a/README.md b/README.md index a52509df..06484392 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the **Modes (November 2026): Duos, Trios, Creative, Box Fights and Zone Wars.** Five more ways to play with friends, made of Driftfall's own island, land shader, build pieces, editing, weapons, props and bots; Classic is the battle royale above, unchanged. **Picking one:** the menu has a Mode picker (Classic, Duos, Trios, Creative, Box Fights, Zone Wars, with the mode's options under it: Box Fights' team size 1v1 to 4v4, rounds to win 3, 5 or 7, bots fill in or off; Duos and Trios have only Bots, set in the lobby); in a party launch (party.js's room `p` + 6 characters, `partyRoom`) a mode's Bots is shown Off and locked with "No bots in party games", the host stores `bo: 0` and `modeRoster`/`sqRoster` add no bots whatever `bo` says, so Box Fights, Duos and Trios need people for two teams and wait as they do with Bots off (Creative's targets and sparring bots, which players add themselves, are unchanged); Practice (offline) plays the picked mode against practice bots, and a room you make starts in it. In a room the host (the usual host: the longest-present live player) picks the mode and its options in the lobby, and everyone sees the pick; the host presses Start (modes have no countdown, and can start with one person when bots fill in; Creative always can). Quick match rooms (`dz-pub-…`) are always Classic. The pause panel gives the host End for everyone (back to the lobby). Saved in the browser: `driftfall:mode` (the menu's pick) and `driftfall:opts:`, and Creative's loadout `driftfall:crload` and rarity `driftfall:crrar`. **Arenas:** a mode is played on its own arena, which takes the island's place while it is on (`setArena`): its own height grid in `TH` (so `terrainH`, walking, shots, builds, the land rules, bots' paths and both maps follow it unchanged), its own ground and sea meshes on the island's ground shader with its own control map (`arenaCtl`: paving with the shader's joints on the 4 m build grid, dirt tracks, darker marks), the island's trees, rocks, bushes and grass tufts (one mesh each, solid but unbreakable, in the arena's hash only), and an empty spatial hash, so none of the island's buildings, chests or pieces are there. The island's hash, ramps, heights, ground, sea, bots' grid and map picture are kept aside and put back exactly when the mode ends (`ISL`); an arena is made the first time it is needed and kept (`ARC`). Creative: a 128 m paved square at 4 m, a grassy rim with two hills, a beach. Box Fights: a flat paved circle with a fixed edge 24 m out (drawn as a low bank of the storm's cloud; nobody walks or builds past it), the two teams' boxes 8 m apart. Zone Wars: a round island about 140 m across with rolling ground and five hills (all under 15 m), rocks, pines and dirt tracks. **Creative:** unlimited scrap and ammo (∞ on the HUD), no storm, fly (the Fly key, Y, or Jump twice; Jump goes up and Fly down, Shift, goes down; on a phone FLY and DOWN buttons above the stick), Back to spawn (U), a knockout puts you back where you fell after 3 s, health and shield come back after 4 s out of a fight. Creative tools (I, or Creative tools in the pause panel): your four slots from every weapon and heal at any rarity, practice targets (stand-still bots, up to 12, put 6 m in front of you; knocked out, one stands again 2 s later), sparring bots (up to 4, put 14 m in front of you, with Box Fights' loadout and a mode bot's mind, so they come for whoever is near; knocked out, one comes back where it was put 3 s later; `pracArm`), Clear them all, Clear my builds and, for the host, Clear every build. Anyone may edit any build, and everyone in the room is in it whenever they join. **Box Fights:** two teams, Blue and Orange (colours always with the name), each starting in its own one-cell box of real build pieces (four walls, a floor and a roof, owned by the team, `T0`/`T1`: the team's to edit, anyone's to break), with a fixed loadout every round (Epic Pump Shotgun, SMG and Rifle, 3 Shield Fizz, 200 scrap, full shield); a 4 s countdown (3, 2, 1, FIGHT) with everyone frozen; no damage from team-mates (shots pass through them); last team standing takes the round, or after 2:30 the team with more health and shield left (a tie is nobody's); first to N. Team-mates are on the map and name tags are in the team's colour; a knocked-out player watches a team-mate. **Zone Wars:** everyone for themselves on random spots (`zwSpawns`) with a fixed loadout (Rare Pump Shotgun, Rifle and Drum SMG, 2 Shield Fizz, 300 scrap, 50 shield) and a fast storm (`ZW_PH`: six phases, closed in under two minutes) whose next circle jumps from a third of the way to nearly the edge of the last one, so part of it is often outside the old circle; last one standing takes the round (if the storm takes the last two together, nobody does); first to N. **Bots:** Box Fights fills each team, Zone Wars fills up to 8 (on by default, off in the options; Practice always fills). They use `botThinkM`: no loot, go for the nearest enemy (never a team-mate or a target), shoot through and break builds in the way, stay out of the storm. **Sync:** the host decides everything and puts it in its node. A mode's match state goes in a new key, `mx` (`md` the mode, `op` its options, and per round `rn` the round, `sc` the score as a string, `blue-orange` or `id:wins,…`, `tm` each roster place's team, `zs` Zone Wars' circles as `x,z,r;…`, `sid` the series, `rw` the round's winner, `fin`/`wn` at the end), while `ms` then just says lobby: pages from before the modes only read `ms`, so they sit a mode out in the lobby instead of playing it on the island, and Classic's `ms` is exactly what it was. Every page writes `gm: 1`, and only pages with it are put in a mode's roster (the lobby says how many people have an older copy). Each round is a match of its own (a new id), so `setupMatch` puts the arena, builds and everyone back between rounds and events from an old round are dropped; the boxes are built the same way on every page at a round's start, and someone arriving mid-round gets the builds as they stand from the host's build list (`bd`, whose owner field now also says 61/62 for a team's box). The host runs the bots and targets and lists them in its node (`bt`: `{id: [x, y, z, heading, pitch, health, shield, state, in hand, knockouts, 1 target / 2 sparring bot / 0, 1 down]}`), which the others draw with `netsmooth.js` like players; a bot's shots, builds and knockouts are the host's events marked `f` (the bot's id), which pages from before ignore; hits on a bot are sent to the host, as hits on a player go to that player. If the host leaves, the next one runs the bots from where they are (`takeBots`) and carries on the round and the score from the last `mx` it saw. Creative's commands (clear my builds, clear every build, add a target or a sparring bot, `fi: 1`, clear them) are events `k: 'cm'`; the host adds everyone who arrives to Creative's roster (only ever added to, so builds keep their owners in the build list). No Firebase paths or rules changed. **Stats:** the modes (Duos and Trios too) record nothing in the Leaderboards (no matches, wins, knockouts, placings or Elo; `recordStats` returns at once), so Driftfall's battle-royale boards and the miles worked from them only ever count Classic (solo). Play time is still counted by stats.js, as for any game, because it is time spent playing Driftfall. A separate set of keys would show nowhere (leaderboard.js lists only Driftfall's Classic stats) and only make every player's stats node bigger. **Cost:** an arena is one ground and one sea mesh in place of the island's, one props mesh and one tufts mesh (Creative measured 12 draw calls on the plain look); making one the first time takes a moment (its ground, sea, map and bots' grid). Nothing new is made every frame except the HUD's strings a few times a second. **Duos and Trios (`du`, `tr`):** the battle royale in teams of 2 or 3, on the island with the Drifter, loot and storm exactly as in Classic: in the code `GM` stays `'br'` and `SQ` is the team size, so everything Classic does is shared (see "Squads" in the script). Teams (`tm`, one base-36 digit per roster place) are the people in the order they joined the room (a Party that launches together joins together), filled with bots when Bots is on, plus bot teams up to 12 players (`sqRoster`); Practice is you and your bot team-mates against bot teams (6 teams of 2, 4 of 3). Online, as in Box Fights, the host runs the bots (`bt`, now also with the Drifter, falling and gliding states) and sends their shots, loot and knockouts as events marked `f`; a team's bots jump just after their person and land near them, and catch up with them when they fall 24 m behind. **No friendly fire:** shots pass through team-mates and a team-mate's hit is never applied. **Name tags:** team-mates' tags are blue and show through anything from anywhere; team-mates are blue dots on both maps; a dead player watches a team-mate. **Down, not out:** when your health runs out while someone on your team is still up, you go down instead (`dn: 1` in your node; event `k: 'dn'`): 100 health that bleeds away at 3.4 a second, crawling at a third of the speed, lying face down (lower hit boxes, a lower camera), no shooting, building, editing, opening or healing (on a phone Fire, Aim, Reload and Edit hide). A team-mate holding Use (G, or the touch button, which reads REVIVE) within 2.4 m for 4 s picks you up with 30 health (event `k: 'rv'`); bots go to a downed team-mate within 45 m and do the same, and a downed bot crawls to its nearest team-mate. Anyone else's shots, the storm or bleeding out finish you, and once nobody on the team is up everyone down on it is out. As with every hit, each browser decides this for its own player (and the host for its bots). **Winning:** the last team with anyone left (`wt` in the match state); the HUD counts teams left, the end panel shows the team's place out of the teams. The match state is in `mx`, like the other modes, so a page from before sits a Duos or Trios match out. **Tests** (`window.__dz`, webdriver only) add `GM`, `SQ`, `arenaOn`, `setArena`, `modeStart`, `botNet`, `syncBots`, `sqRoster`, `goDown`, `sqUp` and the rest of the mode functions. **Checked** in Practice for every mode (rounds, scores, boxes put back, the storm, flying, tools, targets and sparring bots, downs, revives by you and by bots, team wipes, a team win) and online with two browsers in one room for Creative (shared builds, a sparring bot, clearing), Box Fights 1v1 (a round won, the next one set up), Zone Wars (the same circles on both) and Duos (both on one team with 10 host-run bots, no friendly fire, a down seen by the team-mate and a revive by them, a host bot downed by the other player), at 1280 × 800, 375 × 812 and 812 × 375 with no console errors. Weak or not checked: Trios online, 3v3 and 4v4 Box Fights online, a host leaving mid-match in a mode (the bots carry on with the next host from where they are, with a basic loadout in Duos and Trios), a full room of 30, and a real phone; you can't pick your team (it's join order); downed players' lying pose is the falling pose on the ground. Collision rules (keep them if you touch movement): you and the Entity are boxes 0.72 m wide and 1.95 m tall; map walls, posts, pillars (0.9 m and 1.5 m), office partitions (1.25 m tall, 12 cm thick: jump onto or over them) and built walls and floors are solid boxes. A ramp is solid too (`inRamp`): a sloping sheet 0.33 m thick whose top you walk on. With the middle of a body over a ramp, the body is clear of it only on top (feet no more than a 0.6 m step below the surface, which is how you step onto the low end or land on it from a jump) or underneath with its head under the ramp's underside; anything between counts as inside the ramp, and movement never goes there: walking or jumping into a ramp from the side or from behind stops you (`rampBlocks`), under one you can only stand where there is head room (the 1.5 m under the high end) and a jump there stops at the underside, and nothing gets up through a ramp from below. (Until November 2026 ramps were walkable surfaces only and could be walked and jumped through.) Movement goes one axis at a time so you slide along walls; a move that would enter a solid is dropped unless it is a step of up to 0.6 m onto something with head room; and a frame that would move you more than 0.25 m (below about 25 fps; frames are capped at 50 ms) is split into shorter steps, so nothing as thin as a wall can be skipped over. You stand on anything your box overlaps and fall only once you are clear of it, and walking up a ramp into a floor stops you under it (if a floor dropped on you pushed you down below a ramp's surface, you can still walk back down the ramp, just not further up). The only way into a solid is a build landing on you (your own, the Entity's or another player's), and the game then shoves you out the shortest way (sideways out of a wall, up onto or down from under a floor) that ends inside the map without passing through any other wall or build on the way, rather than trapping you or letting you walk through it; the same push-out runs at spawn and on every step. A ramp that lands on you (`rampOut`) lifts you onto it if that is no more than 2 m up, so a ramp placed in the cell you are standing in puts you on it ready to climb; otherwise you are moved the shortest free way: along the slope to where there is head room underneath or to where it is low enough to step onto, out of a side, or up or down. Other players' drawn positions are clamped to the map and pushed out of solid boxes too (not ramps: each player's own page keeps them out of those), so a corner cut between two updates, or a late update carried on, never draws (or lets you shoot) someone inside a wall. Shots are rays tested against every solid, ramp surface, the floor and the ceiling before players, so they can't pass through walls or builds. - `e63334287a3deaa3/blockstorm/`: Blockstorm (Back Room), a blocky first-person shooter by GitHub user **dessyc9** (the original is at dessyc9.github.io/blockstorm), ported here with their permission. The fight is on the roofs of five sky towers above an endless city in rain and lightning, joined by eight glass maze bridges; a shove (F) can push someone off the edge. Free-for-all (most kills when the clock runs out) or capture the flag (Blue vs Red, two flags each, first to 3 captures). Everyone starts a match with the same Common guns and kills unlock the next rarity (`TIER_KILLS`: Rare at 5, Epic 10, Legendary 20, Mythic 30); a storm core on the middle tower gives a full shield and +30% damage for 15 s. The Shop (all free, new guns every day from a seeded generator) and Loadouts are the original game's and are saved in this browser only (`blockstorm_profile`); they don't change the guns used in matches. **What changed in the port:** the original's online play went through public MQTT relays (HiveMQ and EMQX, with mqtt.js from jsdelivr), a lobby hub and an "online now" list on those relays, and an owner account (a password-derived signing key, a crown, a kick button and top-tier guns for the owner). All of that is gone: online play uses the site's Firebase rooms, names come from the game's own name box (`blockstorm:name`, filled by party.js; it starts from `ol:name` or `party:name` if there is none), and the Back Room's Online, Party and Playing now panels do what the hub did. three.js is the original's r160 ES module, now from cdnjs (`three.module.min.js`): a small module puts it on `window.THREE` as a plain object, then `../autores.js` (deferred, so it runs after that module and before the game's module) wraps `THREE.WebGLRenderer` as in the other 3D games; moving the game to r128 would have meant retuning all its lighting and colours. **Online:** rooms under `rooms/bs-` in the Firebase Realtime Database (same project and rules as the other games), up to 12 people (`MAX_PLAYERS`), invite links `#bs-`. Quick match uses the public lobbies `bs-pub-1` to `4` (free-for-all) and `bs-ctf-pub-1` and `2` (capture the flag), which start by themselves with 9 medium bots, run 5 minutes and start the next match 12 s after one ends; any other code is a private room where the host picks the mode and bots (none, medium, hard, extreme) in the lobby and presses Start. A party launch (party.js's room `p` + 6 characters, `isPartyRoom`/`partyRoom`) is players only: the host keeps `bl` at 0 (also when it takes over a room an older page made), `wantedBots` gives 0 there, and the lobby shows the bots list locked on No bots with "No bots in party games"; a party of one plays the match alone. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` shirt colour, `x y z h p` position, yaw and pitch, `w` gun slot, `sc` shots fired, `lf` life number, `a` alive, `m` match, `lk` look seed, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` a hit you landed, added up per target per update, `sv` a shove, `pj` a launcher shot; from the host `kl` a kill, `hu` you were hurt, `hm` your hit killed, `kn` knockback, `bo` storm core, `ct`/`nt` feed lines). The host is the live player with the smallest `j` (a tab that was frozen for 5 s goes to the back of the line); its browser runs the match exactly as the original's host did (bots, damage, kills, clock, flags, storm core, gun tiers) and also writes `rs` (the match: `id`, `st` lobby / play / end, `md` mode, `bl` bot level, `nb` bots, `t0` start and `len` length rather than an end time, `et` when it ended), `ch` (one row per fighter: id, alive, health, shield, kills, deaths, spawn shield, best streak, team, tier, storm core, life, and where it last spawned, which is how a client is placed), `bm` (bots' names and looks), `bt` (bots' positions and shot counts), `cf` (flags and score) and `k` (storm core ready). Players send their own position about 12 times a second and the host its bots at the same rate; every fighter is drawn from those time-stamped updates with `netsmooth.js`, and others' shots are drawn from the `sc` counts. Each browser is trusted for its own position and hits, so it isn't cheat-proof. If the host leaves, the next in line takes over the match from the last state it heard, and its bots become that browser's to run; people who join mid-match take a bot's place. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths`, `mkills` (most in a match) and `wins` (online only, with at least one other real player in the match); the boards are in `leaderboard.js`. **Touch:** on touch screens a move stick, drag to look, Fire, Jump, Aim, Reload, Swap, Shove, pause and scoreboard buttons, and the gun slots at the top are tap targets; the health, gun and clock readouts move to the top so nothing sits under a thumb upright or sideways. The keyboard and mouse controls are the original's. A webdriver-only test hook is `window.__bs`. **Locker** (`locker.js`, November 2026, captains only for now): `BS_PUBLIC` near the top of the game script is the one switch that opens it to everyone; until then `kitOn()` asks `../captains.js` (`may(false,'locker','blockstorm-locker')`, test switch `?locker=1`), and `locker.js` (with `../cosmetics.js` for a captain) is only fetched for a captain or when another player in the room arrives wearing something, so for everyone else the page loads and plays exactly as before (`captains.js` in the head is the only new script). A Locker button next to New look opens 16 outfits, 7 hats and 7 gun skins (ids `bs-…` in `../cosmetics.js`), free to wear, saved as `blockstorm_kit` and sent in the player's node as `ck`, three base-36 characters (outfit, hat, gun skin; each the item's number, 0 for none); pages from before it ignore `ck`, an unknown number is the fighter's own look, and bots never wear anything. An outfit recolours the fighter's own boxes and puts 16 × 16 pixel pictures on the chest and back (numbers on sports backs, an eye patch on the face for the two pirates), so no mesh is added; every outfit's shirt is as light and bright as the plain fighters' (no dark suits in the dark city). A hat is one small mesh in place of the fighter's own cap, band or headphones. A gun skin changes only the body, grip and trim materials of the same gun (`makeGunModel(def, skin)`, `KIT.gunPal`), so the rarity stripe and glow, the muzzle and the sights stay as they were; it shows on the player's own gun and on the gun others see. Hits never depend on what is drawn. **Spanish** (lang.js): its words are in `blockstorm/es.js` (the menus are rebuilt as HTML and translated by lang.js as they appear); the flag and Storm Core lines the host sends to the room stay English on the wire and each page shows them in its own language, and gun, set, bot and loadout names stay as they are. -- `e63334287a3deaa3/sky-duel/`: Sky Duel (Back Room), an original arcade dogfighting game for up to 8 planes (three.js r128 with `../autores.js`; one self-contained `index.html`, everything drawn and synthesised in code). **Modes:** Duel (1v1), free-for-all and 2v2 (Blue vs Orange), first to the kill target (5 to 20) or most kills when the clock runs out; solo against bots, or online. **The map** is one height function (`terrainRaw`, whole-number hash noise so every browser builds the same land) sampled on a 150 × 150 grid over 6 km: green hills, lakes and sharp peaks in the west, a red-rock plateau cut by canyons in the east (`CANYONS` are the centre lines), a ring of mountains round it, and clouds you can fly through (the screen whites out inside one). `terrainH` reads the same two triangles per grid square that the mesh draws, so what you see is what you hit. Past `ARENA_R` a pilot gets 8 seconds to turn back. **Flight** (`stepPlane`) is deliberately simple: a plane is a heading, a pitch (kept within ±75°, so no loops) and a bank; it steers toward an aim direction at a turn rate that falls as speed rises, climbing costs speed, hard turns cost a little, and under `STALL` the nose drops until it has picked speed back up. Above `CEIL` the engine fades. Boost drains a meter; a barrel roll (0.8 s, 2.4 s cooldown) slides the plane sideways, makes half the bullets miss and usually shakes off a missile that is about to arrive. The ground, the water and the canyon walls are always fatal. All four planes (`PLANE_GEO`: Puffin, Swift, Heron, Dart) fly the same. They are drawn at `PLANE_SIZE` (1.15 × 1.12, made 12% bigger in November 2026), and the bullet hit sphere `HIT_R` (9 × 1.12 m) and the spawn shield grew with them, so what you see is what you hit; the hit of a bullet is decided only by the browser that fired it, so a page from before that change in the same room still agrees with everyone (its own bullets just use the old 9 m), and the missile fuse, the ground clearance and the camera are unchanged. **Weapons:** machine guns that overheat (`HEAT_UP` per shot, jammed until they cool to 35%), homing missiles that need the target held within `LOCK_CONE` of the nose for `LOCK_T` seconds (two to start, four at most, one back every 22 s), flares (a 70% chance to pull away each missile within `FLARE_R`), and rings to fly through (`PICKS`: green repairs 45 hull, orange two missiles, white two flares; back after 20 s). **HUD:** the ring is the aim, the amber cross is where the guns point, the diamond is the lead marker (where to shoot so the bullets meet the target); boxes with names, distance and hull on other planes, arrows for the ones off screen, a lock ring, a radar that turns with the plane, a kill feed and warnings (missile, stall, pull up, turn back, overheated). **Bots** (`botThink`, levels in `DIFF`: Rookie, Veteran, Ace) fly the same plane through the same controls: each frame a bot only chooses where to aim, the throttle and which buttons to press; `avoidGround` looks up to 2.6 s ahead and pulls up or turns toward lower ground. **Controls:** the mouse aims and the plane follows (pointer lock), with rebindable keys through `keybinds.js` (saved as `keybinds:sky-duel`; the arrow keys and A/D steer without a mouse); on touch screens a stick, a throttle slider and Roll, Flare, Missile, Boost and Fire buttons, with the radar, feed and score moved so nothing overlaps upright or sideways. **Online:** rooms under `rooms/vq-` in the Firebase Realtime Database (same project and rules as the other games), up to 8 people (`MAX_ROOM`), invite links `#vq-`. Quick match uses the public rooms `vq-pub-1` to `4`, which run free-for-alls by themselves (to 15 kills or 5 minutes, Veteran bots filling to 6, the next match 12 s after one ends); any other code is a private room with a briefing room where the host picks the mode, kill target, time, bots and bot level and presses Take off. In a party launch (party.js's room `p` + 6 characters, `isPartyRoom`/`partyRoom`) the Bots buttons are locked on Off with "No bots in party games", `hostStart` seats only the people (not even the one bot that normally makes a lone pilot's match two, so a party of one flies alone) and writes `fill: 0`, and `fixRoster` drops any bot and never puts one in a leaver's place. A duel is for two pilots and 2v2 for four: with more people in the room the host's choice becomes a free-for-all, and someone who joins a full duel or 2v2 watches until the next match. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` colour, `fr` plane, `x y z` position, `h p r` heading, pitch and bank, `s` speed, `f` flags (1 firing, 2 boosting, 4 rolling, 8 alive, 16 spawn shield, 32 sitting out), `hp`, `k` kills, `d` deaths, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` hits one of your planes landed, added up per target every 0.1 s; `k` one of your planes died, and who gets the credit; `m` a missile launched, `c` it lost its target, `x` it blew up; `f` a flare; `p` a ring taken). The host is the live player with the smallest `j` (a tab that is hidden while hosting moves itself to the back of the line); its node also carries `rs` (the match: `id`, `st` 0 briefing / 1 flying / 2 over, `md` mode, `kl`, `tl`, `lvl`, `fill`, `t0` start time, `sky`, `tm` who is on which team, `bl` which bot seats are in use, `rev`, `et`, `win`) and `bt` (each bot's position, flags, hull and score). Nodes are sent 10 times a second and every other plane is drawn from those time-stamped updates with `netsmooth.js`. Each browser decides the hits of its own bullets and missiles against where it sees the other planes, the browser that owns the plane hit takes the damage and announces the kill, and the killer's own browser adds the kill to its score, so nobody writes anyone else's data (and it isn't cheat-proof). If the host leaves, the next in line carries on from the last `rs` it heard and flies the bots from where they were; a newcomer takes a bot's seat and a bot takes the seat of someone who left (`fixRoster`). Solo and the dogfight behind the menu run the same code with this browser as the host. **Saved in this browser:** `skyduel-name`, `-color`, `-frame`, settings and the last room. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths` (solo and online), `mkills` (most in a match) and `wins` (online only, with at least one other person flying); the boards are in `leaderboard.js`. **Ranked:** online matches move a rating through `../elo.js` (`rateMatch`, called from `endMatch`, once per match: `id` is the room and `rs.id`): you are rated against every opponent who was still flying at the end (bots count as 1000, teammates and pilots sitting out don't count), by the final standings in a free-for-all (more kills wins, then fewer losses, equal both is a draw) and by the result in a duel or 2v2. It is only rated with at least one other real person among those opponents, and only if you flew at least a minute of the match (`RANK_MIN`, from the start or from when you joined), or were there from the start of one that ended on the kill target (before its clock ran out); it waits 1.5 s (`RANK_SETTLE`) after the end for the last scores to arrive from the other browsers, redraws the standings with them, and the host's winner always counts as having beaten you; solo, the menu's dogfight, leaving early and watching never count. The end screen shows the new rating and the change (or why the match was unranked) under the standings, as well as elo.js's own pill, and the Elo board comes first among Sky Duel's boards. Graphics has Pretty and Fast (sharpness and particle counts at once, trees and clouds on the next load); phones start on Fast. Pretty draws at up to 1.5 pixels per CSS pixel and Fast at 1 (1.25 on phones); Fast also lights the water per vertex, without Pretty's sun glint. **Drawing:** every plane goes through instanced meshes (`PLANE_INST`: a body, whose instance colour is the plane's colour, and a trim per airframe, plus `PROP_INST` and `SHIELD_INST`), all missiles through `MSL_INST` and the twelve rings through `PICK_RING`/`PICK_CORE`, so `e.mesh`, `m.mesh` and `p.mesh` are plain `Object3D`s that only hold a position and rotation, and an instanced mesh with nothing in it is hidden; the sky dome is drawn after the solid things with the depth test on (`renderOrder` 1), so its shader only runs where the sky shows. The HUD only writes to the page when a value changes (`put`, `setOp`, `setBar`). `AD_SLOT` is empty. A webdriver-only test hook is `window.__skd`. **Paint Shop** (`hangar.js`, November 2026, captains only for now): `SD_PUBLIC` near the top of the page is the one switch that opens it to everyone; until then `kitOn()` asks `../captains.js` (`may(false,'paints','skyduel-paints')`, test switch `?paints=1`), and `hangar.js` (with `../cosmetics.js` for a captain) is only fetched for a captain or when another plane in the room arrives wearing something, so for everyone else the page loads and plays exactly as before (`captains.js` in the head is the only new script). A Paint Shop button under the colour swatches opens 19 paints, 5 noses (spinner pattern and propeller tint), 6 trails and 5 shoot-down effects (ids `sd-…` in `../cosmetics.js`), free to wear, saved as `skyduel-kit` and sent in the player's node as `ck`, four base-36 characters (paint, nose, trail, shoot-down; each the item's number, 0 for none); pages from before it ignore `ck`, and an unknown number draws the plain plane. Paints are drawn in the plane shaders themselves (`BODY_MAT`/`TRIM_MAT` get an `onBeforeCompile` patch once `hangar.js` arrives): each body instance carries two more vec4s (`aSk1`, `aSk2`: colours and the paint's number) and each trim instance two for the nose, and every vertex knows its airframe's wing tips, fins and nose (`aSkF`, `aSkG`, `aSkT`), so a paint costs no draw call and the planes stay instanced; propeller tints use `PROP_INST`'s instance colour. In 2v2 paints are left off (team colours stay plain); in a duel a paint's own-colour parts take the team colour, and the HUD boxes, radar and feed keep the pilot's colour. Trails recolour the same contrail puffs (Skywriter makes them bigger with gaps), and a shoot-down effect is a burst of the game's own sprites where a plane you shot down blew up, on top of the usual explosion. No paint is sky blue, sea blue or dark: every paint was rendered on all four airframes from three angles over nine backgrounds (sky top and horizon, golden and dusk sky, water, grass, forest, red rock, cloud) and its average colour distance from each background is at least that of the hardest-to-see plain colour there; paints with a stripe in the pilot's own colour pick red, navy or yellow for it by the plane's colour so that stays true. Keep that check if you add a paint. **Cockpit view** (`CP`, November 2026): V (rebindable, `view`), the View setting in the menus or the Cockpit/Chase button on a touch screen switches between the chase camera and the pilot's seat, saved as `skyduel-view`; it only applies while your own plane is flying (the menu's dogfight, spectating and the time before a respawn use the chase camera). Looks only: nothing is sent to the room and controls, bullets and hits are unchanged. The cockpit is a small scene of its own in the plane's frame with the eye at the origin (+z the nose, +x the pilot's left), drawn in a second pass after the world (`CP.render`: depth cleared, its own camera with a 4 cm near plane), so the world keeps its depth precision; your plane is left out of the world pass (`mine` in `drawEnts`) and drawn in the cockpit pass instead, so you see your own nose, wings, struts and a faint propeller disc. `EYE` is where the pilot sits in each airframe and `STYLE` its canopy (open biplane cockpit, fighter windscreen, cabin, jet bubble); the canopy glass from `buildPlanes` is cut out of the trim seen from inside (`GLASS`, `noGlass`), so keep `GLASS` in step if an airframe's glass moves. The reflector gunsight (a head-up glass on the Dart) has its reticle dead ahead along the guns, so the amber gun cross and the HUD bars are hidden in this view (`#hud.cockpit`). The instrument panel works: airspeed, attitude, altimeter, RPM (thrust on the Dart), heading and climb, gun temperature and hull, plus lamps for lock, incoming missile, stall and overheated guns, a boost bar and missile/flare lights. The dial faces are drawn once into a canvas; the needles are one mesh rewritten every frame, the attitude ball and heading card are discs whose picture is moved, and the lamps' small canvas is re-uploaded only when a lamp changes. The head turns part of the way toward your aim (as a pilot looks into a turn), the view shakes slightly when firing, boosting or near an explosion, hard pulls push the eye down a little and darken the edges (`#gvign`); none of that motion with reduced motion on. Upright phones get a wider view so the whole panel fits. Everything is built the first time the view is used; it costs about 10 more draw calls and six small textures. `window.__skd.CP` is exposed for tests. **Spanish** (lang.js): its words are in `sky-duel/es.js`, banners, warnings, the lock ring and the scores go through `TX()` (those HUD parts are `data-noi18n`), and plane names and bot callsigns stay as they are. +- `e63334287a3deaa3/sky-duel/`: Sky Duel (Back Room), an original arcade dogfighting game for up to 8 planes (three.js r128 with `../autores.js`; one self-contained `index.html`, everything drawn and synthesised in code). **Modes:** Duel (1v1), free-for-all and 2v2 (Blue vs Orange), first to the kill target (5 to 20) or most kills when the clock runs out; solo against bots, or online. **The map** is one height function (`terrainRaw`, whole-number hash noise so every browser builds the same land) sampled on a 150 × 150 grid over 6 km: green hills, lakes and sharp peaks in the west, a red-rock plateau cut by canyons in the east (`CANYONS` are the centre lines), a ring of mountains round it, and clouds you can fly through (the screen whites out inside one). `terrainH` reads the same two triangles per grid square that the mesh draws, so what you see is what you hit. Past `ARENA_R` a pilot gets 8 seconds to turn back. **Flight** (`stepPlane`) is deliberately simple: a plane is a heading, a pitch (kept within ±75°, so no loops) and a bank; it steers toward an aim direction at a turn rate that falls as speed rises, climbing costs speed, hard turns cost a little, and under `STALL` the nose drops until it has picked speed back up. Above `CEIL` the engine fades. Boost drains a meter; a barrel roll (0.8 s, 2.4 s cooldown) slides the plane sideways, makes half the bullets miss and usually shakes off a missile that is about to arrive. The ground, the water and the canyon walls are always fatal. All four planes (`PLANE_GEO`: Puffin, Swift, Heron, Dart) fly the same. They are drawn at `PLANE_SIZE` (1.15 × `PLANE_GROW`, which is 1.12 × 1.15: made 12% bigger in November 2026 and 15% more after that), and the bullet hit sphere `HIT_R` (9 × `PLANE_GROW`, 11.6 m), the spawn shield, the HUD boxes and the Paint Shop pictures (`pvShot` scales its distances by `PLANE_SIZE`) grew with them, so what you see is what you hit; the cockpit view scales with it too (`EYE` and `GLASS` are in built units). The hit of a bullet is decided only by the browser that fired it, so a page from before a change in the same room still agrees with everyone (its own bullets just use its older radius), and the missile fuse, the ground clearance (the lowest belly is still 1.6 m under the centre, inside the 2.2 m) and the camera are unchanged. **Weapons:** machine guns that overheat (`HEAT_UP` per shot, jammed until they cool to 35%), homing missiles that need the target held within `LOCK_CONE` of the nose for `LOCK_T` seconds (two to start, four at most, one back every 22 s), flares (a 70% chance to pull away each missile within `FLARE_R`), and rings to fly through (`PICKS`: green repairs 45 hull, orange two missiles, white two flares; back after 20 s). **HUD:** the ring is the aim, the amber cross is where the guns point, the diamond is the lead marker (where to shoot so the bullets meet the target); boxes with names, distance and hull on other planes, arrows for the ones off screen, a lock ring, a radar that turns with the plane, a kill feed and warnings (missile, stall, pull up, turn back, overheated). **Bots** (`botThink`, levels in `DIFF`: Rookie, Veteran, Ace) fly the same plane through the same controls: each frame a bot only chooses where to aim, the throttle and which buttons to press; `avoidGround` looks up to 2.6 s ahead and pulls up or turns toward lower ground. **Controls:** the mouse aims and the plane follows (pointer lock), with rebindable keys through `keybinds.js` (saved as `keybinds:sky-duel`; the arrow keys and A/D steer without a mouse); on touch screens a stick, a throttle slider and Roll, Flare, Missile, Boost and Fire buttons, with the radar, feed and score moved so nothing overlaps upright or sideways. **Online:** rooms under `rooms/vq-` in the Firebase Realtime Database (same project and rules as the other games), up to 8 people (`MAX_ROOM`), invite links `#vq-`. Quick match uses the public rooms `vq-pub-1` to `4`, which run free-for-alls by themselves (to 15 kills or 5 minutes, Veteran bots filling to 6, the next match 12 s after one ends); any other code is a private room with a briefing room where the host picks the mode, kill target, time, bots and bot level and presses Take off. In a party launch (party.js's room `p` + 6 characters, `isPartyRoom`/`partyRoom`) the Bots buttons are locked on Off with "No bots in party games", `hostStart` seats only the people (not even the one bot that normally makes a lone pilot's match two, so a party of one flies alone) and writes `fill: 0`, and `fixRoster` drops any bot and never puts one in a leaver's place. A duel is for two pilots and 2v2 for four: with more people in the room the host's choice becomes a free-for-all, and someone who joins a full duel or 2v2 watches until the next match. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` colour, `fr` plane, `x y z` position, `h p r` heading, pitch and bank, `s` speed, `f` flags (1 firing, 2 boosting, 4 rolling, 8 alive, 16 spawn shield, 32 sitting out), `hp`, `k` kills, `d` deaths, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` hits one of your planes landed, added up per target every 0.1 s; `k` one of your planes died, and who gets the credit; `m` a missile launched, `c` it lost its target, `x` it blew up; `f` a flare; `p` a ring taken). The host is the live player with the smallest `j` (a tab that is hidden while hosting moves itself to the back of the line); its node also carries `rs` (the match: `id`, `st` 0 briefing / 1 flying / 2 over, `md` mode, `kl`, `tl`, `lvl`, `fill`, `t0` start time, `sky`, `tm` who is on which team, `bl` which bot seats are in use, `rev`, `et`, `win`) and `bt` (each bot's position, flags, hull and score). Nodes are sent 10 times a second and every other plane is drawn from those time-stamped updates with `netsmooth.js`. Each browser decides the hits of its own bullets and missiles against where it sees the other planes, the browser that owns the plane hit takes the damage and announces the kill, and the killer's own browser adds the kill to its score, so nobody writes anyone else's data (and it isn't cheat-proof). If the host leaves, the next in line carries on from the last `rs` it heard and flies the bots from where they were; a newcomer takes a bot's seat and a bot takes the seat of someone who left (`fixRoster`). Solo and the dogfight behind the menu run the same code with this browser as the host. **Saved in this browser:** `skyduel-name`, `-color`, `-frame`, settings and the last room. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths` (solo and online), `mkills` (most in a match) and `wins` (online only, with at least one other person flying); the boards are in `leaderboard.js`. **Ranked:** online matches move a rating through `../elo.js` (`rateMatch`, called from `endMatch`, once per match: `id` is the room and `rs.id`): you are rated against every opponent who was still flying at the end (bots count as 1000, teammates and pilots sitting out don't count), by the final standings in a free-for-all (more kills wins, then fewer losses, equal both is a draw) and by the result in a duel or 2v2. It is only rated with at least one other real person among those opponents, and only if you flew at least a minute of the match (`RANK_MIN`, from the start or from when you joined), or were there from the start of one that ended on the kill target (before its clock ran out); it waits 1.5 s (`RANK_SETTLE`) after the end for the last scores to arrive from the other browsers, redraws the standings with them, and the host's winner always counts as having beaten you; solo, the menu's dogfight, leaving early and watching never count. The end screen shows the new rating and the change (or why the match was unranked) under the standings, as well as elo.js's own pill, and the Elo board comes first among Sky Duel's boards. The briefing room also shows your current rating after the room code (`BackRoomElo.get()`, "Your rating"), so it's in view before a match too. Graphics has Pretty and Fast (sharpness and particle counts at once, trees and clouds on the next load); phones start on Fast. Pretty draws at up to 1.5 pixels per CSS pixel and Fast at 1 (1.25 on phones); Fast also lights the water per vertex, without Pretty's sun glint. **Drawing:** every plane goes through instanced meshes (`PLANE_INST`: a body, whose instance colour is the plane's colour, and a trim per airframe, plus `PROP_INST` and `SHIELD_INST`), all missiles through `MSL_INST` and the twelve rings through `PICK_RING`/`PICK_CORE`, so `e.mesh`, `m.mesh` and `p.mesh` are plain `Object3D`s that only hold a position and rotation, and an instanced mesh with nothing in it is hidden; the sky dome is drawn after the solid things with the depth test on (`renderOrder` 1), so its shader only runs where the sky shows. The HUD only writes to the page when a value changes (`put`, `setOp`, `setBar`, `css`, and `txt` for text, which rewrites the element's one text node instead of swapping nodes, because every swap wakes lang.js's page-wide watcher); the distance under each HUD box changes at most five times a second, and the keyboard bindings aren't looked up while no key is down. `AD_SLOT` is empty. A webdriver-only test hook is `window.__skd`. **Paint Shop** (`hangar.js`, November 2026, captains only for now): `SD_PUBLIC` near the top of the page is the one switch that opens it to everyone; until then `kitOn()` asks `../captains.js` (`may(false,'paints','skyduel-paints')`, test switch `?paints=1`), and `hangar.js` (with `../cosmetics.js` for a captain) is only fetched for a captain or when another plane in the room arrives wearing something, so for everyone else the page loads and plays exactly as before (`captains.js` in the head is the only new script). A Paint Shop button under the colour swatches opens 19 paints, 5 noses (spinner pattern and propeller tint), 6 trails and 5 shoot-down effects (ids `sd-…` in `../cosmetics.js`), free to wear, saved as `skyduel-kit` and sent in the player's node as `ck`, four base-36 characters (paint, nose, trail, shoot-down; each the item's number, 0 for none); pages from before it ignore `ck`, and an unknown number draws the plain plane. Paints are drawn in the plane shaders themselves (`BODY_MAT`/`TRIM_MAT` get an `onBeforeCompile` patch once `hangar.js` arrives): each body instance carries two more vec4s (`aSk1`, `aSk2`: colours and the paint's number) and each trim instance two for the nose, and every vertex knows its airframe's wing tips, fins and nose (`aSkF`, `aSkG`, `aSkT`), so a paint costs no draw call and the planes stay instanced; propeller tints use `PROP_INST`'s instance colour. In 2v2 paints are left off (team colours stay plain); in a duel a paint's own-colour parts take the team colour, and the HUD boxes, radar and feed keep the pilot's colour. Trails recolour the same contrail puffs (Skywriter makes them bigger with gaps), and a shoot-down effect is a burst of the game's own sprites where a plane you shot down blew up, on top of the usual explosion. No paint is sky blue, sea blue or dark: every paint was rendered on all four airframes from three angles over nine backgrounds (sky top and horizon, golden and dusk sky, water, grass, forest, red rock, cloud) and its average colour distance from each background is at least that of the hardest-to-see plain colour there; paints with a stripe in the pilot's own colour pick red, navy or yellow for it by the plane's colour so that stays true. Keep that check if you add a paint. **Cockpit view** (`CP`, November 2026): V (rebindable, `view`), the View setting in the menus or the Cockpit/Chase button on a touch screen switches between the chase camera and the pilot's seat, saved as `skyduel-view`; it only applies while your own plane is flying (the menu's dogfight, spectating and the time before a respawn use the chase camera). Looks only: nothing is sent to the room and controls, bullets and hits are unchanged. The cockpit is a small scene of its own in the plane's frame with the eye at the origin (+z the nose, +x the pilot's left), drawn in a second pass after the world (`CP.render`: depth cleared, its own camera with a 4 cm near plane), so the world keeps its depth precision; your plane is left out of the world pass (`mine` in `drawEnts`) and drawn in the cockpit pass instead, so you see your own nose, wings, struts and a faint propeller disc. `EYE` is where the pilot sits in each airframe and `STYLE` its canopy (open biplane cockpit, fighter windscreen, cabin, jet bubble); the canopy glass from `buildPlanes` is cut out of the trim seen from inside (`GLASS`, `noGlass`), so keep `GLASS` in step if an airframe's glass moves. The reflector gunsight (a head-up glass on the Dart) has its reticle dead ahead along the guns, so the amber gun cross and the HUD bars are hidden in this view (`#hud.cockpit`). The instrument panel works: airspeed, attitude, altimeter, RPM (thrust on the Dart), heading and climb, gun temperature and hull, plus lamps for lock, incoming missile, stall and overheated guns, a boost bar and missile/flare lights. The dial faces are drawn once into a canvas; the needles are one mesh rewritten every frame, the attitude ball and heading card are discs whose picture is moved, and the lamps' small canvas is re-uploaded only when a lamp changes. The head turns part of the way toward your aim (as a pilot looks into a turn), the view shakes slightly when firing, boosting or near an explosion, hard pulls push the eye down a little and darken the edges (`#gvign`); none of that motion with reduced motion on. Upright phones get a wider view so the whole panel fits. Everything is built the first time the view is used; it costs about 10 more draw calls and six small textures. `window.__skd.CP` is exposed for tests. **Spanish** (lang.js): its words are in `sky-duel/es.js`, banners, warnings, the lock ring and the scores go through `TX()` (those HUD parts are `data-noi18n`), and plane names and bot callsigns stay as they are. - `e63334287a3deaa3/spire/`: Spire (Back Room), an obby-style parkour race up a tower stacked from random sections (Three.js, Firebase Realtime Database rooms under `rooms/tw-…`, same project and rules as Rumble Karts; Quick match uses `rooms/tw-pub-1` to `tw-pub-4`; invite links go through the home page as `#tw-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, each optionally moving by `line`, `spin` or `orbit`, timed, crumbling, lethal, bouncy, a conveyor, a climbable truss, `ice` (on the ground you speed up at `ICE_ACC` and slow at `ICE_DEC`, so you slide), a launch pad (`boost`: landing or stepping on it sets your velocity to that vector, and the take-off speed that caps air control is measured again from it) or a wind zone (`zone: 'wind'` with a `wind` vector, usually timed: while it's on it carries you like a conveyor, in the air too)), the section library (`MODS`), towers (`buildTower`), the obby (`buildObby`, `WORLDS`) and the checking bot; it has no DOM or Three.js in it, so a test can run it on its own. Physics is a fixed 120 Hz step with the player as an upright cylinder; moving parts are placed by time alone, so every player who shares the round clock sees the same tower. A jump reaches 3.37 (3.67 counting the pop onto a ledge just above your feet) and you run at 7.5. In the air the stick only nudges you (`airControl`): measured against the way you're flying, it speeds you up (`AIR_ACC`, but never past your take-off speed, or the walk speed if that was slower), turns you (`AIR_TURN`) and slows you (`AIR_BRAKE`), so holding back stops a running jump instead of turning you round, and holding sideways for a whole jump moves you about 2.3; from a standing jump the stick gets the full `AIR_ACC`. Sections keep the step from one route part to the one after next above 3.67 (a big jump can't skip a part), keep beams longer than a running jump, and make hazards too tall or too fast to simply hop. When changing a section, also try running jumps (with the real `simStep`) from each part of its route to every later one, to make sure none can be skipped. A section can offer a second way through: Fork in the Road has a slow lift and a gold shortcut (a narrow beam through a laser, a truss and two pillars, with a SHORTCUT sign, from a part's `sign`); its `build` takes a fourth argument `alt` that routes the bot through the shortcut, and `verifyModule(id, d, mir, t0, seed, alt)` checks that way too. Each section in `MODS` is built in its own frame: it starts on the 4 × 4 pad centred at (0, 0, 8) and must end with `B.exit(H)`, its exit pad at (0, H, -8), staying inside radius 12.5 and above y = 0. Towers are versioned so everyone in a room builds the same one: `towerPlan(seed, n, easy, v)` with `v` 1 is the original 19 sections in the original order (kept exactly, for a host on an older copy of the page), and `v` 2 (`TOWER_V`) adds Gust Gaps, Ice Steps, Launch Pads and Fork in the Road (marked `v: 2` in `MODS`) and climbs steadily: each slot takes the unused section whose difficulty is nearest a target rising from 1.4 to 4 (with a little chance mixed in), and the tightness `d` rises from about 0.12 to 0.72. Towers turn every other section 180° and may mirror any, and between sections there is a porch, a truss and a landing 5.5 higher (`RISE`), more than a jump plus a body (5.37), so nothing you can stand on in one section lets you reach the next one's low parts. Every section also lists a route for the bot (`B.j`, `B.w`, `B.jon`): before each jump the bot simulates it with the real `simStep` and only jumps when it lands (in the air it asks for just the speed that brings it down over the target, `aimAir`, as a player who commits to a jump would), and it waits or hops past hazards, so a route that completes proves the section can be beaten with the real movement numbers. Each landing between sections is also checkpoint `k` (`cp` on the part, its spot in `W.cps[k]`). Towers can have checkpoints (on your own, the Checkpoints switch on the menu, saved as `spire:cpOn`, on by default; online, the host's Checkpoints option, `cp` in the round): then reaching a landing saves your place (a mint landing, a fanfare and a mint mark on the height bar), anything lethal or R puts you back on it, and dropping more than 4 below it counts as a fall and does the same. Without checkpoints, red sends you to the bottom and a fall just lands you lower, as before. Either way the first time you reach each landing the feed shows your split time, and the fastest-tower best counts both (a clean run is just as quick either way). Coins float over two spots on each section's route (the same ones for everyone in a room, picked from the tower's seed): each one you pass through is one coin, picked up in the physics step. When adding or changing a section, run the bot over it at several difficulties, mirrored and not, and at several start times, and over whole towers (`verifyModule`, `runBot`; the page exposes them as `window.__tw` in automated browsers). Online, like Chromaflage, everything travels through each player's own node at `rooms/tw-/players/`, which must always hold `n, c, x, z, h, ts`: position and animation (`y`, `a`), the round the player is in (`r`) and a finish claim (`f`, `round:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen only once the room's players have loaded) publishes the round as JSON in its own `rs`: `{id, seed, ph, t0, dur, n, ez, ff, rf, fin, ne, cp, v}`, where `seed` builds the tower (with tower version `v`; a round without `v` is version 1 and one without `cp` has no checkpoints, so a host on an older page still works), `t0` is the server time it starts, `ff`/`rf` mark the first finish (from then the clock runs at double speed) and `fin` is the finish order. Other players check the round before using it (`cleanRS`: finite times within a day of now, a finish list of `[uid, ms, name]`, names cleaned), so a broken host can't freeze their page. The host takes finish claims at their word, so it isn't cheat-proof. If the host leaves, the next player carries on from the last round it saw. A tab in the background gets no animation frames, so a 1 s timer keeps its node's `ts` fresh and, for the host, keeps the round ticking. Nothing about a round is kept online after it ends. Saved only in the browser, under `spire:` keys: name, colour, hat (`spire:hat`), checkpoints on your own (`spire:cpOn`), settings, the host's round options (now with `cp`), and a profile (`spire:profile`: coins, XP, towers climbed, best times, falls, the furthest obby stage, best practice times and the hats bought with coins, `hats`), `spire:awarded` (the last online round that paid out, so rejoining it doesn't pay twice) and `spire:climbed` (set after the first truss climb; until then a tip shows at the foot of a truss). Hats (`HATS`): a cap, party hat, beanie, top hat, crown and traffic cone unlock with your level, and a halo, Viking helmet, propeller cap and wizard hat cost 100 to 500 coins (the menu's Hat row; a locked one says what it needs, or offers to buy it). Your hat travels online as `k` on your node. In a tower the sky runs on toward sunset as the camera climbs (`skyAt`); online a place pill beside the clock shows where you are (finishers in order, then everyone else by height), and the height bar has a strip in each section's colour and a gold ring on the leader. Climbers squash and stretch as they jump and land, and flying fast (a launch pad, a long fall) brings in speed lines and widens the view a little. Keys use `keybinds.js` (`keybinds:spire`). V (the `view` action) switches between the camera behind you and first person, as does scrolling all the way in or out; in first person your body moves to layer 1, which only the sun's shadow camera sees, so it's hidden but still casts its shadow, and spectating always uses the camera behind the climber you watch. The choice is saved as `spire:view`. On computers the mouse aims: clicking the game while playing captures it (Pointer Lock), so moving it turns the camera with no button held (0.0026 radians per pixel times Sensitivity, pitch kept to the same limits as before), and a crosshair replaces the cursor (a dot in first person). While aiming in third person the camera sits over your right shoulder and you turn to face where you aim as you move; Shift lock also keeps you facing it standing still. Esc, the pause menu, results, the Controls panel, the menus and spectating all let go of the mouse (only Esc and losing it some other way bring up the pause menu), and a small "Click to aim" shows while it's free during play; you can still move then. If the browser refuses the lock three times running (Chrome refuses a request within about a second of Esc), the hint goes and the old drag-to-look carries on, but every click still tries again. Settings and the pause menu have Sensitivity (`spire:sens`, shared with touch) and Invert Y (`spire:invY`, also for touch, off by default). On touch screens the page adds `touch` to `body` for a move stick, a Jump button, an eye button for first person, drag to look and pinch to zoom, with the Controls buttons hidden. Drawing: parts that never change are merged into one mesh per look and per four sections (vertex colours; the bevelled edges and side shading come from a per-face `fe` attribute that `boxGeo`/`cylGeo` add), while moving, blinking and crumbling parts and checkpoints keep their own meshes; lethal parts are unlit neon with a glow. Scenery (hills, trees, mountains, clouds, the obby's islands) is one mesh each, the sky is one shader, and dust, sparkles and confetti are two point buffers. Graphics Pretty (`spire:gfx` `high`, the default on computers) adds soft sun shadows that follow you, a second cloud layer and more particles; Fast (`low`) is the default on phones. Parties can launch it (its row in `GAMES` in `party.js`, `{ k: 'tw', n: 'Spire', d: 'spire', max: 12, nk: 'spire:name' }`), the Online panel offers room invites to it, and it's in the feedback box's game list. It was archived for a while (October 2026) and brought back with checkpoints, the new sections, coins and hats. **Spanish:** it loads `../lang.js` and its own words in `spire/es.js` (sections, worlds, hats and the made-up tower names, which es.js builds from the two word lists, so keep it in step if those lists change); canvas signs use `T()`, and there is an EN | ES switch next to Controls in Settings and the pause card. **Wardrobe (captains only for now):** `spire/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Turbo Trail and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a climber in the room wears a kit (then only those two files, to draw them), adds a Wardrobe button under the hats on the Climber tab: 33 outfits (17 sports kits made in the climber's own colour, 3 robots, 4 pirates with eye patches, 6 suits and bosses, a wizard, an astronaut and a knight) and 4 celebrations (what bursts out at checkpoint landings and at the top instead of the usual confetti). They are Spire's `outfit` and `cheer` items in `cosmetics.js` (game `spire`, prefix `sp`; in no pack, free for captains to wear). Saved as `spire:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the player's own node, `wk` (`"o.c"`, e.g. `"21.3"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain climber and the usual confetti. An outfit is five vertex-coloured meshes on the climber's own pivots (fewer draw calls than the plain climber's eleven) with pictures from one shared atlas texture, so the hit box, speed and jump are the game's own; an outfit with its own headgear hides your hat while it is worn. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. - `e63334287a3deaa3/turbo-trail/`: Turbo Trail (Back Room), a speedrun obby: 25 short levels (about 6 to 12 seconds each at gold pace) in five worlds of five, Candy Coast, Neon City, Lava Forge, Frost Peaks and Star Drift, each with its own sky, sea, palette and scenery (Three.js, Firebase Realtime Database race rooms under `rooms/sr-…`, same project and rules as Rumble Karts; Quick match uses `rooms/sr-pub-1` to `sr-pub-4`; invite links go through the home page as `#sr-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page, with no DOM or Three.js in it, so a Node script can run it on its own: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, optionally moving by `line`, `spin` or `orbit`, blinking (`timed`), crumbling, lethal, a jump pad (`bounce`), a climbing wall (`wj`), ice, or a zone: `speed` pads, `lowg` low gravity and the `portal`), the level builder (`Course`), the levels (`WORLDS`, `LEVELS`, `buildLevel`) and the checking bot. Physics is a fixed 120 Hz step with the runner as an upright cylinder (radius 0.42, height 2), so it plays the same at any frame rate (a slow frame runs several steps; nothing moves more than 0.5 in one step, and the thinnest solid or lethal part is 0.25), and parts are found through an x/z grid of 10 × 10 cells. Running speed is 12.5 with snappy acceleration, a jump rises 3.24 and carries about 9 at full speed, with 0.12 s of coyote time and a 0.14 s jump buffer; in the air the stick speeds you up, turns you and brakes you (`airControl`) but never past your take-off speed. Speed pads push you to 27 along their arrows (the extra speed fades on the ground in about a second and stays in the air), jump pads throw you 7.8 up, and touching a striped climbing wall in the air lets you jump again off it (up 16.5, 8 away from the wall, keeping your speed along it; you also slide down it slowly). Levels are written with the `Course` cursor (`start`, `run`, `gap`, `stones`, `blocks`, `pad`, `bounce`, `bars`, `stairs`, `movers`, `pistons`, `spinner`, `lasers`, `wallrun`, `chimney`, `crumble`, `blinks`, `slalom`, `lowg`, `orbit`, `drop`, `turn`, `portal`); each piece also adds the checking bot's route. The bot plays with the real `simStep`: before each jump it simulates the jump and only takes it if it lands, it hops or waits for hazards, and it pushes off climbing walls; when changing a level, run the bot over it at several start times (moving parts depend on the clock) and at the top upgrade speed (`runBot(buildLevel(i), t0, 90, run)`). The medal times in `MEDALS` ([gold, silver, bronze] per level) come from the bot: gold is its median time over several start times plus 4% and 0.25 s, rounded up to a quarter second, silver is 1.3 × gold and bronze 1.75 × gold, so they need re-working out if a level changes. A level's clock starts with your first move and a fall, a lethal part or R puts you back at the level's start with the clock reset; in a Full run (all 25 on one clock, starting with your first move on 1-1) the clock keeps running through falls and T starts the run over. After each portal the split (your full-run time there against your best run's, or the level time against your best) shows green when ahead and red when behind. Stars: 1, 2 or 3 for a bronze, silver or gold best; they unlock speed upgrades (`SPEEDS`: +4%, +8%, +12% at 12, 30 and 50 stars, chosen in the Garage and used online too) and trails (`TRAILS`, at 3 to 75 stars; a camera-facing ribbon of the last 0.45 s, one draw call). Saved only in the browser under `turbotrail:` keys: `name` (a plain string, which party.js puts back after a party launch), `color`, settings (`sens`, `invY`, `follow`, `ghost`, `vol`, `mus`, `gfx`, `zoom`, `slock`, `hostC`, `room`), `prog` (`{reached, best: [25 times], run: {t, sp: [25 splits]}, speed, trail, clears, falls, runs}`), `ghost:` (your best run on that level, 20 samples a second as comma-separated whole tenths of x, y, z and hundredths of the facing, replayed as a see-through runner when Best ghost is on) and `awarded` (the last race win counted). Online, like Spire, everything travels through each runner's own node `rooms/sr-/players/`, which must always hold `n, c, x, z, h, ts`: also `y`, `a` (animation, 5 while respawning), `l` (which level of the course you're on), `r` (the race the position belongs to), `tr` (trail), `j` (join time) and `f` (a finish claim, `race:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen once the room has loaded) publishes the race as JSON in its own `rs`: `{id, ph: 'race' | 'inter', t0, cs, nm, fin, ff, ne}`, where `cs` is the course (a random world's five levels, five from all over, or all 25: the host's Course option in the pause menu, saved as `turbotrail:hostC`), `t0` the server time it starts (a 5 s countdown), `fin` the finish order `[uid, ms, name]` and `ff` the first finish; the race ends when everyone live has finished, 30 s after the first finish, or after 45 s a level plus 20 s, then results show for 9 s and the next race starts. Guests clean the host's race before using it (`cleanRS`), so a broken host can't freeze them. The race clock is the simulation clock, so every runner sees the moving parts in the same places; other runners are see-through ghosts (with their trails) drawn from a short history of their updates with `../netsmooth.js`, only while they're on the same level as you, and a list on the right shows everyone's progress. The host takes finish claims at their word, so it isn't cheat-proof. A background tab keeps its node fresh (and, for the host, the race moving) with a 1 s timer. Camera: behind you, pulled in so it never ends up inside a wall, easing round to the way you're running while you hold forward (not while strafing, and not for 0.7 s after you turn it yourself; Settings → Camera: Free turns that off), and a little wider at high speed. On computers clicking the game captures the mouse (Pointer Lock) to look around; Esc frees it. Keys are rebindable with `keybinds.js` (`keybinds:turbo-trail`). On touch screens the page adds `touch` to `body`: a run stick, Jump, a restart button, and drag anywhere else to look; Fast graphics by default. Drawing: parts that never change are merged into one mesh per look (bevelled edges from a per-face `fe` attribute, as in Spire), moving, blinking and crumbling parts keep their own meshes, scenery is one mesh per level, the sky one shader and particles one point buffer, so a level is about 20 to 30 draw calls; Pretty graphics adds sun shadows. Leaderboards hooks: `BackRoomStats.min('obby', seconds)` for a finished full run (`obby` is already in stats.js's `LOWER` list; stats are kept per game folder, so it doesn't mix with Spire's), `max('stars', total)`, `add('levels', 1)` at every portal and `add('wins', 1)` for winning a race against at least one other runner. Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__sr`, with `advance(seconds)`, `autopilot(on)` and `buildLevel`/`runBot`) exists only when `navigator.webdriver` is set. **Spanish:** it loads `../lang.js` and its own words in `turbo-trail/es.js` (level names stay English; signs drawn on canvases use `T()` and follow the language when the level is built), with an EN | ES switch next to Controls in the menu and pause card. **Wardrobe (captains only for now):** `turbo-trail/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Spire and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a runner in the race wears a kit (then only those two files, to draw them), adds a Wardrobe button in the Garage under the trails: the same 33 outfits as Spire, made in the runner's own colour (an outfit replaces the runner's cap, goggles, backpack and scarf), and 4 celebrations (what bursts out when you finish a race, a full run or the last level, instead of the usual confetti). They are Turbo Trail's `outfit` and `cheer` items in `cosmetics.js` (game `turbo-trail`, prefix `tr`; in no pack, free for captains to wear). The Garage's speeds and trails are not touched. Saved as `turbotrail:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the runner's own node, `wk` (`"o.c"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain runner. Other runners stay see-through ghosts in their outfits (each dressed ghost has its own see-through material, as the plain ones share the page's). An outfit is five vertex-coloured meshes on the runner's own pivots (one draw call fewer than the plain runner), keeping the runner's own glow, so the hit box, speed and jump are unchanged. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. - `e63334287a3deaa3/escapade/`: Escapade (Back Room), a 3D escape-room obby (Three.js, Firebase Realtime Database rooms under `rooms/er-…`, same project and rules as Rumble Karts; Quick match uses `rooms/er-pub-1` to `er-pub-4`; invite links go through the home page as `#er-`; rooms hold up to 12). **Worlds:** six worlds of eight levels (48), each level a themed set of rooms with one way out, harder world by world. World 1, Breakout (Detention, Lab Rats, Hot Kitchen, Toy Box, Down the Drain, The Vault, Orbit Station, The Warden), is built into `index.html`, unchanged. World 2, Lost and Found (Overdue (a library), Clockwork (a clock tower), Cold Feet (an ice cave), Lost Temple, Mirror Manor (a haunted house), Stage Fright (a theatre), Gale Point (a lighthouse in a storm) and After Hours (a museum, the world's finale)), is `escapade/worlds/w2.js`; its first five were levels 9–13 before worlds came, with the same ids. World 3, Deep Down (Cave-In (an old mine), Deep End (a flooded cave), Off the Rails (an underground railway), High Water (a pump station), Fish Tank (an aquarium), Crystal Clear (a crystal cavern), Hull Breach (a sunken ship) and Hot Core (a volcano, the world's finale)), is `escapade/worlds/w3.js`; it added water you swim in (jump strokes up; an Air bar while your head is under), minecarts on rails (`rail`), water and lava that rise (`rise`, started by a flag or a trigger zone) and dark rooms you need the lantern for (`B.dark`, item `lamp`). World 4, Full Power (Assembly Line (a toy factory), Sorting Day (a recycling plant), Spin Cycle (a power station), Growing Pains (a greenhouse), Hot Swap (a data centre), Night Shift (an observatory), Spare Parts (a robot lab) and Meltdown (a power plant, the finale)), is `escapade/worlds/w4.js`; it added belts and fans a lever turns round (`rev`), pressure plates you stand on (`B.hold`), presses and piston walls that crush (`B.crusher`, `B.press`) and red, green and yellow keycards with their doors (`B.cardDoor`). World 5, Sky High (Hot Air (a balloon festival), Big Top (a flying circus), Thunderclap (a skyscraper in a storm), Sky Deck (a revolving restaurant), Zeppelin (an airship), Cloud Keep (a castle in the clouds), Orbiter (a satellite) and Eye of the Storm (a weather station in a hurricane, the finale)), is `escapade/worlds/w5.js`; it added updrafts (`B.lift`), cannons you fire yourself from (`B.cannon`, a `{w5: 'cannon'}` button), lightning on a timer with rods that power gates (`B.bolt`), groups of parts that turn a step at a press (`B.turning`, `B.turnBtn`, `B.align`) and the `clouds` scenery. World 6, The Last Door (One Way Home (a labyrinth with one-way flaps), Sun and Sand (a pyramid), Siege Works (a fortress), Dragon's Wake (a dragon's keep), Borrowed Time (a vault of clocks), Upside Dream (a dream), Long Climb (a climb over a molten sea) and The Last Door (the Keeper, a three-phase boss, and the end of the game)), is `escapade/worlds/w6.js`; it added one-way flaps (`oneway: [nx, nz]`, `B.oneway`), rings of fire you jump (shape `ring`, move `pulse`, `B.ring`) and the shadow (`B.shadow` zones: a chaser that walks your own path a few seconds behind you); escaping its last level shows "You beat Escapade!". Each of Worlds 3–6 keeps its shared code in its own marked blocks in `index.html` (`// ---- World core additions ----` inside the CORE, `// ---- World drawing additions ----` outside it) with one-line hooks ending `// W hook`; each does nothing unless a level uses it, and `worlds/README.md` section 13 lists every helper. Worlds 3–6 are `needs: 3` (`CORE_VER` 3). Each world after the first is its own file, `worlds/w.js`, loaded only when it's needed (picked in the menus, the level an online room is playing, or the next world when you reach a world's last level), so the page stays small; a world file only describes levels (`Escapade.world({n, needs, levels})`), and every shared helper, puzzle part and the bot live in `index.html`. **`escapade/worlds/README.md` is the guide for building a world**: the API, every helper and puzzle with its parameters, seeds, checkpoints, stars, the bot route, the tests a level must pass, a performance budget, a difficulty guide and the mechanics already used. The `WORLDS` list in `index.html` (one line per world: name, colour, blurb and its eight level ids) is what the menus show before a file loads and what progress counts by. `CORE_VER` goes up when the page gains something world files can use; a file says which one it needs, and a page too old for it (or one that can't load it) shows an "Update needed, reload" notice instead of breaking. Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers: movement (`PHYS`, `simStep`, Spire's numbers: jump 3.37, 3.67 with the ledge pop, run 7.5, fixed 120 Hz step, so the frame rate never changes the physics), parts (upright boxes and cylinders, filed in a 6 × 6 xz grid for collision; moving by `line`, `spin` or `orbit`; timed, crumbling, lethal, bouncy, conveyors, ladders, low-gravity zones; and for levels 9–13: `ice` (slippery: you speed up and stop slowly, `PHYS.ICE_ACC`/`ICE_DEC`), the move types `swing` (a pendulum: platforms and blades that stay level, hanging `len` below a pivot) and `roll` (one way at a steady speed, then round again: the temple's boulder), ladders (trusses) that move and carry you while you hang on (stick off = hang, stick into it = climb), `tp` portals (`[x, y, z, yaw]`: where they send you; put the arrival point a little above the floor), zones `cold` (you freeze after `PHYS.COLD` seconds in it, shown as a Warmth bar) and `warm` (a fire thaws you), and `slide` crates (one shove and they slide until something stops them); and for World 2's last three: zones `wind` (`wind: [vx, vz]`, blows you along on the ground and in the air, in gusts when `timed`; white streaks show it, fainter just before a gust; the bot leans into it), the lever button `{toggle}` (flips a flag on and off, for scenery that swaps with `onIf`/`offIf`) and `B.all(flags, set)` (a flag that comes on once all of its flags are: the museum's vault), plus level options `sea` (a molten sea to the horizon instead of the lawn) and `msgs`/`unlock` (a level's own feed messages and Unlocked! banners)), the puzzle parts and `logicStep`/`useBtn`/`tryCode`, the level library (`LEVELS`, each with a `par` target time and a `build` that also writes the checking bot's route) and the bot; it has no DOM or Three.js in it, so a Node test can run it on its own. **Puzzles are flags** in the level's state `W.st.f`: a part with `door: 'flag'` is solid until the flag is on (a number means "on until that time": timed gates); `onIf`/`offIf` make a part exist only while a flag is on/off (the space bridge, the Warden's arms); `lock: 'item'` opens a door when you come near carrying the item; `item` parts are pickups (`key`, `card`, `fuse`, `gem`); `btn` parts are used with E / the USE button: `{set}` (a button), `{timed, dur}` (a valve), `{seq, sym}` (recipe buttons, pressed in the order `W.seqs[g].order`), `{pad}` (a keypad; the code is `W.codes[k]`, four digits from the level's seed), `{need, then}` (a fuse box), `{dial, key, n}` (turns one hand of the clock: `W.dials[g]` holds the target time, from the seed; all of a group's dials on target sets its flag), `{mirror}` (turns a mirror a quarter; `beamTrace` follows the moonbeam in `W.beams[g]` across the floor, and the beam reaching its target sets the flag); `plate` parts latch a pushed crate (`push`, kept inside `lim`, pushed along one axis at a time) and set their flag; `step` parts (`{seq, sym}`, the temple's stones) count when you land on them, in the order `W.seqs[g].order` (the mural shows it). The library's code is `W.codes.lib`, its digits shown on four coloured books in the order `W.books.lib`; the manor's right mirror is the colour `W.rose` (from the seed, like every other clue). Walls are 10 tall (22 in the low-gravity bay) so nothing standable gets you over them. Each level keeps the puzzle in its own copy for every player: there are no shared doors, so nobody can open or block anything for anyone else. **Stars**, saved in this browser under `escapade:prof` (`{best: {levelId: seconds}, st: {levelId: bits}, esc, deaths}`; bits 1 escaped, 2 beat `par`, 4 found the gem; the gem counts once found in any escaped run), by level id as always, so saves from before worlds came load as they were (8 escaped shows World 1 done and World 2 open; 13 shows World 2's first five done). The menus: Play carries on from the first level you haven't escaped; Worlds shows a card per world (name, stars of 24, how many escaped, locked or coming soon), then that world's eight levels. A level opens when you escape the one before it in its world; a world opens when you escape the last level of the one before it (or any of its own levels, say online). The menu counts escapes of 48 and stars of 144. Death (touching anything red and glowing, or falling) respawns you at your last checkpoint after 0.6 s; what you found and opened stays, crates not on their plate go home, crumbled tiles come back and timed gates shut (`softReset`). On your own the clock stops while paused or while the keypad is open. **Online**: each player writes only their own node `rooms/er-/players/`: `n, c, x, z, h, ts` as the shared rules require, plus `y`, `a` (animation), `j` (join time), `rr` (the round you're playing), `f` (your finish, `round:ms:server time`) and, from the room's leader only, `lr`/`ll`/`lt` (round number, level, start time). The leader is the live player who joined first (`Net.leader`); everyone else follows the leader's round, loading that level with a seed made from the round (so codes and recipes match for everyone) and running moving parts from `lt`, so all players see the same moving platforms. Late arrivals' own clocks start when they arrive. When everyone in the room is out (6 s later), or two minutes after the first escape, the leader starts the next level; the leader can also pick a level from the pause menu. If the leader leaves, the next one carries on with the same round. Other players are drawn with `../netsmooth.js` and only while they're in your round. Every value read from another node is checked (`onNode`). Each node also has `v`, its page's `CORE_VER`. The leader can pick any level in the worlds and levels it has opened itself (pause menu, Pick the room's level); everyone else loads that level's world file when they see the round (the round starts 4.5 s later, and a late loader's clock starts when it arrives), and a page that doesn't know the level shows the update notice. Pages from before worlds came (no `v`) only know levels 1–8 and simply don't follow a later level: the room list says they need to reload and the leader's feed names them. Keys are rebindable through `keybinds.js` (`keybinds:escapade`, actions `forward`, `back`, `left`, `right`, `jump`, `use`, `shiftLock`, `view`, `zoomIn`, `zoomOut`, `reset`). Touch: stick, JUMP, USE (green when something can be used), drag to look, pinch to zoom; shown only on touch screens. Other saved settings: `escapade:` `name`, `color`, `room`, `sens`, `invY`, `vol`, `mus`, `gfx`, `view`, `zoom`, `slock`. Leaderboards hooks: `BackRoomStats.add('escapes', 1)`, `max('cleared', n)` (levels escaped, up to 48), `max('stars', n)` (up to 144), `min('total', seconds)` (World 1's best total: the sum of its eight best times once they all have one, as before worlds came, so totals already on the board still compare; the menu calls it "World 1 total") and `min('total-w', seconds)` for each later world (`total-w2` … `total-w6` are in `stats.js`'s `LOWER`; the board has a row for each world). Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__er`, with `advance`, `frames`, `autopilot`, `depth`, `ensureWorld`) exists only when `navigator.webdriver` is set. **When changing a level**, keep the route in its `build` working and re-run the bot on it at several start times, and check that every puzzle door is still needed: with one door kept shut and all the others open, running, jumping and running jumps from everywhere reachable must not reach the exit (the checks used for this branch ran exactly that on all eight levels; levels 9–13 were checked the same way, with the search keeping the whole player state so rides on moving ladders count, and with each portal taken away in turn: the manor's right mirror and its last mirror are needed; World 2's last three too, with levers as part of the search: the theatre can't be crossed with its levers left either way, and its stage door, the lighthouse's beacon and the museum's vault and exit doors are all needed). Worlds 3–6 were checked the same way: the bot from the spawn and from every checkpoint at several seeds and start times, the search with each gate shut in turn (extended to swim, ride carts, carry keys and turn the turning rooms), random runners for clipping, draw calls, phones and an online room; the merged page still plays Worlds 1 and 2 exactly as before (same parts, codes and bot runs). The checking bot has route steps for the new things: `ladder` (a plan saying wait, grab, hang or climb), `dial`, `tp`, `kick` (a sliding crate) and `steps` (stepping stones, by way of a hub platform). **Spanish:** it loads `../lang.js` and its own words for the page and all six worlds in `escapade/es.js` (a new level's signs and messages need their Spanish added there, or they show in English); level and world names and the EXIT sign stay English. Every canvas made by `cvs()` passes its text through `TX()` while the language is Spanish, so the world files need no changes, and compass dials show N E S O. The puzzles are codes, colours, clocks and pictures, not English words, so none is English-only. EN | ES switch next to Controls. **Wardrobe (captains only for now):** `escapade/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Spire and Turbo Trail) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when an escaper in the room wears a kit (then only those two files, to draw them), adds a Wardrobe button under your name and colour on the menu: the same 33 outfits as Spire, made in the escaper's own colour, and 4 celebrations (what bursts out when you escape a level, or another escaper in your round does, instead of the usual confetti). They are Escapade's `outfit` and `cheer` items in `cosmetics.js` (game `escapade`, prefix `ec`; in no pack, free for captains to wear). Saved as `escapade:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the player's own node, `wk` (`"o.c"`), sent only while something is worn; older pages ignore it (`onNode` checks it like every other field), and a page that doesn't know a number draws the plain escaper and the usual confetti. An outfit is five vertex-coloured meshes on the escaper's own pivots (fewer draw calls than the plain escaper's eleven), so the hit box, speed and jump are unchanged, and what the page attaches to the escaper (the lantern's glow) is left as it is. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. diff --git a/e63334287a3deaa3/news-es.js b/e63334287a3deaa3/news-es.js index e5f6358c..2435cd0d 100644 --- a/e63334287a3deaa3/news-es.js +++ b/e63334287a3deaa3/news-es.js @@ -6,6 +6,10 @@ (function () { if (!window.BackRoomLang) return; BackRoomLang.add({ + "Sky Duel: bigger planes": "Sky Duel: aviones más grandes", + "The planes in Sky Duel are a little bigger (about 15%), so they are easier to see and to hit. Bullets hit what you see, in the chase and cockpit views alike.": "Los aviones de Sky Duel son un poco más grandes (alrededor de un 15%), así que es más fácil verlos y darles. Las balas le dan a lo que ves, tanto en la vista de persecución como en la de cabina.", + "The briefing room shows your ranked rating, and every online match against another real pilot (free-for-all, duel or 2v2) still counts for your Elo.": "La sala de reunión muestra tu puntuación de ranking, y cada partida en línea contra otro piloto real (todos contra todos, duelo o 2v2) sigue contando para tu Elo.", + "Parties never get bots in Sky Duel, and the HUD does less work every second, so the game runs a little smoother.": "Los grupos nunca tienen bots en Sky Duel, y el HUD hace menos trabajo cada segundo, así que el juego va un poco más fluido.", "Hush Pools: into the mist": "Hush Pools: entre la niebla", "The halls are much bigger now, and full of mist. You can only see a little way ahead, so you have to explore to find the way across.": "Las salas ahora son mucho más grandes y están llenas de niebla. Solo ves un poco hacia delante, así que tienes que explorar para encontrar el camino.", "Each hall has three doors in the far wall, and only one of them is open.": "Cada sala tiene tres puertas en la pared del fondo, y solo una está abierta.", diff --git a/e63334287a3deaa3/news.js b/e63334287a3deaa3/news.js index 6b5691fd..e28be295 100644 --- a/e63334287a3deaa3/news.js +++ b/e63334287a3deaa3/news.js @@ -85,6 +85,12 @@ */ (function () { var NEWS = [ + {date: '2026-11-20', title: 'Sky Duel: bigger planes', kind: 'fix', + tags: ['Sky Duel'], img: 'm/thumbs/sky-duel.jpg', items: [ + 'The planes in Sky Duel are a little bigger (about 15%), so they are easier to see and to hit. Bullets hit what you see, in the chase and cockpit views alike.', + 'The briefing room shows your ranked rating, and every online match against another real pilot (free-for-all, duel or 2v2) still counts for your Elo.', + 'Parties never get bots in Sky Duel, and the HUD does less work every second, so the game runs a little smoother.' + ]}, {date: '2026-11-20', version: '1.35', title: 'Hush Pools: into the mist', kind: 'feature', tags: ['Hush Pools', 'Horror obby'], img: 'm/thumbs/hush-pools.jpg', items: [ 'The halls are much bigger now, and full of mist. You can only see a little way ahead, so you have to explore to find the way across.', diff --git a/e63334287a3deaa3/sky-duel/es.js b/e63334287a3deaa3/sky-duel/es.js index 3258160f..290c37cb 100644 --- a/e63334287a3deaa3/sky-duel/es.js +++ b/e63334287a3deaa3/sky-duel/es.js @@ -38,7 +38,7 @@ // ---- lobby ---- 'Briefing room': 'Sala de reunión', 'Match': 'Partida', 'Off': 'No', 'No bots in party games': 'Sin bots en partidas de grupo', 'Fill to 4': 'Llenar a 4', 'Bot level': 'Nivel de bots', 'Take off': 'Despegar', 'Copy invite': 'Copiar invitación', 'host': 'anfitrión', 'you': 'tú', 'host, you': 'anfitrión, tú', - 'Room {r} · {n} of {m} pilots': 'Sala {r} · {n} de {m} pilotos', 'The match starts by itself in a moment.': 'La partida empieza sola en un momento.', + 'Room {r} · {n} of {m} pilots': 'Sala {r} · {n} de {m} pilotos', 'Your rating {r}': 'Tu puntuación {r}', 'The match starts by itself in a moment.': 'La partida empieza sola en un momento.', 'The last match is over. Take off when everyone is ready.': 'Terminó la partida. Despeguen cuando todos estén listos.', 'The last match is over. Waiting for {h} to start the next one.': 'Terminó la partida. Esperando que {h} empiece la próxima.', 'You are the host. A duel is for two pilots and 2v2 for four; with more in the room it becomes a free-for-all. Bots take the empty seats.': 'Eres el anfitrión. Un duelo es para dos pilotos y 2v2 para cuatro; con más gente en la sala se vuelve todos contra todos. Los bots ocupan los lugares libres.', diff --git a/e63334287a3deaa3/sky-duel/hangar.js b/e63334287a3deaa3/sky-duel/hangar.js index b5203771..7883f4a3 100644 --- a/e63334287a3deaa3/sky-duel/hangar.js +++ b/e63334287a3deaa3/sky-duel/hangar.js @@ -361,8 +361,9 @@ function pvSet(k,frame,color){ return q; } // yaw turns the plane (0: nose toward the camera), elev raises the camera, dist is how far away it is, and tz is the -// point along the plane the camera looks at (0: the middle; about 6 to 8: the nose) -function pvShot(q,yaw,elev,dist,tz){const c=pvInit().cam;q.g.rotation.set(0,yaw,0);const d=dist||40,el=elev==null?.42:elev,z=(tz||0)*S/1.288; +// point along the plane the camera looks at (0: the middle; about 6 to 8: the nose). Both were set for planes drawn at +// 1.288 and are scaled to PLANE_SIZE, so the pictures frame the plane the same if it grows. +function pvShot(q,yaw,elev,dist,tz){const c=pvInit().cam;q.g.rotation.set(0,yaw,0);const d=(dist||40)*S/1.288,el=elev==null?.42:elev,z=(tz||0)*S/1.288; const tx=Math.sin(yaw)*z,tzz=Math.cos(yaw)*z;c.position.set(tx,Math.sin(el)*d,tzz+Math.cos(el)*d);c.lookAt(tx,0,tzz)} function pvRender(w,h,cv,bg){ const p=pvInit(),R=X.renderer; diff --git a/e63334287a3deaa3/sky-duel/index.html b/e63334287a3deaa3/sky-duel/index.html index 3acda224..48b5c7d7 100644 --- a/e63334287a3deaa3/sky-duel/index.html +++ b/e63334287a3deaa3/sky-duel/index.html @@ -453,11 +453,12 @@

Match over

// ---------- tuning ---------- const SPD_MIN=62,SPD_MAX=132,BOOST_ADD=75,STALL=46,STALL_OUT=64,TURN=1.2,PITCH_MAX=1.3; const CEIL=900; // the air thins out above this and the engine fades -// The planes are drawn PLANE_SIZE times the size they're built at (1.15, then 12% bigger in November 2026), and the -// bullet hit sphere grew with them (9 m to 10.08 m), so what you see is what you hit. The shooter's own browser decides -// its bullets' hits, so a page from before this change in the same room still works; its hits use the old 9 m. -const PLANE_SIZE=1.15*1.12; -const BULLET_V=540,BULLET_LIFE=1.25,BULLET_DMG=6,GUN_RATE=.085,HIT_R=9*1.12; +// The planes are drawn PLANE_SIZE times the size they're built at (1.15, then 12% bigger in November 2026 and 15% more +// a little later: PLANE_GROW), and the bullet hit sphere, the spawn shield and the HUD boxes grew with them (9 m, then +// 10.08 m, now 11.59 m), so what you see is what you hit. The shooter's own browser decides its bullets' hits, so a page +// from before this change in the same room still works; its hits just use its own older radius. +const PLANE_GROW=1.12*1.15,PLANE_SIZE=1.15*PLANE_GROW; +const BULLET_V=540,BULLET_LIFE=1.25,BULLET_DMG=6,GUN_RATE=.085,HIT_R=9*PLANE_GROW; const HEAT_UP=.024,HEAT_COOL=.3; // per shot / per second const LOCK_T=1.3,LOCK_RANGE=950,LOCK_CONE=.25,MSL_DMG=55,MSL_LIFE=6.5,MSL_TURN=1.9,MSL_MAX=4,FLARE_MAX=4,FLARE_R=520; const RESPAWN=3.2,SHIELD=2.5,PICK_R=18,PICK_RESPAWN=20000; @@ -826,7 +827,7 @@

Match over

const TRIM_MAT=new THREE.MeshLambertMaterial({color:0x23324a,emissive:0x0a1220}); const PROP_MAT=new THREE.MeshBasicMaterial({color:0xdfe8f2,transparent:true,opacity:.28,side:THREE.DoubleSide,depthWrite:false}); const SHIELD_MAT=new THREE.MeshBasicMaterial({color:0x9fe3ff,transparent:true,opacity:.13,depthWrite:false}); -const SHIELD_GEO=new THREE.SphereGeometry(9*1.12,14,10),PROP_GEO=new THREE.CircleGeometry(1,14); +const SHIELD_GEO=new THREE.SphereGeometry(HIT_R,14,10),PROP_GEO=new THREE.CircleGeometry(1,14); // Every plane is drawn through instanced meshes: one body and one trim per airframe, one for all the propellers and // one for the spawn shields, so 8 planes cost at most 10 draw calls instead of 3 or 4 each. e.mesh only holds where // a plane is (position, YXZ rotation, scale); drawEnts copies that into the instances every frame. @@ -1572,8 +1573,9 @@

Match over

if(G.paused||G.phase!=='play'){ // online the fight goes on while the menu is open: hold a safe course const av=avoidGround(me,me.h,0,1);me.aimH=me.h+clamp(wrapA(av.h-me.h),-1,1);me.aimP=av.p;c.fire=false;c.boost=false;return; } - me.thr=clamp(me.thr+((KB.held('thrUp',keys)?1:0)-(KB.held('thrDown',keys)?1:0))*dt*.75,0,1); - const tx=(KB.held('left',keys)?1:0)-(KB.held('right',keys)?1:0),ty=((KB.held('up',keys)?1:0)-(KB.held('down',keys)?1:0))*(invY?-1:1); + const kh=keys.size>0; // KB.held builds a few small lists per call, so skip it while no key is down + me.thr=clamp(me.thr+((kh&&KB.held('thrUp',keys)?1:0)-(kh&&KB.held('thrDown',keys)?1:0))*dt*.75,0,1); + const tx=kh?(KB.held('left',keys)?1:0)-(KB.held('right',keys)?1:0):0,ty=kh?((KB.held('up',keys)?1:0)-(KB.held('down',keys)?1:0))*(invY?-1:1):0; if(tx)me.aimH=me.h+tx*1.05;else if(kbTurn)me.aimH=me.h+kbTurn*.12; kbTurn=tx; if(ty)me.aimP+=ty*1.3*dt; @@ -1881,7 +1883,7 @@

Match over

hemiC.color.copy(hemi.color);hemiC.groundColor.copy(hemi.groundColor);hemiC.intensity=hemi.intensity;hemiC.position.copy(V3_UP).applyQuaternion(PQI); sunC.color.copy(sun.color);sunC.intensity=sun.intensity;sunC.position.copy(sun.position).normalize().applyQuaternion(PQI); instruments(me,dt); - $('gvign').style.opacity=(REDUCED?0:smooth(.55,1,load)*.5).toFixed(2); + setOp($('gvign'),(REDUCED?0:smooth(.55,1,load)*.5).toFixed(2)); } function setOn(v,quiet){ on=!!v;store.set('view',on?'cockpit':'chase');camSnap=true;headY=headP=0; @@ -1894,7 +1896,7 @@

Match over

toggle(){setOn(!on);sfx('click')}, set:setOn, // called from updateCamera; returns false when the chase camera should be used instead - camera(dt){const a=active();if(a!==act){act=a;$('hud').classList.toggle('cockpit',a);if(!a){$('gvign').style.opacity='0';camSnap=true}}if(!a)return false;camera3(dt,G.me);return true}, + camera(dt){const a=active();if(a!==act){act=a;$('hud').classList.toggle('cockpit',a);if(!a){setOp($('gvign'),'0');camSnap=true}}if(!a)return false;camera3(dt,G.me);return true}, render(){if(!act)return;renderer.autoClear=false;renderer.clearDepth();renderer.render(scene,cam);renderer.autoClear=true} }; })(); @@ -1942,8 +1944,12 @@

Match over

const put=(el,x,y)=>{x=Math.round(x*2);y=Math.round(y*2);if(el._x===x&&el._y===y)return;el._x=x;el._y=y;el.style.transform='translate('+x/2+'px,'+y/2+'px)'}; const setOp=(el,v)=>{if(el._o!==v){el._o=v;el.style.opacity=v}}; const setBar=(el,v)=>{v=Math.round(v*500);if(el._b!==v){el._b=v;el.style.transform='scaleX('+v/500+')'}}; +// Text the same way: only when it changed, and into the element's one text node, so the page doesn't swap nodes (and +// lang.js's watcher, which looks through the whole page on every swap, isn't woken) eight times a second per number. +const txt=(el,v)=>{v=String(v);if(el._t===v)return;el._t=v;const n=el.firstChild;if(n&&n.nodeType===3&&!n.nextSibling)n.data=v;else el.textContent=v}; +const css=(el,k,v)=>{const c='_'+k;if(el[c]!==v){el[c]=v;el.style[k]=v}}; const marks=[]; -(function(){const box=$('marks');for(let i=0;i<8;i++){const d=document.createElement('div');d.className='mark';d.hidden=true;d.innerHTML='';box.appendChild(d);marks.push({el:d,name:d.querySelector('span'),hp:d.querySelector('i'),txt:'',hpv:-1,cls:''})}})(); +(function(){const box=$('marks');for(let i=0;i<8;i++){const d=document.createElement('div');d.className='mark';d.hidden=true;d.innerHTML='';box.appendChild(d);marks.push({el:d,name:d.querySelector('span'),hp:d.querySelector('i'),txt:'',hpv:-1,cls:'',dt:-9})}})(); let hudT=0,bannerT=0,hitT=0; const HE={};for(const id of ['vign','white','reticle','nose','lead','lockRing','hpF','boF','heF'])HE[id]=$(id); function banner(t,sub,ms){const b=$('banner');b.textContent=TX(t);if(sub){const s=document.createElement('small');s.textContent=TX(sub);b.appendChild(s)}b.classList.add('on');bannerT=(ms||1500)/1000} @@ -1989,10 +1995,10 @@

Match over

const on=s.front&&s.x>10&&s.x10&&s.y1300))continue; mi++;let cls='mark'+(foe?'':' fr')+(isT?' tg':'')+(on?'':' off'); - if(on){const sz=Math.round(clamp(2600*1.12/d,24,72));if(m.sz!==sz){m.sz=sz;m.el.style.width=m.el.style.height=sz+'px';m.el.style.margin=(-sz/2).toFixed(0)+'px 0 0 '+(-sz/2).toFixed(0)+'px'}put(m.el,s.x,s.y)} + if(on){const sz=Math.round(clamp(2600*PLANE_GROW/d,24,72));if(m.sz!==sz){m.sz=sz;m.el.style.width=m.el.style.height=sz+'px';m.el.style.margin=(-sz/2).toFixed(0)+'px 0 0 '+(-sz/2).toFixed(0)+'px'}put(m.el,s.x,s.y)} else{let ax=s.cx,ay=-s.cy;if(!s.front&&Math.hypot(ax,ay)<1e-3)ay=1;const a=Math.atan2(ay,ax),deg=Math.round(a*57.2958);if(m.sz!==0){m.sz=0;m.el.style.width=m.el.style.height='';m.el.style.margin=''}if(m.deg!==deg){m.deg=deg;m.el.style.setProperty('--a',deg+'deg')}put(m.el,VW/2+Math.cos(a)*edge,VH/2+Math.sin(a)*edge)} if(m.cls!==cls){m.cls=cls;m.el.className=cls} - const dm=Math.round(d/10)*10;if(m.e!==e||m.dm!==dm||m.nm!==e.name){m.e=e;m.dm=dm;m.nm=e.name;m.name.textContent=e.name+' '+dm+'m'} + const dm=Math.round(d/10)*10;if(m.e!==e||m.nm!==e.name||m.dm!==dm&&G.time-m.dt>.2){m.e=e;m.dm=dm;m.nm=e.name;m.dt=G.time;txt(m.name,e.name+' '+dm+'m')} // the distance five times a second const hv=Math.round(e.hp/5);if(m.hpv!==hv){m.hpv=hv;m.hp.style.width=clamp(e.hp,0,100)+'%'} if(m.el.hidden)m.el.hidden=false; if(isT){ @@ -2005,21 +2011,21 @@

Match over

// bars every frame, text a few times a second if(fly){setBar(HE.hpF,me.hp/100);setBar(HE.boF,me.boostM);setBar(HE.heF,me.heat)} hudT-=dt;if(hudT>0)return;hudT=.12; - if(touch.fill&&me)touch.fill.style.height=(me.thr*100).toFixed(0)+'%'; + if(touch.fill&&me)css(touch.fill,'height',(me.thr*100).toFixed(0)+'%'); const now=netNow(); if(rs){ - const left=nowb)b=e.kills}else{const t=me&&me.team===1?1:0;a=teamScore(t);b=teamScore(1-t)} - $('scoreL').textContent=a;$('scoreR').textContent=b; + txt($('scoreL'),a);txt($('scoreR'),b); if(G.phase==='play'&&now.8);$('heN').textContent=me.jam?TX('HOT'):''; - $('mslN').textContent=me.msl;$('flN').textContent=me.flares;$('tMsN').textContent=me.msl;$('tFlN').textContent=me.flares; + txt($('hpN'),Math.max(0,Math.round(me.hp)));css($('hpF'),'background',me.hp<30?'var(--red)':me.hp<60?'var(--amber)':''); + $('heB').classList.toggle('hot',me.jam||me.heat>.8);txt($('heN'),me.jam?TX('HOT'):''); + txt($('mslN'),me.msl);txt($('flN'),me.flares);txt($('tMsN'),me.msl);txt($('tFlN'),me.flares); $('mslS').classList.toggle('out',me.msl===0);$('flS').classList.toggle('out',me.flares===0); - $('spd').textContent=Math.round(me.speed*3.6);$('alt').textContent=Math.round(me.pos.y);$('thrN').textContent=Math.round(me.thr*100); + txt($('spd'),Math.round(me.speed*3.6));txt($('alt'),Math.round(me.pos.y));txt($('thrN'),Math.round(me.thr*100)); } // warnings const w=[]; @@ -2035,7 +2041,7 @@

Match over

else if(me&&me.out&&G.phase==='play')w.push(['Watching: you fly in the next match',1]); const key=w.map(q=>q[0]).join('|');const we=$('warn'); if(we.dataset.k!==key){we.dataset.k=key;we.textContent='';for(const q of w){const d=document.createElement('div');d.textContent=TX(q[0]);if(q[1])d.className='soft';we.appendChild(d)}} - $('board').hidden=!G.board;if(G.board)$('boardT').innerHTML=tableHTML(); + if($('board').hidden===!!G.board)$('board').hidden=!G.board;if(G.board)$('boardT').innerHTML=tableHTML(); drawRadar(); if(G.phase==='end'&&G.online)endButtons(); } @@ -2136,7 +2142,9 @@

Match over

li.innerHTML=''+esc(o.name)+' '+esc(TX((id===host?'host':'')+(id===Net.uid?(id===host?', you':'you'):'')))+''; ul.appendChild(li); } - $('lobbySub').textContent=TX('Room {r} · {n} of {m} pilots',{r:Net.room,n:ids.length,m:MAX_ROOM}); + // your ranked rating (../elo.js), so it's in view before a match as well as on the results + let er=null;try{er=window.BackRoomElo?BackRoomElo.get():null}catch(e){} + $('lobbySub').textContent=TX('Room {r} · {n} of {m} pilots',{r:Net.room,n:ids.length,m:MAX_ROOM})+(er&&isFinite(er.r)?' · '+TX('Your rating {r}',{r:er.r}).replace(/ (\d+)$/,'\u00a0$1'):''); // the number never wraps alone const party=partyRoom(); for(const b of $('lobbyOpts').querySelectorAll('button'))b.disabled=!mine||party&&!!b.closest('#setFill'); $('noBotsNote').hidden=!party;