diff --git a/README.md b/README.md index 77a00330..b70b438d 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/rampline/`: Rampline (Back Room), a low-poly stunt time-trial racer with a track builder, online boards and community tracks (Three.js; Firebase Realtime Database only for the boards and community tracks, under the prefix `rl`, plus stats.js). One small car, one track, the clock: 30 built-in tracks in four tiers (`TIERS`: Green, Blue, Red, Black), your own tracks from the builder, and tracks other players publish. Everything that isn't drawing is the `RL` module between `// ==CORE==` and `// ==/CORE==`, with no DOM or Three.js in it, so a Node script can run it on its own: the pieces (`PIECES`), building a track (`buildTrack`), the car physics (`newCar`, `step`), share codes, ghost recordings, the checks (`validate`), the track-writing cursor (`Course`), the tracks (`TRACKS`, `trackOf`) and the checking bot (`runBot`). **Pieces** sit on a grid of 10 m tiles and 2 m height steps with a quarter-turn (`{t, x, y, z, r, w}`: type, tile, height, turn, side walls); each has the tiles it covers (`fp`), how many height steps above it it keeps clear (`hh`) and its ports (where road leaves it). Pieces: straight, curves (tight, normal, wide, huge), S-bends left and right, slope, steep slope and long climb (+1, +2, +3 steps), climbing curves left and right (+1 step while turning), bump, two banked curves, boost pad, kicker and big ramp (no exit port: they launch you), loops leaning left and right, wall ride, narrow road, gap, platform, start, checkpoint, checkpoint ring (an arch instead of posts), finish, and scenery (tree, rock, arrow sign). The order of `PIECES` is part of the share-code format: only ever add to the end (the pieces from curveXL on were added with the handling pass). Raised road gets **pillars** down to the ground automatically (`pillars` in `buildTrack`), every 10 m or so, only where no other piece is below that tile and always below the road surface. **One set of triangles:** `buildTrack` turns every piece into triangles that are both the collision geometry (type 0 road, 1 solid; `FX` 1 marks a boost pad, 2 a slab end that meets another piece's (inside the road), 3 the side of a piece that twists) and, merged with one colour each, the single drawn mesh; positions are rounded to 1/1024 m. Pieces that twist (`tw`: the two banked curves and the wall ride) also keep, per road triangle, the surface's real normals, the twist of its quad, how far across the road each corner is and the way across (`X3`, `XD`), used only by the newer contact rules below. **Physics** (`PH`, `PHYS_V` 2, fixed 1/120 s step, only + − × ÷ and √ while stepping, so a recording of inputs replays to exactly the same run on any device): the car is a point riding 0.55 m above the road with two 0.75 m spheres for hitting things. **Contact rules** (`car.pv`; `PHYS_NOW` 3 for every new run, 2 for recordings from before the side-ramp fix, which replay with the old rules bit for bit; same car, same boards): on flat road, curves, slopes and loops the two are the same run for the same inputs, except where rules 2 hit a slab end. Rules 3 differ in four ways. (1) A road that twists climbs or drops along the way you drive anywhere off the line it twists round, by up to 40°, which the frame's up (`n`, what the driving uses, so banks and wall rides handle as before) doesn't know: the body now leans with the real surface (`car.bd`, `bodyPose`: where the car is drawn and where its spheres sit), so the nose no longer digs through the road into the slab's underside (a dead stop anywhere off the middle of a wall ride, and on the outside of a bank above about 200 km/h) and the car no longer sinks into or floats over the road by up to 0.8 m. (2) The ride height there follows the smooth surface through each quad's four corners instead of the ridge or dip its two triangles make (up to 13 cm, at every quad). (3) A car on the road never hits a slab end where two pieces join (it used to when its nose dipped below road level: landing nose-down near a join, or at the bottom of a slope above about 290 km/h: a dead stop, a shove or a bounce), nor the side of the twisting piece it is riding (the wall ride's low edge used to bounce cars back up the wall; now they drop off it). Open ends (a ramp's lip, the two sides of a gap) are as solid as ever, so jumps are unchanged. (4) The wall ride lifts its middle as it rolls up, which slid the road about 2 m sideways under a car that wasn't steering, towards the low edge; now a car on it keeps its place across the road (`laneKeep`). Not changed: too fast into a bank still throws you off at its exit, and the blunt start of a barrier after a piece with none (wall ride, loop, gap) still stops a car that hits it head-on. Acceleration 20 m/s² tapering to nothing at 82 m/s with drag: 0–100 km/h in 1.5 s, 0–200 in 3.8 s, top speed about 252 km/h. Steering lock and rate fall off with speed (full lock turns in 6 m at 30 km/h and about 55 m at 150 km/h), and the turn rate is capped a little above what the tyres hold, so holding full lock at speed slides a little. **Drifting:** let go of go and tap brake while steering at more than 50 km/h: the nose holds an angle set by the steering (`driftAng`), grip is a little higher than normal (`driftK`), so you get round a tight corner at speed (about 75 % of the grip turn's radius, for 3–8 % of your speed); it lasts while you keep steering and the car is sideways. Downforce grows with speed (`stick` plus `stickHi` above 30 m/s), which keeps you on loops, wall rides and most crests; the fastest cars still fly over sharp crests. A share of the road's turn at take-off carries into the air as spin (`carryW`); in the air the **air brake** (input 32, Space or Left Shift, or the brake) damps the spin and levels the car for the landing; landing square keeps your speed, crooked costs up to 70 % (with the air brake the bot's landings cost 2–5 %, without it up to 70 % and falls). Boost pads give 1.4 s of extra push up to 1.3 × the top speed. Walls take the speed into them, turn the nose along them and never push a car on the road upwards (barriers on banks and loops lean); of the speed along the wall a light brush keeps 96% and a square hit 40% (`walls()`; 92% and 35% until November 2026, eased a little because every touch felt costly once tight corners had real inside barriers). Falling off (or 6 s in the air) puts you back at the last checkpoint 0.25 s later with the speed you had there; Backspace does it at once. **A run that went back to a checkpoint doesn't count** (no best, ghost, medal, stats or board), and the HUD shows "Practice". Starting a track and R are both instant and plain (restart under a millisecond): no countdown, no camera move and no fade; the car waits on the line with the camera already in place, and the clock starts with your first drive key. The menu sits over a still view of a track. Splits against your best show at every checkpoint and at the finish. **Gates:** a checkpoint counts when you cross it either way; the finish only counts going forwards, once every checkpoint has been passed. **Tracks** are written with the `Course` cursor (`s`, `L`/`R` curves with `S`, `M`, `L`, `X` sizes, `sL`/`sR`, `bL`/`bR`, `up`/`down`, `climb`/`drop`, `cuL`/`cuR`/`cdL`/`cdR`, `bump`, `boost`, `ring`, `loop`, `wall`, `narrow`, `gap`, `ramp` + `jump(n, dy, speed cap)`, `plat`, `cp`, `fin`), each with its look (`th`). After changing a track or the physics, run the bot: it drives with the real `step` and only a player's keys (it slows for crests that lead into corners and for jumps' speed caps, uses the air brake, and never starts a drift by accident; `pv` picks the contact rules, and with rules 3 it doesn't steer against the wall ride's old sideways slide), in 13 styles; every track must be finished cleanly by at least one, and the same inputs must replay to the same time. `MED` ([builder, gold, silver, bronze] in ms) comes from it: builder is the bot's best clean time rounded up to 10 ms, gold 1.05 ×, silver 1.2 ×, bronze 1.45 ×, rounded up to 0.1 s. Built-in tracks run 24–49 s for the builder time. The 20 tracks from the first version got longer layouts (layout 2) with the handling pass: a best from the first layout is kept in the save as `pb[id].old = {t, m}` (shown on the track card as "Old layout", and its medal `m`, worked out with `OLD_MED`, still counts). **Looks:** three environments of our own, chosen per track (`th`, or Look in the builder): Summer valley, Snowy pass, Desert canyon (`THEME`: sky, fog, ground, hills, the colours of its light (`hs`, `hg`, `sun`, `em`, so hills and trees take the look's colours), its dust colour, and recolouring of trees, rocks and road sides). **Ghosts:** a ghost is a recording of inputs driven through the same physics once (`GTrack`, every step's pose kept, built a little ahead of where it's needed), so up to 10 race at once with almost no cost and never collide: your best (the Ghost setting) plus any you tick on a board. **Online** (signed in anonymously only when first used; the shared rules only let a player write their own node, which needs n, c, x, z, h, ts): `rooms/rl-b2-/players/` is a player's board entry for a track (`t` best ms, `k` car, `p` paint, `pa`, `a`, and `lk` only when a Captain's garage look is worn, see below), `rooms/rl-g2-/players/` the ghost behind it (`t`, `g` the inputs, `f` 2, `v` the contact rules it was driven with: 2 or 3), where `` is a built-in track's id or a custom track's `trackKey` and "2" is PHYS_V (new physics, new boards; the contact rules share one board). A clean new best is uploaded if it beats the account's entry. The top 10 shows only entries whose ghost, fetched and driven again on this device, finishes cleanly in exactly the claimed time with the contact rules it names (`Online.verify`; results cached in `rampline:vc`), so a made-up time or an edited recording never shows. A page from before rules 3 checks every run with rules 2, so until it is reloaded it doesn't list runs driven with rules 3. `rooms/rl-tracks/players/` holds a player's published tracks (`tr: {: {nm, code, at}}`, at most 5, at most 800 pieces each, and only after a clean finish of it), `rooms/rl-plays/players/` who raced which published track (`p: {: [best ms, last played]}`, 150 at most). **Community** lists published tracks (newest, most raced, raced this week), with the featured track of the week on top (the most raced in the last 7 days, else one picked by the week number), each with its own top 10; names and track names go through `/namefilter.js`. Hide and Report hide a track in this browser only (`rampline:hidden`); there is no shared report list, so Report tells the player to use Tell us. **Replay viewer:** watch any of your last 12 runs (`rampline:runs`) or a board run, with play/pause, frame steps, ¼× to 2×, a timeline, and a graph of speed over distance that can lay a second run (your best or a board run) over the first. **Builder:** a free camera (middle-drag to look round, right-drag, Shift-drag or WASD to pan, wheel to zoom, Shift + wheel or Q/E for the build height), a palette (keys 1–0 for the first ten), click or tap to place (R turns it; the preview shows arrows where the road leaves), right-click, X then click, or the bin to delete, the select tool (V: click, Shift-click or drag a box) to move (M, or M over a piece to pick it up), copy (Ctrl+C), cut (Ctrl+X), paste (Ctrl+V, R turns the group, Esc cancels and puts a moved group back) or delete pieces, Ctrl+Z / Ctrl+Y undo and redo (200 steps), Look (theme), a check, Test drive (T), Share, and Publish (in Track builder's list). **Share codes:** `RL1.` + base64url of: version 1, name length + UTF-8 name (≤ 40 bytes), piece count (2 bytes), 5 bytes a piece (type, x + 128, z + 128, y, turn + 4 × walls), then an FNV-1a checksum (4 bytes); version 2 is the same with a theme byte after the version (theme 0 is still written as version 1, so older copies read it). `decodeTrack` checks everything and returns a plain message for anything wrong. **Saved in the browser:** `rampline:save` (`{v: 1, pb: {: {t, sp, n, name, lv, old}}, runs}`), `rampline:ghost:` (`{v: 2 or 3 (the contact rules), f: 2, t, g}`: your best run as inputs, one byte per step (1 go, 2 brake, 4 left, 8 right, 16 back to checkpoint, 32 air brake) in runs of varint(count × 64 + input), base64url; version 1 ghosts used count × 32 and the old physics, and are left alone), `rampline:runs` (each with `v`, the contact rules; none means 2), `rampline:tracks`, `rampline:hidden`, `rampline:vc`, `rampline:set` (`vol, mute, cam, gfx, car, col, ghost`), `rampline:garage` (`{v: 1, car, col, pat, acc, rim, trail, name}`: car, paint, pattern (plain, stripe, twin stripes, two-tone) and its colour, rims, exhaust trail (off, smoke, flame, rainbow) and the name on the boards; account-nudge.js syncs it) and keys under `keybinds:rampline`. Stats hooks: `min('r2-', seconds)` for every clean built-in finish (stats.js's `LOWER`; the old `t-` names stay there for first-layout times), `max('medals', n)` (1 to 4 a track, old-layout medals included) and `max('golds', n)`. Drawing: the track is one merged mesh, each gate banner its own mesh, the car one mesh plus its wheels as one `InstancedMesh`, each ghost the same plus a name tag, dust and the exhaust trail a point cloud each, speed lines one line set; with no ghosts racing is about 17 draw calls, with 10 ghosts about 43 (logic under 1 ms a frame). **Drawn-only extras** (none of them is in the `RL` module, the physics or the track format, so times and share codes don't change): the **ground** is one mesh made in `buildScenery`, a patchwork of flat triangles in slightly different tones round the track (at most 32 × 32 cells, tones fading out at its edge) plus four plain sheets out to the horizon, so every bit of ground is drawn once (drawing a second ground under it cost about a fifth of the frame on slow graphics); the **centre dashes** on the road are their own mesh (`makeRoadLines`), swept from the same frames as the road (`RL.framesWorld`), on every other segment so they line up with the kerb stripes, a hair above the surface, skipped where the road twists (bank and wall-ride entries), on boost pads and at gates; dust and exhaust use one small shader (`fxPointsMat`) that gives each point its own colour, fade and size, so puffs grow and fade instead of popping: landings throw a ring in the look's dust colour, sliding leaves pale tyre smoke from the back wheels, and a boost pad's push shows as a flame from the exhaust when no garage trail is chosen; on the Fast graphics setting (`gfx: 'low'`, where nothing casts shadows) the car gets one soft dark patch under it (`blobStep`: on the road while driving, on whatever is below while flying, one ray a frame only in the air). The camera widens its view and pulls back with speed, and speed lines (short streaks kept to the edges of the view, never across the car) fade in above about 90 km/h; the Speed effects setting (menu and pause, `set.fx` in `rampline:set`, on by default) turns both the widening and the lines off. On touch screens the page adds `touch` to `body` (steer bottom left, GO and BRAKE bottom right, BRAKE in the air is the air brake, checkpoint/restart/camera/sound/pause top right); the builder works by tapping, with one finger to look round, two to pan and pinch, and the select tool's bar (Move, Copy, Delete, Done) above the palette. **Captain's garage (hidden, not public yet):** 42 more cars (normal cars, work vehicles, toy cars and silly cars, from a muscle car to a rubber duck, and from the second wave in November 2026 sports cars, a team bus, ice resurfacer, golf cart racer, football helmet and soccer ball, and pirates, suits and robots, a pirate ship, black sedan, VIP limo, armoured van, robo walker and lowrider: car numbers 32 to 42), 25 paints, 12 wheel designs, 10 tyre smokes and 13 horns, all drawn in code in `garage.js` beside the page and numbered as in `cosmetics.js` (game `rampline`). `RAMPLINE_PUBLIC = false` in `index.html` is the one switch; until it is flipped, `garageOn()` asks `captains.js` (`may(false, 'garage', 'rampline-garage')`), so only the site's captains, or `?garage=1` on localhost or in an automated browser, see the "Captain's garage" button at the end of the Garage card and its screen (front and back pictures rendered from the real models, tabs for cars, paint, wheels, tyre smoke and horn). Everything is free to wear; nothing is bought and the shop stays shut. What a captain wears is saved as `rampline:cos` (`{v: 1, car, paint, wheels, smoke, horn}`, item numbers, 0 for none; not synced to the account) and, for what shows on a ghost, goes on their board entries as `lk` = `"1..."` beside the old `k` and `p` (which stay the garage car and colour, so pages from before it draw the garage car as before). Reading a board, `lkOf` checks the string's shape and `garage.js`'s `parse` every number; unknown numbers are drawn plain. `garage.js` is fetched only for a captain or when a board row has an `lk`; for everyone else nothing changes. A paint repaints the car's own paintwork (with none, a car with a colour of its own, such as the school bus or the taxi, keeps it; the rest take the garage swatch); wheels replace the car's own wheels or the garage rims. Tyre smoke recolours the slide smoke and the horn plays on H (only if no control is bound to H) or a horn button above the steering on touch screens; both are yours only. Looks only: every car is still one mesh plus one `InstancedMesh` of wheels (up to six, each its own size), 120 to 650 triangles, so the draw calls are unchanged; all fit about the same box as the garage cars; a car that would sit in front of the Hood camera hides its body in that camera only. A test hook (`window.__rl`) exists only when `navigator.webdriver` is set; with `GX` it has `sheet()` and `wheelSheet()` (contact sheets of every car and wheel). It has Spanish (`rampline/es.js`, through `../lang.js`; EN | ES switch next to Speed effects in both settings panels): menus, how-to-play, results, boards, community, the track builder and its checks, and the captains' garage; the builder's checks stay English inside the code (the page translates them with `_t()` when it shows them, because `T` is the tile size there), and track names and players' track names are never translated. - `e63334287a3deaa3/hush-pools/`: Hush Pools (Back Room), an original co-op horror obby for 1 to 4 players in flooded tiled pool halls (one file, three.js r128 with `../autores.js`, `../netsmooth.js` for teammates, Web Audio, Firebase Realtime Database rooms under `rooms/hp-`, same project and rules as Rumble Karts; invite links go through the home page as `#hp-`; Quick match uses `hp-pub-1` to `hp-pub-6`; rooms hold up to 4). The name, the monster, the rooms, the art and the sounds are all our own (everything is drawn and synthesised in code; no image or sound files). Players hop between floating tiles above water across nine rooms while a tall, blind monster wades the water and hunts **by sound only**. **Rules** are in the `// ==CORE==` … `// ==/CORE==` part of the script: plain data and pure functions with no DOM or three.js, the same in every browser and loaded as they are by the tests (below). `TUNING` holds every number worth tuning (gravity, jump, walk 4 / run 6.2 / creep 2 m/s, how loud each thing is in `TUNING.loud`, hearing radius 20 m × loudness × difficulty, memory 8 s, the monster's speeds and reach, grab 1.6 s, revive 2.6 s, shield 3 s, and so on); `DIFFS` is Easy (1 monster a room, bigger tiles, 50% coins), Normal (up to 3) and Hard (up to 5, smaller tiles, louder for the monster, 160% coins, opened by two Normal escapes). **Noise** is the core: every event is `{ x, y, z, l (loudness), src }` (`emit`), heard by a monster in the same room when it's within `hearRadius(l, df)`; falling in is loudest (1.0), clipping the water with your feet 0.7, a hard or edge landing 0.42, running on tiles 0.16, swimming 0.5, valves 1.05, a bottle 1.25 and its echo; walking and creeping are silent. Each noise shows as rings spreading on the water (the water shader's `uRings`, 14 at a time) and on the HUD's noise meter. **The monster** (`monStep`) drifts (0), goes to look at the loudest thing it remembers (1), lunges at a fresh noise close by (2), holds someone (3) or is stunned by a flare (4); memory fades over 8 s (`memWeight`), and it paths around tiles and pillars on a 0.5 m grid (`gridPath`). A lunge takes anyone in reach; otherwise it only takes someone who has just made a noise right next to it (walking into someone makes a bump that counts), so standing still and quiet beside a wandering monster is safe. Being grabbed shows a short face-to-face scare (a camera move, red edges, a screech; no blood), with a gentler version in Settings. **Rooms** (`ROOMS`, built from a seed by `buildWorld(df, seed)`): Pillar Hall, Broken Walkway (two routes), Sinking Tiles (light-edged tiles sink a moment after you land), Turning Bridge (planks that line up every 4 s), Moving Tiles, Currents (the water pushes you sideways), Memory Bridge (six rows of three tiles: the safe one in each row lights up in turn, the others sink under you), Crushing Walls (one lane in three is safe, shown by a green light) and the Maintenance Lock: two red valves (hold E, loud) raise the water and a stair, four number pillars give the keypad code, and the door out opens. Everything that moves is worked out from the run's clock and seed (`updateDyn`, `plankAngle`, `moverPos`, `crushOut`, `memLit`), so every browser agrees without sending it. **Items** (1–5): pebbles (6 to start, 3 more from each grey stone pile every 20 s; they skip on the water), bottles (loud, with an echo), wind-up toys (rattle for 8 s), flares (stun every monster within 6 m for 5 s and free anyone held) and rescue ropes (pull a downed teammate out from 8 m). A thrown item's flight is the same function in the thrower's browser (shown straight away) and on the host (which decides what it does: `stepProj`, `throwVel`). Under the water for 1.5 s, or held by the monster for its full grab, puts you **down**: a teammate holds E next to you (2.6 s) or throws a rope, and you come back with a 3 s shield; while down you watch a teammate. Everyone down sends the party back to the last checkpoint (the start of the furthest room reached). **Online:** each player writes only their own node `rooms/hp-/players/`: `n`, `c`, `x`, `z`, `h`, `ts` (the six the shared rules need), `y`, `j` (when they joined), `my`/`li`/`lv` (their lowest feet since the last update, their landing count and last landing speed: the host decides what those mean), `tp` (how many host moves they've applied), `hd` (what they're holding E on), `a` (pose flags), `up` (upgrade levels, 6 digits), `pk` (items packed for the run), `rd` (ready), `ac` (their last few actions as JSON, each with a rising `i` and the run number `g`), `ch` (proximity chat) and `pg` (a ping). The host is whoever has the highest `he` with a published state, else whoever joined first; it runs the run (`hostSense` turns each player's reported position into noises, falls, downs, checkpoints and coins, and checks speed and floating; `hostAct` checks every throw, pebble pickup, keypad try and rope; `hostStep` runs the monsters, items, valves, revives and the exit) and publishes it as JSON in its own node's `rs` about 10 times a second (`encodeRS`; clients check every value in `decodeRS`). Players move themselves (so jumps feel instant) and the host moves them only by teleport (`tp`), after a fall, a too-fast move, a revive or a checkpoint retry. If the host leaves, the next player rebuilds the run from the last snapshot (`stateFromRS`) and carries on. Someone who drops out keeps their place for 60 s (`TUNING.rejoin`) and the menu offers Rejoin (`hushpools:last`). `?dev=1` adds a fake-lag slider to Settings for testing. **Saved in this browser** (localStorage, all `hushpools:`): `name`, `set` (settings: sensitivity, field of view, volumes, gentler scare, invert, graphics, dev lag), `save` (coins, upgrade levels, items owned (at most 3 of each), Normal and Hard escapes, best time), `last` (the room of a run in progress, for Rejoin). Items you take into a run leave the shelf and whatever you didn't use comes back after it. **Coins** (no real money anywhere): 10 a room cleared and 50 for the escape, times the difficulty's factor; the lobby's Equipment stall sells bottles 15, toys 25, flares 30 and ropes 25, and the Upgrades stall has six upgrades at 40/90/160 coins a level (throw range, pebble skips and rescue speed from the start; toy battery, flare radius and rope reach once you've owned that item). **stats.js:** `add('escapes')`, `min('fastest', seconds)` (Normal or Hard only), `add('revives')`, `add('rooms')` and `add('hard')`; the Leaderboards show Elo, Fastest escape, Escapes and Rescues (see elo.js for how a co-op escape is rated). **Touch:** shown only on touch screens (`body.touch`): a stick on the left, drag anywhere else to look, and Jump, E, Throw (hold to aim), Run, Creep and Ping buttons; the HUD rearranges itself for an upright or sideways phone. **Tests** aren't in this repo (it has no build step or packages): the core is checked from outside with Node (`node:test`: noise and hearing, the monster's states and forgetting, item checks, seeds, the memory tiles and keypad, coins and upgrades, checkpoints, wipes, revives and valves), headless bots that play whole runs with the real physics (2 to 4 bots escape on Easy and Normal), and two headless browsers in one online room (joining, ready, falling in, going down, a rescue and the host leaving). Automated browsers get a test hook, `window.__hp`. - `e63334287a3deaa3/tidewick/`: Tidewick (Back Room), a classic 8-bit style side-scrolling platformer for one player (Canvas 2D and Web Audio, no Firebase except stats.js). Pip, a child in a yellow raincoat, crosses a rainy harbour at dusk in two stages: **HARBOR 1** (the quay, about 210 tiles) and **HARBOR 2: THE BREAKWATER** (a short stone fortress over dark water, about 100 tiles) with a boss at the end. Unlike the other Back Room games it isn't one self-contained `index.html`: it's ES modules (the owner asked for them) in `js/`, loaded by ``, lists its actions in `Keybinds.create({game, actions: [{id, label, keys: ['KeyW', 'ArrowUp']}]})` (keys are `e.code` names, so they're physical keys on any layout; mouse buttons are `Mouse0`/`Mouse1`/`Mouse2` in games that pass `mouse: true`), checks input with `KB.is(action, e.code)` and `KB.held(action, keys)` instead of comparing key codes, and opens the panel from a Controls button with `KB.open()`. Changed keys are saved only in the player's browser, under localStorage `keybinds:` as `{v: 1, b: {action: [codes]}}` (only the actions that differ from the defaults; Reset to defaults removes the entry), and never go to Firebase. Esc is never rebindable. Elements with `data-kb="action"` show the current keys and update themselves. The panel takes each game's look from `--kb-*` CSS variables and the game's own button classes; the comment at the top of the file lists the options. To add it to a game, do the same, and keep text inputs (names, room codes, chat) returning before any key lookup. Touch controls don't go through key codes: each game's touch buttons feed its input directly (in Shell Crackers, Quarry and Backrooms they hold actions by id in `tAct`, which the game checks alongside `KB.held`), so they keep working whatever keys are bound, and the Change keys / Controls buttons are hidden in the touch layout (`body.touch`). **Spanish** (lang.js, when the page loads it): keybinds.js adds the panel's own words and common key and action names once (guarded by `if (window.BackRoomLang)`), and builds its messages and aria-labels with the action and key names in the page's language (a game's own dictionary supplies its action names); in English, or without lang.js, every string is as before. +- `e63334287a3deaa3/keybinds.js`: rebindable controls shared by the keyboard Back Room games (2048, Backrooms 1v1–4v4, Boostball, Coil, Escapade, Gridpop, Hail Mary, Kartwheel, Melon Merge, Odd One Out, Quarry, Rumble Karts, Shell Crackers, Slipstream, Spire, Stackfall, Starhop, Tumble Trials, Turbo Trail, Updraft, Driftfall, Asteroid Run, Rampline, Tidewick, Flickerwood, Beatvault). Plain JavaScript, no dependencies. Each game loads it with ``, lists its actions in `Keybinds.create({game, actions: [{id, label, keys: ['KeyW', 'ArrowUp']}]})` (keys are `e.code` names, so they're physical keys on any layout; mouse buttons are `Mouse0`/`Mouse1`/`Mouse2` in games that pass `mouse: true`), checks input with `KB.is(action, e.code)` and `KB.held(action, keys)` instead of comparing key codes, and opens the panel from a Controls button with `KB.open()`. Changed keys are saved only in the player's browser, under localStorage `keybinds:` as `{v: 1, b: {action: [codes]}}` (only the actions that differ from the defaults; Reset to defaults removes the entry), and never go to Firebase. Esc is never rebindable. Elements with `data-kb="action"` show the current keys and update themselves. The panel takes each game's look from `--kb-*` CSS variables and the game's own button classes; the comment at the top of the file lists the options. To add it to a game, do the same, and keep text inputs (names, room codes, chat) returning before any key lookup. Touch controls don't go through key codes: each game's touch buttons feed its input directly (in Shell Crackers, Quarry and Backrooms they hold actions by id in `tAct`, which the game checks alongside `KB.held`), so they keep working whatever keys are bound, and the Change keys / Controls buttons are hidden in the touch layout (`body.touch`). **Spanish** (lang.js, when the page loads it): keybinds.js adds the panel's own words and common key and action names once (guarded by `if (window.BackRoomLang)`), and builds its messages and aria-labels with the action and key names in the page's language (a game's own dictionary supplies its action names); in English, or without lang.js, every string is as before. - `e63334287a3deaa3/school.js`: Your school (Back Room page, the home page's copy of it and the phone page). A small box at the end of the page header where each player picks the school they go to: one button per school plus Not listed, as a radio group (click, or the arrow keys). The schools are Avenues (New York) and St. Andrew’s Scots School (`standrews`, Olivos, Buenos Aires, Argentina; a bilingual English–Spanish school, so lang.js's Spanish matters there); to add one, add a row to `SCHOOLS` (`id`, a short lowercase id that never changes, `name`, `place`). The script fills in every empty `[data-school]` element: the Back Room page has one at the end of its `
` (so the home page's `reveal()`, which copies the header, gets it too, and loads the script after `events.js`), and the phone page has one at the end of its header. Being in the header, layout.js never moves it. **Storage:** localStorage `school:v1`, the school's id (`avenues`) or `other` for Not listed; no key means nothing picked yet. It is in account-nudge.js's `KEYS`, so a Google account's save carries it to the player's other devices (visible to other signed-in browsers, like everything in that save). Nothing else is stored online. **Search and Add my school:** only schools marked `suggest: true` in `SCHOOLS` (Avenues) are shown before a search, plus the one the player picked; every other school is found by typing in the search box above the choices, which filters them as you type (name and place, accents ignored; Enter picks the first match). With no match, or from the dashed "Add my school" button, a small form asks for the school's name, its city or town and its country (only the general area; it says not to put a name or address) and sends one note through the suggestion box (`BackRoomFeedback.send` in feedback.js, the same sealed `feedback` documents, limits and admin Feedback tab, so no new storage or rules): "School request: (, ). Sent from Your school." The player's choice becomes Not listed, and localStorage `school:req` ({n, p, t}, also in account-nudge.js's KEYS) remembers what they asked for, so the box says "You asked us to add … We'll add it soon." To add a requested school, read it on the admin page's Feedback tab and add its row to `SCHOOLS`. Nothing uses the choice yet: other scripts can read it with `BackRoomSchool.get()` (the row, or null) and hear changes through the `backroom:school` event on `document` (`{id}`). - `e63334287a3deaa3/news.js`: What's new (Back Room). A slim strip under the page header, above the Party panel, on the Back Room page and the phone page (one ` + + + +Beatvault + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + diff --git a/e63334287a3deaa3/beatvault/preview.jpg b/e63334287a3deaa3/beatvault/preview.jpg new file mode 100644 index 00000000..a081fdb8 Binary files /dev/null and b/e63334287a3deaa3/beatvault/preview.jpg differ diff --git a/e63334287a3deaa3/es.js b/e63334287a3deaa3/es.js index 9140f375..98f5236b 100644 --- a/e63334287a3deaa3/es.js +++ b/e63334287a3deaa3/es.js @@ -41,6 +41,7 @@ "Open 2048": "Abrir 2048", "More about 2048": "Más sobre 2048", "Open Gridpop": "Abrir Gridpop", "More about Gridpop": "Más sobre Gridpop", "Open Coil": "Abrir Coil", "More about Coil": "Más sobre Coil", "Open Lokop": "Abrir Lokop", "More about Lokop": "Más sobre Lokop", "Open Tidewick": "Abrir Tidewick", "More about Tidewick": "Más sobre Tidewick", + "Open Beatvault": "Abrir Beatvault", "More about Beatvault": "Más sobre Beatvault", "Open Patchwork Tower": "Abrir Patchwork Tower", "More about Patchwork Tower": "Más sobre Patchwork Tower", "Open Flickerwood": "Abrir Flickerwood", "More about Flickerwood": "Más sobre Flickerwood", "Open Lanternhold": "Abrir Lanternhold", "More about Lanternhold": "Más sobre Lanternhold", @@ -381,6 +382,14 @@ "Bread to grow, ember peppers to throw sparks, a firefly jar that makes you glow, and a clover for a spare life": "Pan para crecer, ajíes de brasa para lanzar chispas, un frasco de luciérnagas que te hace brillar y un trébol para una vida extra", "A 400-second clock and a score, with your best on the Leaderboards": "Un reloj de 400 segundos y un puntaje, con tu récord en las Tablas de posiciones", "Keyboard (rebindable keys) or touch: a pad and RUN and JUMP buttons. Works either way up on a phone.": "Teclado (teclas configurables) o táctil: un pad y botones RUN y JUMP. En el celular funciona en vertical u horizontal.", + "Rhythm": "Ritmo", "New · Rhythm": "Nuevo · Ritmo", + "One button, and every jump lands on the beat.": "Un botón, y cada salto cae justo en el ritmo.", + "A one-button rhythm runner on a cut-paper stage. A little paper lantern runs on its own through six stages, each built on its own song: hop, fly, flip and dive on the beat, and if you touch a burr you're straight back at the start. Grab the three vault keys hidden off the safe path and open the vault door at the end.": "Un corredor rítmico de un solo botón en un escenario de papel recortado. Un pequeño farol de papel corre solo por seis escenarios, cada uno armado sobre su propia canción: salta, vuela, gira y baja en picada al ritmo, y si tocas un abrojo vuelves directo al principio. Junta las tres llaves de la bóveda escondidas fuera del camino seguro y abre la puerta de la bóveda al final.", + "Six levels from easy to hard, each with its own song made in the browser and laid out on its beat": "Seis niveles de fácil a difícil, cada uno con su propia canción hecha en el navegador y armado sobre su ritmo", + "Five forms to switch between (Lantern, Kite, Pinwheel, Swift and Frog), plus gravity, speed and size gates, bounce pads and rings": "Cinco formas para cambiar (Farol, Cometa, Molinete, Golondrina y Rana), además de puertas de gravedad, velocidad y tamaño, resortes y aros", + "Practice mode with checkpoints, and a level editor: build on the beat grid, clear it once, then share it as a code": "Modo práctica con puntos de control y un editor de niveles: arma sobre la grilla del ritmo, supéralo una vez y compártelo como código", + "Levels cleared and vault keys on the Leaderboards": "Niveles superados y llaves de la bóveda en las Tablas de posiciones", + "Keyboard (rebindable keys), mouse, or tap anywhere on a phone. Best sideways on a phone.": "Teclado (teclas configurables), mouse o toca en cualquier lugar en el celular. Mejor en horizontal en el celular.", "Fix the tower's windows while a gargoyle kicks bricks at you.": "Arregla las ventanas de la torre mientras una gárgola te patea ladrillos.", "New · Arcade": "Nuevo · Arcade", "A one-screen pixel-art arcade game. Rivet the repair bot hops from window to window on a brick tower at night, fixing each one until it glows, while the gargoyle on the roof kicks bricks down whichever column it stands over. Fixing roots you to the spot, so watch its eyes: when they go red, get out from under the red arrows.": "Un arcade en una sola pantalla de pixel art. Rivet, el robot reparador, salta de ventana en ventana en una torre de ladrillos de noche y arregla cada una hasta que brilla, mientras la gárgola del techo patea ladrillos por la columna donde esté parada. Arreglar te deja clavado en el lugar, así que mírale los ojos: cuando se ponen rojos, sal de debajo de las flechas rojas.", @@ -472,6 +481,7 @@ "Snakes, sword duels, platformers and more.": "Serpientes, duelos de espadas, plataformas y más.", "Snakes, duels, mazes and platformers": "Serpientes, duelos, laberintos y plataformas", "A rainy-harbour platformer: stomp, jump, and get past the Tollkeeper.": "Un plataformas en un puerto lluvioso: aplasta, salta y supera al Tollkeeper.", + "One button, every jump on the beat. Six songs and a level editor.": "Un botón, cada salto al ritmo. Seis canciones y un editor de niveles.", "Fix the windows while a gargoyle kicks bricks at you.": "Arregla las ventanas mientras una gárgola te patea ladrillos.", "A maze chase by moonlight: gather pollen, outfly four night critters.": "Una persecución en laberinto a la luz de la luna: junta polen y escapa de cuatro bichos nocturnos.", "Co-op tower defense for up to 4: build towers and keep the lantern lit.": "Defensa de torres cooperativa para hasta 4: construyan torres y mantengan encendida la linterna.", diff --git a/e63334287a3deaa3/index.html b/e63334287a3deaa3/index.html index a87bef0f..4b1e2c87 100644 --- a/e63334287a3deaa3/index.html +++ b/e63334287a3deaa3/index.html @@ -923,6 +923,33 @@

