From 470807a738fd8c942d30ef0e82d8969e61121fca Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 16:54:36 +0530 Subject: [PATCH] Fastest climbing Aisles today MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **New: "Fastest climbing Aisles today"** panel at the top of the Back Room (right above Playing now), on the Back Room page, the home page's Back Room and the phone page. It ranks Aisles by the Elo their members won today in ranked games, with live green ▲ arrows and each Aisle's top climber. - **How:** `elo.js` now also adds each rated match's change to the player's own node `rooms/elo-day/players/` (today's New York date, change per game, total). The new `climb.js` listens to that one node and adds it up per Aisle. It writes nothing itself. - `aisles.js`: two small read-only helpers (`list()`, `tag(K)`). Loader lines in `index.html` (home page reveal), `e63334287a3deaa3/index.html` and `e63334287a3deaa3/m/index.html`. README and What's new updated. - Risk: low. One new Realtime Database path under `rooms/` written only by each player's own browser, with the fields the shared rules already require (no rules change). Self-reported like every Back Room stat. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016ZY4GY6KEVGmw5xYZiPbvp --- README.md | 1 + e63334287a3deaa3/aisles.js | 3 + e63334287a3deaa3/climb.js | 134 ++++++++++++++++++ e63334287a3deaa3/elo.js | 25 +++- e63334287a3deaa3/index.html | 1 + e63334287a3deaa3/m/index.html | 1 + .../news/aisles-climbing-today.json | 18 +++ index.html | 1 + 8 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 e63334287a3deaa3/climb.js create mode 100644 e63334287a3deaa3/news/aisles-climbing-today.json diff --git a/README.md b/README.md index c2e4a783..b24825f4 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/party.js`: Parties (Back Room). A Party panel above the games: create a party (5-character code) or join one, up to 8 people; the person who has been in it longest is the leader, picks a multiplayer game and presses Play together, and every member's browser opens that game in a new room (`#-p<6 random characters>`) and joins it. That room code (`p` + 6 characters from `rand`'s alphabet, no i, l, o, 0 or 1) is how a game knows a room is a party's: Showdown, Boostball, Coil, Slipstream, Sky Duel, Blockstorm, Tumble Trials, Driftfall's modes, Deepword and Puffer Party add no bots there (each game's `isPartyRoom`/`partyRoom`), so keep that pattern if you change `playTogether` or `rand`. Back returns everyone to the party. Party invite links are `/#pt-`: the home page holds them until the Back Room code is entered, then joins the party instead of opening a game. Works on the phone version too (`m/index.html` loads `party.js`, lends it its `openGame`, and sends `#pt-` invites to the party instead of Rumble Karts), and both after the home-page reveal (the home page's `reveal()` loads `party.js` from the Back Room folder and lends it `openGame` through `window.BackRoom`) and on the Back Room page opened directly (a `` right after `` (every Back Room game, the Back Room and phone pages, Hype Cycle Exchange, Boxed and the home page; not the admin page). `NameFilter.clean(name)` masks rude words at the start of a word after their first letter (`F***face`), the same way and with the same look-alike digits as `social.js`'s and `leaderboard.js`'s `mask`, and turns a name that hides one of the worst words some other way (`f.u.c.k`, `fuuuck`, `xfuckx`) into `Player`; clean names come back unchanged. On its own it cleans the name boxes the games use (`#name`, `#inName`, `#joinName`, `#hostName`, `#newName`, `#ptyName`, or any `input[data-name-filter]`, such as the Online name box) on load, on blur or change, and on any click, Enter or submit before the game's own handlers run, so Play, Join and Host always read a cleaned name; it doesn't change a name while it's being typed. `social.js`, `party.js`, `leaderboard.js` and `stats.js` also pass every name through it in their `cleanName`, so names other people already saved are masked where those panels show them. A new game gets it by using one of those ids for its name box (or `data-name-filter`) and adding the script tag. The word lists are stored in ROT13; the comment at the top of the file says how to add words, and which list also looks for words hidden inside names. - `e63334287a3deaa3/social.js`: Online (Back Room). An Online panel under the Party panel lists everyone who has the Back Room open, by name plus a seat tag worked out from their uid (rows 1–40, seats A–F, like `Nico · 14C`), so two people with the same name can be told apart (seats can still repeat now and then; there are 240). Each person shows as Idle, in a party (and its size), or in a game. **The list's size:** on a computer it scrolls inside a box 252 px tall, and the page carries on scrolling once the box reaches its end (it used to hold the scroll, so the mouse got stuck over a long list); on a phone (600 px wide or less) it isn't a scroll box at all, because a finger on it couldn't scroll the page past it, so it shows the first 6 people and a **Show everyone (N)** / **Show fewer** button (`PHONE_FEW` in social.js), while the Find box still searches everyone. **Redraws:** the panel's draw runs every time anyone online changes anything (each person's 15-second heartbeat included), so the list, your badge row, your name card and the open drawer are only rebuilt when what they'd show actually changed (`swapIn` and `drawnSig` compare against what was built last time, ignoring avatar.js's clip-path ids, not against the page, because aisles.js and lang.js add to the drawn copy); and while a mouse button or finger is down in the panel or drawer nothing there is redrawn until it comes up (`pressing`), so a click is never lost to a rebuild. The drawer's list is full height so the drawer itself scrolls and keeps its place; the people view opens at the top. The name starts as the signed-in account's first name, else the saved party or game name, and can be changed in the panel (saved as `ol:name`). **One name everywhere:** `ol:name` is the player's name for the Online panel, the Party panel and the Leaderboards, in one order (`ol:name`, then the Google account's first name, then `party:name`, then a game's saved name) in `social.js`, `party.js` and `stats.js`. A rename in the Online box (or the Party panel's name box, which saves both keys) is written to the Online node and, while in a party, to the party node within half a second, so other people see it in about a second; `social.js` also sets just `n` on the player's leaderboard entry (`rooms/lb-all/players//n`, only if the entry exists, at most every 4 seconds; once after each page load too, so an entry left with an old name catches up), and fires `backroom:name` (`{uid, n, mine}`) on `document`, as it does when someone else's Online node changes name, so the Leaderboards rename that row at once without a new read. Other tabs follow through the `storage` event. Measured with two windows: before, a rename reached the other window's Online list in 0.8 s but never reached the Party panel (the party node kept `party:name`), and the leaderboard entry only changed the next time a game published (up to 60 s with a game open, never without one; the other window needed a Refresh after that); after, Online 0.9 s, Party 0.9 s, Leaderboards 1.2 s live and the entry in about 2 s. Game name boxes (`ss:name`, `shellcr-name` …) stay each game's own and don't rename you; party launches fill them with the one name. Hide me (`ol:hidden`) takes you off the list, and you can't chat while hidden. **Joinable games:** next to Hide me, **Let people join my games** (localStorage `ol:join`, `'0'` = off; on by default; saved with the account by account-nudge.js; also a "Let people join: On / Off" button in the Online drawer, for use over a game) lets anyone in the Back Room join the online game you're in, party or not. While it's on, you aren't hidden and you aren't in a party set to Private, your Online node carries `jg` (game key from party.js's `GAMES`), `jr` (room code after the game's prefix) and `jt` (when you got there, server time); they're removed when you leave the room or switch it off, and go stale with the node's heartbeat like everything else there. Single-player games and games not in party.js's `GAMES` are never advertised. **Finding the room:** the game runs in its own window (the home page's game layer, the phone page's frame, or party.js's layer on the Back Room page, where party games now open instead of replacing the page) and keeps its connection to itself (every game's `Net` sits inside the game's own function, so the page can't read it). So social.js lists the rooms the open game could be in: the room in the game's address (`#-`, which every party game sets when it joins a room by code), the room party.js launched it into, the code in its room box, and its Quick match rooms (`pub-1` to `pub-6`; Rumble Karts' `lobby` to `lobby-6`). It reads `rooms//players//ts` for each (one small read each) and takes the first that heard from you in the last 20 s; the found room is checked again every 4 s while the game is open, the others every 6 s until one matches. Not covered: Backrooms' Quick match (it pairs two players into a 1v1 room with no code), single-player modes, and a game opened in its own tab. Everyone in a joinable game gets a **Join** button on their row ("In Shell Crackers · Join", or **Queue** when the room is full and the game plays in rounds), from playingnow.js's checks (`window.BackRoomPlaying`); it opens the game in that room the same way Playing now does, and closes the drawer if it was open over a game. When someone's node starts advertising the room you're in after you got there, a small toast says "Ben joined your game" for 5 s (not for your own party, who arrive together; not for blocked or muted people). **Queue notices:** when someone starts Playing now's **Queue for next game** for a full room, their node carries `qg`, `qr`, `qt` (below) and everyone whose open game is in that room gets a toast "Ben · 14C is queued for your game" with their avatar, for 5 s, over the game (the same toast box and size as "joined your game"). Once per queue start and only within a minute of it (a queue seen later, after a reload say, shows in the lists but not as a toast); at most one toast per person per room every 3 minutes (kept in the tab, so starting and leaving a queue over and over can't flood a room); queues that start within about a second of each other, or while the last queue toast is still up, become one toast ("Ben · 14C and 2 others are queued for your game"). Not from blocked or muted people. Your own party members do get it: a join is skipped because the party arrives together, but a party member waiting outside a full room is news. The room you're in is found the same way as for jg/jr (now also while "Let people join my games" is off, hidden or in a Private party, so everyone in the room can be told; only the advertising still depends on the setting). Everyone sees "Queued for Coil" on a queued person's row ("Queued for your game" for the people in that room), and the Find box matches it. A player with Hide me on can still queue but has no node, so nobody is told, and the queue message says so. Tap someone to open their card: Request to chat, invite them to your party (one is created first if you're not in one; they get a Join / No thanks card and Join puts them in your party through party.js), or send them a room code (pick a game and a code; while you're in a game it fills in the room you're in). Private messages need a chat request first: the other person gets a toast and a card with Accept / Decline (and Block), and only once they accept can either side message the other; a message from someone who hasn't been accepted (an older client, say) is dropped, and that person's thread just says to request a chat or to accept theirs. A request runs out after 10 minutes if nobody answers, and then the requester can ask again (one open request per pair; at most one request per person every 10 minutes and ten in 10 minutes in all); a declined request shows "Declined" and can be repeated after the same 10 minutes. If both people request each other at once, that counts as a yes. Accepted pairs are kept in this browser (`ol:chats`, uid to time, at most 60) so you don't have to ask again every visit; End chat in the thread forgets the pair here and tells the other side, which forgets it too. Party invites and room codes aren't chat, so they don't need a request; the cabin chat is unchanged. **Parties:** people in the same party can message each other straight away, without the chat request (their card says so and has no Request to chat button); "the same party" comes from party.js's own member list (the `rooms/pt-` nodes, through `Party.members`), minus anyone on the current leader's kick list (`Party.out`), never from what someone writes in their Online node, so nobody can claim to be in your party. Outside a party, and once someone leaves or is removed, the request is needed again. Block, session block and mute work exactly as before (a blocked party member can't message you and is hidden). **Party chat:** a group chat for the party, opened from the Party chat button in the Online panel (shown while in a party), in the Party panel, in the people drawer, or in a game (see `gamechat.js`). Each message is sealed separately to every member who is in the party at that moment and online here (not to anyone you blocked), with the same ECDH + AES-GCM as private messages, and kept in your own node as `pc/` (the last 6 to each member, `{ i, t, b }`; inside: `{ f, to, k: 'g', c: party code, x: text }`); copies for people who leave the party are dropped, and the oldest copies are trimmed if the node would grow past 50,000 characters. The node also carries `av`, the player's edited avatar as a code (see `avatar.js`; absent if never edited), and `nt`, the colour of their name tile (`'t1:'` or `'t0'`, see `avatar.js`; absent if never chosen), which colours their card in the list and in the drawer. A browser only shows a party message that names its current party code and comes from someone on its current member list, so only the party can read the chat, and people who join later don't see earlier messages; everyone online can see that something was sent to whom and when, as with private messages. Blocked and muted people's party messages are hidden (like the cabin chat), the word filter and the shared rate limit (one message every 1.5 s, five in 10 s) apply, a party message from someone else shows a toast when no game is showing it, and party chat is never logged. Report in someone's private conversation also includes the last 20 party-chat messages (everyone's, marked `[party]`) when that person wrote in the party chat, and the confirm box says so. The party chat is kept for the tab in sessionStorage `ol:pchat` (`{ c: code, m: [...] }`, 80 messages) and starts empty in a new party. `window.BackRoomChat` (`state`, `recent`, `send`, `listen`, `seen`, `open`) lets the in-game chat inside a game's iframe read and send it through this page; it only hands out messages already checked, filtered and masked here. While a game is open, a Chat button next to Online in the game's top bar (shown while in a party with someone) opens the game's own chat box, or the Party chat drawer for a game without one. Deepword is in `GAMES` too (status "In Deepword", room codes), so its top bar gets these buttons. **Join party / Request to join:** when someone's party is Public (its leader's node carries `pp`, see party.js), the leader's row in the list has a Join party button ("Party full" at 8; a game's Join button takes its place while the party's game is joinable), the card of anyone in that party has Join party in place of Request to join, and their status reads "Public party of 3"; it joins through `Party.join(code, true)`, which refuses if the party has gone Private, is full, or its leader removed you in the last 10 minutes, and asks first if you'd be leaving a party of your own. Otherwise the card of someone in a party has Request to join, next to Invite to party. It sends a sealed `j` to that party's leader: to them if they lead it, otherwise to their leader when that person is online (the card says so and shows how it's going, with a button to open the leader's chat); if a `j` reaches someone who isn't the leader (their leader is offline, say), their browser answers `x` with `lead` and who the leader is, and the requester sees "Only the leader can accept — ask " with an Ask button when that leader is online. A leader with room gets a toast and a card with Let them in / Decline; Let them in sends `y` with the party code, and the requester gets a Join party button (toast and card) that joins through party.js, so a person who was kicked is still kept out by the party's own 10-minute rule; Decline sends `x`. A full party (8), someone who isn't the leader, or someone no longer in a party answers `x` straight away with the reason. One open request per party (per leader) at a time, 10 minutes to answer, a repeat only 10 minutes after a no, and the same ten-requests-in-10-minutes limit as chat requests; a `y` or `x` only counts when it answers a request this tab sent. Join-request state lives in the thread in sessionStorage (`jq`, `jx`, `jw`, `jc`, `jl`, `jln`, `jin`, `jnd`), like chat requests. Room invites only ever become the site's own invite links (`/#-`, Rumble Karts `/#`) built from a known game and a checked code, never a link someone typed, and opening one goes straight into that game's room. The cabin chat is one public chat for everyone online; it shows the last 30 minutes from people who are still here. Each cabin message is also saved, sealed, to Firestore `chatlog` for the admin page (see below). A Privacy link to `/privacy.html` sits at the bottom of the panel. Mute (`ol:mute`) hides someone's cabin-chat messages and silences their notifications; Block (`ol:block`) also hides them from the list and hides their messages, requests and invites; both are saved only in this browser. Block for this session does the same as Block but is kept in sessionStorage (`ol:sblock`), so it's forgotten when the tab closes; the Blocked section of the people view lists both, with "(this session)" on the latter, and Unblock clears either. While a game is open in the page's game layer (home page, phone page, or a party launch), an Online button in the game's top bar opens the same list, chats and invites, and the status shows "In "; a game opened by its card on the Back Room page opened directly leaves the page, so that person goes offline until they come back. Loaded like party.js: a ` + diff --git a/e63334287a3deaa3/m/index.html b/e63334287a3deaa3/m/index.html index 64a12031..e9577d75 100644 --- a/e63334287a3deaa3/m/index.html +++ b/e63334287a3deaa3/m/index.html @@ -395,6 +395,7 @@

ASCoding games

// Avis miles (avismiles.js): the claim dialog, opened from the Online panel or #avis-miles. var avm=document.createElement('script');avm.src=B+'avismiles.js';document.body.appendChild(avm); var pn=document.createElement('script');pn.src=B+'playingnow.js';document.body.appendChild(pn); + var cl=document.createElement('script');cl.src=B+'climb.js';document.body.appendChild(cl); // Fastest climbing Aisles today (climb.js) // Your school (school.js): fills in the [data-school] box under the header. var sk=document.createElement('script');sk.src=B+'school.js';document.body.appendChild(sk); diff --git a/e63334287a3deaa3/news/aisles-climbing-today.json b/e63334287a3deaa3/news/aisles-climbing-today.json new file mode 100644 index 00000000..3e74e8a1 --- /dev/null +++ b/e63334287a3deaa3/news/aisles-climbing-today.json @@ -0,0 +1,18 @@ +{ + "kind": "feature", + "title": "Fastest climbing Aisles today", + "tags": ["Aisles", "Elo"], + "items": [ + "A new board at the top of the Back Room shows which Aisles are climbing fastest today, with live green arrows.", + "It adds up the Elo every member wins in ranked games today, and names each Aisle's top climber.", + "It starts fresh every day, so any Aisle can top it." + ], + "es": { + "Fastest climbing Aisles today": "Los Aisles que más suben hoy", + "Aisles": "Aisles", + "Elo": "Elo", + "A new board at the top of the Back Room shows which Aisles are climbing fastest today, with live green arrows.": "Una nueva tabla arriba del Back Room muestra qué Aisles están subiendo más rápido hoy, con flechas verdes en vivo.", + "It adds up the Elo every member wins in ranked games today, and names each Aisle's top climber.": "Suma el Elo que cada miembro gana hoy en partidas con rango y nombra a quien más sube en cada Aisle.", + "It starts fresh every day, so any Aisle can top it.": "Empieza de cero cada día, así que cualquier Aisle puede llegar arriba." + } +} diff --git a/index.html b/index.html index 62462da9..7d01179a 100644 --- a/index.html +++ b/index.html @@ -441,6 +441,7 @@

Productivity

if(/^xj-[0-9a-z]{16}$/.test(room)){try{sessionStorage.setItem('aisle:inv',room.slice(3))}catch(e){}room=''} var ai=document.createElement('script');ai.src=dir+'aisles.js';document.body.appendChild(ai); var pn=document.createElement('script');pn.src=dir+'playingnow.js';document.body.appendChild(pn); // Playing now: public parties' games (playingnow.js) + var cb=document.createElement('script');cb.src=dir+'climb.js';document.body.appendChild(cb); // Fastest climbing Aisles today (climb.js) // The seasonal look (seasons.js) is only for the Back Room, so the home page loads it once the Back Room is open. var se=document.createElement('script');se.src=dir+'seasons.js';document.body.appendChild(se); // The Turkey Week switch (events.js) is a button in the Back Room's header, which was copied in above; this fills it in.