Tidewick

+
+ + Beatvault in play on a cut-paper stage at dawn: a small cream paper lantern with a glowing amber flame hops over a row of red spiky burrs on a brown card floor, with green paper hills, round paper trees and a big pale sun behind. Along the top, the attempt count, a progress bar with the percent, and a pause button. + NewRhythm + +
+

Beatvault

+

One button, and every jump lands on the beat.

+
  • Solo
  • New · Rhythm
+
+ +
+

A one-button rhythm runner on a cut-paper stage. A little paper lantern runs on its own through six stages, each built on its own song: hop, fly, flip and dive on the beat, and if you touch a burr you're straight back at the start. Grab the three vault keys hidden off the safe path and open the vault door at the end.

+
    +
  • Six levels from easy to hard, each with its own song made in the browser and laid out on its beat
  • +
  • Five forms to switch between (Lantern, Kite, Pinwheel, Swift and Frog), plus gravity, speed and size gates, bounce pads and rings
  • +
  • Practice mode with checkpoints, and a level editor: build on the beat grid, clear it once, then share it as a code
  • +
  • Levels cleared and vault keys on the Leaderboards
  • +
+

Keyboard (rebindable keys), mouse, or tap anywhere on a phone. Best sideways on a phone.

+
+
+
+ ▶ Play +
+
+
Patchwork Tower in play, in chunky pixel art at night: a grey stone gargoyle with red eyes stands on the roof ledge of a red brick tower under a full moon, red arrows marking the two columns of windows it is about to kick bricks down; below, among lit, cracked and smashed windows, a small teal repair robot swings a wrench at a cracked window while a brick falls past another, a purple bat crosses the row and a mug of cocoa steams on a sill. diff --git a/e63334287a3deaa3/leaderboard.js b/e63334287a3deaa3/leaderboard.js index 6ec181f5..65d7279e 100644 --- a/e63334287a3deaa3/leaderboard.js +++ b/e63334287a3deaa3/leaderboard.js @@ -269,6 +269,9 @@ { k: 'r2-afterburner', l: '29. Afterburner', chip: 'Afterburner', f: 'time', lo: 29.9, hi: 3600 }, { k: 'r2-final-exam', l: '30. Final Exam', chip: 'Final Exam', f: 'time', lo: 34.8, hi: 3600 }] }, { d: 'tidewick', n: 'Tidewick', st: [{ k: 'score', l: 'Best score', f: 'n', u: 'pt', hi: 999999 }] }, + { d: 'beatvault', n: 'Beatvault', st: [{ k: 'levels', l: 'Levels cleared (of 6)', chip: 'Levels', f: 'n', u: 'level', hi: 6 }, + { k: 'keys', l: 'Vault keys (of 18)', chip: 'Keys', f: 'n', u: 'key', hi: 18 }, + { k: 'clears', l: 'Clears (all time)', chip: 'Clears', f: 'n', u: 'clear', rate: 1 / 60 }] }, { d: 'odd-one-out', n: 'Odd One Out', st: [{ k: 'elo', l: 'Elo', f: 'elo', lo: 100, hi: 3000 }, { k: 'rfound', l: 'Most props found in a round', f: 'n', u: 'prop', hi: 15, le: 'found' }, { k: 'survive', l: 'Longest survival as a prop', f: 'dur', hi: 900 }, diff --git a/e63334287a3deaa3/m/index.html b/e63334287a3deaa3/m/index.html index 960e2cd3..a7b49c72 100644 --- a/e63334287a3deaa3/m/index.html +++ b/e63334287a3deaa3/m/index.html @@ -233,6 +233,7 @@

Arjun's games

['coil','Coil','Grow your snake and cut off the bigger ones.',0], ['lunge-line','Lokop','Pixel sword duels. Win, run, and drop into the pit.',1], ['tidewick','Tidewick','A rainy-harbour platformer: stomp, jump, and get past the Tollkeeper.',0], + ['beatvault','Beatvault','One button, every jump on the beat. Six songs and a level editor.',1], ['patchwork-tower','Patchwork Tower','Fix the windows while a gargoyle kicks bricks at you.',0], ['flickerwood','Flickerwood','A maze chase by moonlight: gather pollen, outfly four night critters.',0], ['lanternhold','Lanternhold','Co-op tower defense for up to 4: build towers and keep the lantern lit.',1], diff --git a/e63334287a3deaa3/m/thumbs/beatvault.jpg b/e63334287a3deaa3/m/thumbs/beatvault.jpg new file mode 100644 index 00000000..780d5dd5 Binary files /dev/null and b/e63334287a3deaa3/m/thumbs/beatvault.jpg differ