From 956ccf6e55435a35c21f6c41d565a325708c4de8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 11:13:15 +0000 Subject: [PATCH] Close the in-game shops for now: Chromeline, Spire, Asteroid Run, Blackwade, Starhop Nothing can be bought inside the games (one switch per game). Items a save already owns stay owned and usable, play-based unlocks still work, and coins, crystals and shards are never changed. Save formats are the same. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01Cw2rM7bPnNg2yG4QAgwCfu --- README.md | 10 +++---- e63334287a3deaa3/asteroid-run/es.js | 1 + e63334287a3deaa3/asteroid-run/index.html | 14 +++++---- e63334287a3deaa3/flipline/es.js | 2 +- e63334287a3deaa3/flipline/index.html | 9 ++++-- e63334287a3deaa3/hush-pools/index.html | 12 ++++++-- .../news/ngcoding10-close-game-shops.json | 29 +++++++++++++++++++ e63334287a3deaa3/spire/es.js | 1 + e63334287a3deaa3/spire/index.html | 10 +++++-- e63334287a3deaa3/starhop/index.html | 8 +++-- 10 files changed, 74 insertions(+), 22 deletions(-) create mode 100644 e63334287a3deaa3/news/ngcoding10-close-game-shops.json diff --git a/README.md b/README.md index b9d390c8..2d8df79f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/ironwing/`: Ironwing (**preview, admin page only**; Back Room folder; the display name lives in ONE constant, `IW.GAME_NAME` in `js/core.js`), the air entry in the Midnight Ops war series: a single-player campaign of carrier-fighter missions over the sea and the islands, flown from a third-person chase camera (three.js r187 with the r128 compatibility layer from `/lib/three/`, plus `../autores.js`; Web Audio; no Firebase, nothing online). **Preview gate:** like Midnight Ops, `window.IW_PREVIEW = true` at the top of `index.html` lets the game run only in a browser holding `ironwing:preview` = `1` (set by the "Ironwing (preview)" button on the admin page); without it the page says "Not available yet" and loads none of the game. While the preview is on, every mission is open for testing (`IW.unlocked`); set `IW_PREVIEW` to false to open the game, which also turns on the normal unlock order and play-time counting (`stats.js`), and then give it its card, phone row and What's new entry. **Missions** (`js/missions/`, registered as data with `IW.missions.register({id, num, title, kind, line, mood, briefing, loadout: {bombs, rockets}, build(M, data), setup(M, cp, data), medals})`, the same shape as Midnight Ops'): 0 **Flight School** (training: catapult launch from the carrier Resolute, five ring gates, four target drones, a practice raft to bomb, land back aboard), 1 **Dawn Strike** (carrier strike: sink two destroyers of a flotilla steaming west, a cruiser for the bonus, fighters overhead), 2 **Hold the Atoll** (base defence: scramble from Kestrel Field and break up three raids of level and dive bombers with escorts; the base is lost under 35% integrity), 3 **Fleet Shield** (fleet defence: torpedo bombers low from the west, dive bombers from the clouds, then both; keep the Resolute afloat), 4 **Fire on Kalder Reef** (base attack at sunset: fuel tanks, radar mast and heavy flak, fighters scrambling from the runway, then home to land). The script API is `M.obj/done/lose/when/after/say/checkpoint/fail/complete`; `M.ship()` and `M.structure()` spawn things that stay destroyed when a checkpoint is restored (each has a `uid`, and the checkpoint keeps the list of uids destroyed so far); three medal goals give gold, silver or bronze. To add a mission, copy one in `js/missions/`, give it the next `num`, and add its ``; it runs inside the game page, so it works the same when the game is opened directly or inside the home page, phone page or party layer. Play time: a second counts while the tab is visible and there was a real key, click, touch, mouse movement or gamepad input in the last 30 seconds (made-up events and the still "mouse moves" browsers send when the page changes don't count); a quiet stretch after that (thinking, a cutscene, waiting for the next round) is held back and counts once the player touches something again within 2 minutes, and is dropped if they don't (they walked away) or the tab is hidden. Only one tab or window of the browser counts at a time, the one with the latest input (localStorage `lbs:tab`, a claim renewed every second), so two Back Room windows side by side don't count the same minute twice. At most 24 hours a day are counted for all games together. Bests come two ways. Some it reads from what the game already saves (`READ` in the file): Coil `coil:best` (longest snake), Shell Crackers `shellcr-rank` (Elo, once you've played a rated match), Updraft `updraft:best` (best height, fastest summit), Spire `spire:profile` (fastest full tower, towers climbed), Tumble Trials `tumble-stats` (crowns, shows), Showdown `sd:pstats` (biggest pot and hands played in practice) and Trivium `trivium.daily.*` and `trivium.streak` (best finished Daily score, best Daily streak). The rest come from one-line hooks at the moment it happens in the game, `window.BackRoomStats && BackRoomStats.add('kills', 1)`: Shell Crackers kills (practice and online, not the training range), Rumble Karts wrecks and rounds you top, Backrooms 1v1–4v4 kills and match wins (against the Entity and online), deaths in those three games (`deaths`: Shell Crackers when you're cracked, again practice and online only; Backrooms when the Entity or another player gets you; Rumble Karts whenever you're wrecked, lava included) and, next to each kill hook, `kdkills` (the same kills or wrecks again, counted from the day deaths started being counted, so the K/D board isn't thrown off by kills from before; each game's own scoreboard also shows this match's or round's K/D next to the kills: Shell Crackers' standings table, the Backrooms results screen and the player's own row in Rumble Karts' results), Boostball goals and match wins, Coil cut-offs, Odd One Out props found and rounds your team wins, Chromaflage hiders found and rounds you stay hidden, and Slipstream's fastest lap per track (`BackRoomStats.min('lap:', seconds)`, every completed lap, including laps with a track cut: the game's penalties only add to the race time). Bests from a single round or race come from the same kind of hook with `max` (or `min` for times), next to the running counts: Slipstream's course record per track and race length (`rec::`, the full race time with any track-cut penalties added, as in the results, for a race you finished over every lap; `onFinish`), Rumble Karts' most wrecks in one round (`rwrecks`, counted per round id), Shell Crackers' and Backrooms' most kills in one match (`mkills`; Backrooms counts the Entity in practice and players online), Boostball's most goals in one match (`mgoals`, from the match's own goal count), Chromaflage's most hiders you found in one round and Odd One Out's most props you found in one round as a hunter (`rfound`), Odd One Out's survival as a prop in seconds (`survive`, the game's own `res.surv`: when you were found, or the whole hunt if you weren't), Spire's fastest full obby (`obby`, all 49 stages in one go from stage 1; a run continued from a checkpoint doesn't count) and Tumble Trials' most crowns in a row (`crownrun`, solo and online shows, counted within one visit to the page). The hooks only record; they don't change the games. The API is `add(stat, n)` (a running count, at most 100 at a time), `min(stat, value)` (a time: lower wins) and `max(stat, value)`; stat names are short lowercase words (`a-z`, `0-9`, `:`, `-`), and a name starting with `lap:` or `rec:` or listed in `LOWER` (`tower`, `summit`, `obby`, `total`, Putterby's `card9`, and the daily puzzles' `fewest`, `guesses`, `tries`, `fastest`, `fast-easy`, `fast-medium`, `fast-hard`) is lower-wins; `LOWER` is one list for every game, so a name in it must mean lower-wins in every game that uses it. At most 240 stats are kept per game (`MAX_STATS`; Slipstream can have a lap, a clean lap and six course records on each of 26 tracks). **Record seasons (how a game's records are reset for everyone):** nobody can delete other players' nodes, so a reset is done with names. `SEASON` (`{ slipstream: 2 }`) lists the games whose record stats (names starting `lap:`, `clap:`, `rec:` or `crec:`) carry a season. The game still calls `BackRoomStats.min('lap:', t)`; `bump` stores it under this season's name, `lap:s2:` (`seasonKey`). A stored record with no season in its name (season 1) or a lower season is `retired`, and `cleanG` leaves retired names out. The browser's store (`load`), the node as read in `apply` and an anonymous account being merged in all go through `cleanG`, so the old records are gone from the browser's store as soon as a page with this file loads and from the player's own node at that page's first publish (about a minute into play, in any Back Room game), without touching `s`, `elo`, the game's other stats or any other game; that also frees their places under the 240-name cap, which old and new names together could pass. Nothing brings them back: the "never below what this browser last saw" rule (`hw`) is for seconds only. A page from before the reset that is still open keeps writing season-1 names; a page with the current file strips them from the shared store the next time it saves and from the node the next time it publishes, and leaderboard.js never reads them, so they can sit in a node for a while but never show. A name from a season above this file's (a newer copy of the file in another tab) is kept. Slipstream is on season 2 since 17 November 2026. **To reset Slipstream's records again:** raise `SEASON.slipstream` by one here, set `SLIP_SEASON` in leaderboard.js to the same number and `SLIP_RESET` there to the date; the game doesn't change (leaderboard.js warns in the console if the two numbers differ on a page that has both). Only ever raise the number. A reset can't be undone by reverting the change: each player's old records are deleted from their node the first time their browser publishes with the new file. It also takes away the miles those records were worth (miles.js works from what leaderboard.js reads) until the player sets new times. **Counting once, and only up:** the browser keeps the seconds it hasn't sent yet, and each publish sends them as a batch that is *added* to the node's totals in a Firebase transaction (an atomic read-modify-write), never its own idea of the total. So two devices or browsers on one account add up, instead of each writing its own total over the other's (which made totals go up and down and kept only the larger device's time), and a browser never hands its time to the next account it signs in with. Each batch has an id (its time in ms) and the node keeps the last batch id from each device (`q`), so a batch that reached the database but wasn't marked sent (the page closed mid-way) is never added twice; a batch made under another account (a sign-in or sign-out since) goes to the current account unless that account's node already has it. Totals never drop below what the browser last saw committed (`hw`), so an older copy of stats.js still open somewhere can't lower them for good. Saved in the browser under localStorage `lbs:v2` (`{un: {: seconds not sent}, ud: {YYYYMMDD: {: seconds}}, d: day, ds: seconds counted that day, b: {: {: best}}, tc: {: seconds this browser ever counted}, out: the batch being sent {u, id, g, d}, hw: [[uid, {: seconds}]…] (last committed totals, 4 accounts), v1, lk, lkd}`), `lbs:dev` (this browser's device id) and `lbs:uid` (the account it last published under). **Before this version** the browser kept running totals in `lbs:v1` (`{g: {: {s, }}, d, ds, dy}`), shared by every account used in that browser; on the first load of this version its bests become `b` and its seconds are folded in once, into the account in `lbs:uid` keeping the larger (the old rule), or added to the first account it publishes under if it never published. `lbs:v1` is left alone. Published at most once a minute while something changed, and when the tab is hidden or the page closes (if already connected; otherwise the batch waits in the browser for the next publish of any game), to the Firebase Realtime Database (same project and rules as the games) at `rooms/lb-all/players/` (prefix `lb`, not an invite prefix): the shared rules only let a browser write its own node, need `n, c, x, z, h, ts` (`x`/`z`/`h` always 0) and refuse names longer than 14 characters, so the node is `n` (the Online name `ol:name`, else the Google account's first name, else the party name, else a game's saved name: the same order as the Online panel; a rename on the Back Room page reaches an open game as a `storage` event and the game republishes about 1.5 s later, at most every 10 s and only once it is already connected), `c` (colour), `ts` (server time), `v` (2; nodes still written by the older version say 1 and read the same), `st` (the seat tag from social.js, for convenience; readers work it out from the uid), `g` (`{: {s: seconds, : number}}`, `s` being the account's total over every device), `d` (play seconds per day per game for the last 30 days, `{YYYYMMDD: {: seconds, _: seconds}}` by the browser's local date; at most 30 days and 8 games a day, and the time in any further games that day goes into one `_` entry for all of them (`DAY_REST`; before it, a ninth game's time was simply left out of `d`), so a day's total is complete for the Leaderboards' This week board even when it isn't split by game past the first eight; at most 24 hours a day, `_` included; the oldest days are dropped until the whole node fits in 7,000 characters, under leaderboard.js's 8,000 limit), `q` (`{: last batch id}`, the 12 most recent devices), `lg` (`{: seconds}`, the totals as they stood when this version first wrote the node: "legacy" time, which may overlap between accounts used in one browser, so a merge keeps the larger of it instead of adding), `al` (`{: ms}`, anonymous accounts merged into this one, at most 8), `to` (on an anonymous account's node: the account it was merged into) and, only when the account it publishes under is a Google sign-in (not anonymous: the hub page's `account.js` sign-in that party.js reuses, or the game's own Firebase user), `ga: 1` and `gn` (the Google display name, 40 characters, never the email or photo URL); `av`, the player's edited avatar as a code (see `avatar.js`; taken from this browser's `avatar:v1` when it is for this account, else kept as the node has it); and `nt`, the colour of their name tile (`'t1:'` or `'t0'`, see `avatar.js`; taken from this browser's `nametile:v1` only when it is for this account and the account is a Google sign-in, else kept as the node has it). The admin page reads `d`, `ga` and `gn` (it skips `_`, which isn't a game); the Leaderboards read `d` for This week and ignore `ga` and `gn`. Older copies of stats.js still open somewhere drop `_` when they next write the node (their `cleanDays` doesn't know it), which only loses that overflow time from `d`, never from the totals. The node is never removed on disconnect, because it is the player's entry; clearing the browser doesn't wipe it either (only unsent seconds live in the browser). The older version overwrote the whole node, so while a tab with it is still open it can briefly lower a total or drop `q`, `lg` and `al`; the next publish of this version puts the total back. **Linking accounts:** the games sign in anonymously, and signing in with Google on a hub page makes a new account, so before this version the anonymous account's entry stayed on the boards as a second row with the same name (its hours were usually also in the Google entry, because the browser's record was shared). Now account-nudge.js keeps the anonymous user the hub page had and, the moment a Google sign-in arrives on that page, loads stats.js with `data-lib` and calls `BackRoomStatsLib.link()`: it writes `to: ` on the anonymous node while it can still act as that account (a second Firebase app in memory, given that user with `updateCurrentUser`), then the Google node merges it in its next transaction (time counted since batches is added, legacy time keeps the larger, bests the better, `al[]` set; done once, and remembered in `lbs:v2` as `lk`/`lkd`). leaderboard.js leaves an entry out only when both sides agree, so nobody can hide someone else's. Entries split before this version can't be linked this way (the anonymous sign-in is gone from the browser); the admin page suggests them and can merge them. Firebase: inside the home, phone or party layer it borrows that page's sign-in (`window.parent.Party`), so it's the same account the panels show (looked up again at every publish, so a Google sign-in on the hub page while a game is open is followed); if the game is online it uses the game's own Firebase; otherwise, after a minute, it loads the SDK in a hidden same-origin frame and signs in there (the same saved sign-in, so the same uid), so it never touches the game's own Firebase globals (Trivium's are another project). **Everything is self-reported by the player's own browser**, so someone with developer tools can write any numbers into their own node; leaderboard.js checks and caps what it shows, but it isn't cheat-proof. To add a stat for a new game: load stats.js in the game with its folder name, then either add a reader to `READ` for something the game already saves or add a one-line hook where it happens, and give the game a row in `GAMES` in leaderboard.js. A test hook (`window.__lbs`) exists only when `navigator.webdriver` is set. **Email (`ge`):** on a Google account, each publish carries the account's email sealed to the admin key (`adminkey.js`'s `BackRoomSeal` of `{ k: 'ge', e, u: uid }`, about 200 characters, loaded only when there's something to seal), sealed once per account in each browser (localStorage `lbs:ge`) and otherwise kept as the node has it; only the admin page opens it. Never on anonymous accounts, and never in the clear. **Miles kept across a records reset (`sx`):** before a game's retired record names are dropped (Slipstream's season 1), each write folds them into `sx` on the node, `{ slipstream: { l: { : best lap }, r: race records } }`, only ever added to (the quicker lap, the larger count; accounts merged in bring theirs) and carried on in every write. leaderboard.js reads `sx` and any retired names still on a node not written since the reset (`p.sx`, for miles only, never shown on a board), and miles.js counts per track the better of that lap and this season's, and the larger of the two record counts, so a reset never takes miles away. - `e63334287a3deaa3/leaderboard.js`: the Leaderboards (Back Room). A "Leaderboards" section under the games on the Back Room page and the phone page (one ``): Shell Crackers, Rumble Karts, Slipstream, Boostball, Coil, Showdown, Backrooms 1v1–4v4, Chromaflage, Spire, Turbo Trail, Escapade, Updraft, Odd One Out, Tumble Trials, Deepword, Puffer Party and Putterby. It does nothing unless the game is open inside a Back Room page whose Online panel offers `window.BackRoomChat` (the home page's game layer, the phone page, or party.js's own layer) and the player is in a party with someone else; a game opened on its own shows nothing new. Then the party chat shows as a small feed on the left (about a third of the way down; fewer lines on a short screen) that fades after 9 seconds and never takes clicks, with a one-time hint when the game opens. **T** opens a box to type in (Shell Crackers and Turbo Trail use **Enter** and Chromaflage **Y**, because T is one of their keys: `data-key` on the script tag, by `e.code`), Enter sends, Esc, the × or a click outside closes it; on a phone, the Chat button that `social.js` adds to the game's top bar opens the same box, so there's nothing new over the game's own touch controls. Spire's script tag has `data-left="72"` so the feed sits right of its progress bar. While the box is open the game is kept out of it: the keys and mouse buttons the game thinks are held get a keyup / mouseup first; every key event stops in a capture listener on `window` (added after the game's own, so only keybinds.js's capture listener, which only acts while its Controls panel is open, runs first), which leaves typing working; pointer lock is let go and asked for again when the box closes (Enter and clicks are user gestures, so it comes straight back), and the game's own `pointerlockchange` for that unlock is held back so it doesn't open its pause menu; if the browser won't give the lock back, the game is then told the mouse is free and shows its own pause or "click to play"; a see-through layer over the game catches clicks and taps. The key isn't taken while the player types in one of the game's own fields, or when they've moved one of the game's actions onto it in the Controls panel (read from `keybinds:` in localStorage); the top-bar Chat button still works then. Everything goes through `social.js` (encryption, block, mute, word filter, rate limit), so this file never touches Firebase and stores nothing. The box and feed live in a shadow root, so the game's CSS and this file's CSS don't mix. -- Archived Back Room games: `e63334287a3deaa3/starhop/`, `quarry/`, `kartwheel/`, `abyssal/` and `hail-mary/` are kept in the repo but taken off the Back Room page, the phone page (`GROUPS` in `m/index.html`) and the Parties list (`GAMES` in `party.js`). Their files, saved data and keybinds still work if someone opens the folder directly, and their prefixes stay in the invite routing (an old invite link opens nothing rather than the wrong game). The Online panel still names someone who is in one (`GAMES` in `social.js`, listed without `room`, so it offers no room invites), and the admin page keeps their names for old feedback notes (`SITE` in its script); they're left out of the feedback box's game list (`GAMES` in `feedback.js`). Abyssal's questions and answers were merged into Deepword's bank in November 2026 (Abyssal's own page is unchanged). To bring one back, restore its card, its `GROUPS` row, its feedback-box entry, its `room` in `social.js` and (for Kartwheel, Quarry and Hail Mary) its `GAMES` row in `party.js` from git history. **Archived daily puzzles (November 2026):** `top-bins/`, `crosslet/`, `outline/`, `sleight/`, `scout-report/`, `teamsheet/`, `deadline-day/`, `crossbar/`, `journeyman/`, `stat-duel/`, `quartets/`, `unfurl/`, `overland/` and `back-four/`, because hardly anyone played them. They had already lost their Back Room tile, their `GROUPS` row on the phone page and their `DAILY_GAMES` entry on 18 Nov 2026 (they sit in `RETIRED` on the Daily Puzzles page, so their old days still count toward the overall streak and nobody's streak dropped); archiving also took them out of the Leaderboards' Board menu and the mini badges (`gone: 1` on their rows in `GAMES` in `leaderboard.js`, which also ends their weekly titles). They were never in `party.js`, `social.js`, the feedback box or the invite routing. Everything else is kept: the folders and their data files (of the shared folders, `wordplay/` and `geo-data/` are still used by listed puzzles, Mainstream and Hotspot; `football-data/` is now used only by archived ones, and is kept for them), the `daily:` records, the stats players already have (still counted in hours and miles), their rates in `wallet.js`, their badge art in `miles.js`, their phone thumbnails (old What's new entries show them) and their boards on the game's own page. To bring one back, take `gone: 1` off its row, move its line from `RETIRED` up into `DAILY_GAMES`, and restore its tile and its `GROUPS` row from git history. +- Archived Back Room games: `e63334287a3deaa3/starhop/`, `quarry/`, `kartwheel/`, `abyssal/` and `hail-mary/` are kept in the repo but taken off the Back Room page, the phone page (`GROUPS` in `m/index.html`) and the Parties list (`GAMES` in `party.js`). Their files, saved data and keybinds still work if someone opens the folder directly, and their prefixes stay in the invite routing (an old invite link opens nothing rather than the wrong game). The Online panel still names someone who is in one (`GAMES` in `social.js`, listed without `room`, so it offers no room invites), and the admin page keeps their names for old feedback notes (`SITE` in its script); they're left out of the feedback box's game list (`GAMES` in `feedback.js`). Abyssal's questions and answers were merged into Deepword's bank in November 2026 (Abyssal's own page is unchanged). To bring one back, restore its card, its `GROUPS` row, its feedback-box entry, its `room` in `social.js` and (for Kartwheel, Quarry and Hail Mary) its `GAMES` row in `party.js` from git history. **Archived daily puzzles (November 2026):** `top-bins/`, `crosslet/`, `outline/`, `sleight/`, `scout-report/`, `teamsheet/`, `deadline-day/`, `crossbar/`, `journeyman/`, `stat-duel/`, `quartets/`, `unfurl/`, `overland/` and `back-four/`, because hardly anyone played them. They had already lost their Back Room tile, their `GROUPS` row on the phone page and their `DAILY_GAMES` entry on 18 Nov 2026 (they sit in `RETIRED` on the Daily Puzzles page, so their old days still count toward the overall streak and nobody's streak dropped); archiving also took them out of the Leaderboards' Board menu and the mini badges (`gone: 1` on their rows in `GAMES` in `leaderboard.js`, which also ends their weekly titles). They were never in `party.js`, `social.js`, the feedback box or the invite routing. Everything else is kept: the folders and their data files (of the shared folders, `wordplay/` and `geo-data/` are still used by listed puzzles, Mainstream and Hotspot; `football-data/` is now used only by archived ones, and is kept for them), the `daily:` records, the stats players already have (still counted in hours and miles), their rates in `wallet.js`, their badge art in `miles.js`, their phone thumbnails (old What's new entries show them) and their boards on the game's own page. To bring one back, take `gone: 1` off its row, move its line from `RETIRED` up into `DAILY_GAMES`, and restore its tile and its `GROUPS` row from git history. Starhop's **hangar shop is closed for now** (`SHOP_OPEN = false` above `renderHangar`, the owner's call): skins can't be bought with shards (they say "Coming soon"), owned skins still equip, shards still add up, and the in-run revive is unchanged; set it to `true` to open buying again. Touch: every game plays on a phone. Each game draws its own touch controls (a move stick, buttons, and drag-to-look for the first-person games) and shows them only on touch screens (`pointer: coarse`, or after the first touch), so the keyboard-and-mouse version is unchanged. The first-person games (Shell Crackers, Backrooms 1v1–4v4, Quarry) skip pointer lock on touch screens; in Quarry, taps in the inventory and crafting screens go to the same code as mouse clicks. diff --git a/e63334287a3deaa3/asteroid-run/es.js b/e63334287a3deaa3/asteroid-run/es.js index 64b65999..3b219dbe 100644 --- a/e63334287a3deaa3/asteroid-run/es.js +++ b/e63334287a3deaa3/asteroid-run/es.js @@ -46,6 +46,7 @@ if (window.BackRoomLang) BackRoomLang.add({ 'Weaves a glowing bridge over the holes ahead (Ability key or button, recharges).': 'Teje un puente brillante sobre los agujeros de adelante (tecla o botón de Habilidad, se recarga).', 'Cracked tiles hold': 'No rompe baldosas', 'Double jump': 'Doble salto', 'Glide': 'Planeo', 'Crystal magnet': 'Imán de cristales', 'Top speed, slides': 'Máxima velocidad, resbala', 'Biggest jump': 'El salto más grande', 'All-rounder': 'Equilibrado', '{n} (locked)': '{n} (bloqueado)', '(locked)': '(bloqueado)', + 'The shop is closed for now. Coming soon.': 'La tienda está cerrada por ahora. Próximamente.', 'Coming soon': 'Próximamente', 'Locked': 'Bloqueado', 'Speed': 'Velocidad', 'Sidestep': 'Esquive', 'Grip': 'Agarre', 'Unlock free: {x}.': 'Desbloqueo gratis: {x}.', 'clear {n} levels': 'supera {n} niveles', 'clear level {l} ({n})': 'supera el nivel {l} ({n})', 'Unlock now for ◆{n}': 'Desbloquear ya por ◆{n}', 'you have ◆{n}': 'tienes ◆{n}', 'Endless best: {d}': 'Récord infinito: {d}', 'None': 'Ninguna', 'Sparks': 'Chispas', 'Comet': 'Cometa', 'Embers': 'Brasas', 'Rainbow': 'Arcoíris', diff --git a/e63334287a3deaa3/asteroid-run/index.html b/e63334287a3deaa3/asteroid-run/index.html index aa022b6d..ba5e2fae 100644 --- a/e63334287a3deaa3/asteroid-run/index.html +++ b/e63334287a3deaa3/asteroid-run/index.html @@ -1049,6 +1049,9 @@

Level clear!

const clearedCount=()=>Object.keys(save.lv).length; const crystalTotal=()=>{let n=save.bank;for(const k in save.lv)n+=bits(save.lv[k].c);return n}; const wallet=()=>Math.max(0,crystalTotal()-save.spent); +// The shop is closed for now (the owner's call): runners and trails can't be bought with crystals. Runners still unlock free by playing, +// what a save already owns stays owned, and crystals still add up. Set this to true to open buying again. +const SHOP_OPEN=false; const isOpen=i=>i===0||!!save.lv[i]||PRED[i].some(p=>!!save.lv[p]); const freeMet=ch=>!!ch.free&&(ch.free.lv!=null?clearedCount()>=ch.free.lv:!!save.lv[ch.free.at]); const unlocked=ch=>ch.id==='pip'||save.own.includes(ch.id)||freeMet(ch); @@ -1543,7 +1546,7 @@

Level clear!

function renderChars(){ const box=$('chars');box.innerHTML=''; for(const ch of CHARS){const b=document.createElement('button');b.type='button';const ok=unlocked(ch); - b.innerHTML=charSvg(ch)+'';b.querySelector('b').textContent=ch.name;b.querySelector('small').textContent=ok?abilityOf(ch):'◆'+ch.cost; + b.innerHTML=charSvg(ch)+'';b.querySelector('b').textContent=ch.name;b.querySelector('small').textContent=ok?abilityOf(ch):SHOP_OPEN?'◆'+ch.cost:TX('Locked'); if(!ok)b.classList.add('locked');b.setAttribute('aria-pressed',String(save.ch===ch.id));b.setAttribute('aria-label',ch.name+(ok?'':' (locked)')); b.addEventListener('click',()=>{sfx.click();G.viewCh=ch.id;if(ok&&save.ch!==ch.id){save.ch=ch.id;saveNow();if(G.mode==='menu')startDemo()}renderChars()});box.append(b)} const ch=charById(G.viewCh||save.ch),ok=unlocked(ch); @@ -1552,16 +1555,17 @@

Level clear!

info.innerHTML='
'+bar('Speed',(ch.speed-10.5)/4.5)+bar('Sidestep',(ch.lat-6)/3.8)+bar('Grip',ch.accG/110)+bar('Jump',(ch.jh-1.6)/1.8)+'
'; info.querySelector('b').textContent=ch.name;info.querySelector('em').textContent=abilityOf(ch); info.querySelector('span').textContent=TX(ch.desc)+(ok?'':' '+TX('Unlock free: {x}.',{x:freeText(ch)})); - if(!ok){const can=wallet()>=ch.cost,bb=addBtn(info.querySelector('.buy'),'Unlock now for ◆'+ch.cost,'btn sm '+(can?'lime':'alt'),()=>{ - if(wallet()=ch.cost,bb=addBtn(info.querySelector('.buy'),'Unlock now for ◆'+ch.cost,'btn sm '+(can?'lime':'alt'),()=>{ + if(!SHOP_OPEN||wallet(){sfx.click();if(!own){if(wallet(){sfx.click();if(!own){if(!SHOP_OPEN||wallet()Crashed! // ======================= SAVE ======================= const SAVE_KEY='flipline:save',SAVE_V=1; +// The garage shop is closed for now (the owner's call): nothing can be bought, what a save already owns stays owned and can be chosen, +// and coins still add up from play. Set this to true to open buying again; nothing else needs to change. +const SHOP_OPEN=false; function freshSave(){return{v:SAVE_V,coins:0,veh:'hopper',rid:'sol',thm:'canyon',own:{hopper:1,sol:1,canyon:1}, best:{dist:0,score:0},daily:{d:'',dist:0,score:0,plays:0},lv:{},ch:{act:[0,1,2],next:3,done:0,prog:{}}, tot:{flips:0,dist:0,runs:0,crashes:0},feat:{},set:{mus:0.5,sfx:0.8,mute:0,fx:0,ghost:1},track:''}} @@ -2044,10 +2047,10 @@

Crashed!

for(const it of list){const own=owned(it.id),sel=it.id===cur;const d=document.createElement('div');d.className='item'+(sel?' sel':'')+(own?'':' locked'); const c=document.createElement('canvas');c.width=300;c.height=200;d.appendChild(c); const nm=document.createElement('b');nm.textContent=it.feat&&!own?'???':it.n;nm.setAttribute('data-noi18n','');d.appendChild(nm); - const sm=document.createElement('small');sm.textContent=it.feat?(own?TX('Secret'):TX(FEAT[it.feat])):own?(sel?TX('Riding'):TX('Yours')):TX('{c} coins',{c:NUM(it.cost)});d.appendChild(sm); + const sm=document.createElement('small');sm.textContent=it.feat?(own?TX('Secret'):TX(FEAT[it.feat])):own?(sel?TX('Riding'):TX('Yours')):SHOP_OPEN?TX('{c} coins',{c:NUM(it.cost)}):TX('Coming soon');d.appendChild(sm); const b=document.createElement('button');b.type='button';b.className='btn sm'+(sel?'':own?' teal':' clay'); - b.textContent=sel?TX('Chosen'):own?TX('Choose'):it.feat?TX('Locked'):TX('Buy');b.disabled=sel||(!own&&(it.feat||save.coins{if(!own){if(it.feat||save.coins{if(!own){if(!SHOP_OPEN||it.feat||save.coinsYOU ESCAPED const hardUnlocked = s => s.nw >= 2; function upgradeOpen(s, k) { const u = UPGRADES.find(x => x.k === k); return !!u && (!u.need || !!s.ever[u.need]); } function upgradeCost(s, k) { const l = s.up[k]; return l >= 3 ? null : UP_COST[l]; } +// The shop is closed for now (the owner's call): no equipment or upgrades can be bought. What a save already owns still comes on runs, +// upgrade levels are kept, and coins still add up. Set this to true to open buying again. +const SHOP_OPEN = false; +const SHOP_CLOSED_MSG = 'The shop is closed for now. Coming soon.'; function buyUpgrade(s, k) { + if (!SHOP_OPEN) return SHOP_CLOSED_MSG; if (!upgradeOpen(s, k)) return 'Locked: own that item first.'; const c = upgradeCost(s, k); if (c == null) return 'Already at level 3.'; if (s.coins < c) return 'Not enough coins.'; s.coins -= c; s.up[k]++; return ''; } function buyItem(s, k) { + if (!SHOP_OPEN) return SHOP_CLOSED_MSG; if (!(k in SHOP)) return 'Not for sale.'; if (s.own[k] >= CARRY_MAX) return 'You can carry ' + CARRY_MAX + '.'; if (s.coins < SHOP[k]) return 'Not enough coins.'; @@ -2755,16 +2761,16 @@

YOU ESCAPED

const tab = G.shopTab; [...document.querySelectorAll('#shop .tabs button')].forEach(b => b.classList.toggle('on', b.dataset.tab === tab)); $('shopH').textContent = tab === 'equip' ? 'Equipment' : 'Upgrades'; - $('shopWallet').innerHTML = 'You have ' + SAVE.coins + ' coins. Earn more by clearing rooms; everything stays in this browser.'; + $('shopWallet').innerHTML = 'You have ' + SAVE.coins + ' coins. Earn more by clearing rooms; everything stays in this browser.' + (SHOP_OPEN ? '' : ' ' + SHOP_CLOSED_MSG + ''); let h = ''; if (tab === 'equip') { h += '
' + ICONS[0] + '
PebblesFree: you start every run with ' + START_PEBBLES + ', and gray stones give ' + STONE_GIVES + ' more. Skip one across the water to lure it away.
'; const D = { bottle: 'One loud smash, and an echo after. A bigger decoy than a pebble.', toy: 'Rattles for ' + toyTimeOf(SAVE.up) + ' s where it lands. Keeps it busy.', flare: 'Stuns it for 5 s if it\'s within ' + flareRadiusOf(SAVE.up) + ' m, and frees a teammate it\'s holding.', rope: 'Pulls a downed teammate out from up to ' + ropeRangeOf(SAVE.up) + ' m away.' }; - ['bottle', 'toy', 'flare', 'rope'].forEach((k, i) => { h += '
' + ICONS[i + 1] + '
' + ITEM_NAMES[i + 1] + ' ' + SAVE.own[k] + '/' + CARRY_MAX + '' + D[k] + '
'; }); + ['bottle', 'toy', 'flare', 'rope'].forEach((k, i) => { h += '
' + ICONS[i + 1] + '
' + ITEM_NAMES[i + 1] + ' ' + SAVE.own[k] + '/' + CARRY_MAX + '' + D[k] + '
'; }); } else { UPGRADES.forEach(u => { const open = upgradeOpen(SAVE, u.k), c = upgradeCost(SAVE, u.k), l = SAVE.up[u.k]; h += '
' + u.n + '' + [0, 1, 2].map(i => '').join('') + '' + (open ? u.d : 'Own a ' + ITEM_NAMES[ITEMS.indexOf(u.need)].toLowerCase() + ' first.') + '
' + - '
'; }); + ''; }); } $('shopList').innerHTML = h; [...$('shopList').querySelectorAll('[data-buy]')].forEach(b => b.onclick = () => { const r = buyItem(SAVE, b.dataset.buy); $('shopMsg').textContent = r || 'Bought. It comes with you on your next run.'; if (!r) { saveSave(); sfx('ok'); } renderShop(); }); diff --git a/e63334287a3deaa3/news/ngcoding10-close-game-shops.json b/e63334287a3deaa3/news/ngcoding10-close-game-shops.json new file mode 100644 index 00000000..a27c286c --- /dev/null +++ b/e63334287a3deaa3/news/ngcoding10-close-game-shops.json @@ -0,0 +1,29 @@ +{ + "kind": "fix", + "title": "Game shops are closed for now", + "tags": [ + "Chromeline", + "Spire", + "Asteroid Run", + "Blackwade" + ], + "items": [ + "For now nothing can be bought inside the games: Chromeline's garage, Spire's coin hats, Asteroid Run's runners and trails, Blackwade's equipment and upgrades, and Starhop's skins.", + "Everything you already own is still yours to use, and nothing was taken away.", + "Your coins, crystals and shards are untouched and keep adding up as you play.", + "Things you unlock by playing, like Chromeline's secret vehicles, Spire's level hats and Asteroid Run's free runners, still unlock the same way.", + "In Blackwade, equipment you carry is still used up on a run and can't be restocked until the shop opens again." + ], + "es": { + "Game shops are closed for now": "Las tiendas de los juegos están cerradas por ahora", + "Chromeline": "Chromeline", + "Spire": "Spire", + "Asteroid Run": "Asteroid Run", + "Blackwade": "Blackwade", + "For now nothing can be bought inside the games: Chromeline's garage, Spire's coin hats, Asteroid Run's runners and trails, Blackwade's equipment and upgrades, and Starhop's skins.": "Por ahora no se puede comprar nada dentro de los juegos: el garaje de Chromeline, los sombreros de monedas de Spire, los corredores y estelas de Asteroid Run, el equipo y las mejoras de Blackwade y los aspectos de Starhop.", + "Everything you already own is still yours to use, and nothing was taken away.": "Todo lo que ya tienes sigue siendo tuyo para usarlo, y no se ha quitado nada.", + "Your coins, crystals and shards are untouched and keep adding up as you play.": "Tus monedas, cristales y fragmentos no se tocan y siguen sumándose mientras juegas.", + "Things you unlock by playing, like Chromeline's secret vehicles, Spire's level hats and Asteroid Run's free runners, still unlock the same way.": "Lo que se desbloquea jugando, como los vehículos secretos de Chromeline, los sombreros por nivel de Spire y los corredores gratis de Asteroid Run, se sigue desbloqueando igual.", + "In Blackwade, equipment you carry is still used up on a run and can't be restocked until the shop opens again.": "En Blackwade, el equipo que llevas se sigue gastando en cada partida y no se puede reponer hasta que la tienda vuelva a abrir." + } +} \ No newline at end of file diff --git a/e63334287a3deaa3/spire/es.js b/e63334287a3deaa3/spire/es.js index d48e7a80..b101cc97 100644 --- a/e63334287a3deaa3/spire/es.js +++ b/e63334287a3deaa3/spire/es.js @@ -47,6 +47,7 @@ if (window.BackRoomLang) BackRoomLang.add({ '{h}, {c} coins': '{h}, {c} monedas', ', {c} coins': ', {c} monedas', ', level {l}': ', nivel {l}', 'Lv {l}': 'Nv {l}', "Reach level {l} to wear the {h}. You're level {m}.": 'Llega al nivel {l} para usar: {h}. Estás en el nivel {m}.', 'The {h} costs {c} coins and you have {m}. Grab the coins on the way up, and finish towers for more.': '{h} cuesta {c} monedas y tienes {m}. Junta monedas mientras subes y termina torres para ganar más.', + 'Coming soon': 'Próximamente', 'Soon': 'Pronto', 'The hat shop is closed for now. Coming soon.': 'La tienda de sombreros está cerrada por ahora. Próximamente.', 'Buy the {h} for {c} coins?': '¿Comprar {h} por {c} monedas?', 'Buy': 'Comprar', 'The {h} is yours.': '¡{h} ya es tuyo!', // menu 'Climb to the top of the tower. Anything glowing red sends you back.': 'Escala hasta la cima de la torre. Todo lo que brilla en rojo te hace volver.', diff --git a/e63334287a3deaa3/spire/index.html b/e63334287a3deaa3/spire/index.html index 84744a93..81cbf5e3 100644 --- a/e63334287a3deaa3/spire/index.html +++ b/e63334287a3deaa3/spire/index.html @@ -2982,20 +2982,24 @@

You made it!

wizard:''}; function hatIcon(id){return ''} +// The hat shop is closed for now (the owner's call): the four coin hats can't be bought, hats already bought stay yours to wear, level hats +// still unlock by level, and coins still add up. Set this to true to open buying again. +const HAT_SHOP_OPEN=false; function hatMsg(html){const m=$('hatMsg');m.hidden=!html;m.innerHTML=html||''} function wearHat(id){myHat=id;store.set('hat',id);if(G.av)G.av.setHat(id);if(Net.refs)Net.upd({k:id});renderHats()} function renderHats(){ const box=$('hats');box.innerHTML=''; for(const h of HATS){ - const own=hatOwned(h),b=document.createElement('button'),lbl=T(h.n)+(own?'':h.coins?T(', {c} coins',{c:h.coins}):T(', level {l}',{l:h.lv})); + const own=hatOwned(h),b=document.createElement('button'),lbl=T(h.n)+(own?'':h.coins?(HAT_SHOP_OPEN?T(', {c} coins',{c:h.coins}):', '+T('Coming soon')):T(', level {l}',{l:h.lv})); b.type='button';b.className=own?'':'locked';b.setAttribute('aria-pressed',String(h.id===myHat));b.setAttribute('aria-label',lbl);b.title=lbl; - b.innerHTML=hatIcon(h.id)+(own?'':''+(h.coins?''+h.coins:'Lv '+h.lv)+''); + b.innerHTML=hatIcon(h.id)+(own?'':''+(h.coins?(HAT_SHOP_OPEN?''+h.coins:esc(T('Soon'))):'Lv '+h.lv)+''); b.onclick=()=>{sfx('ui'); if(own){wearHat(h.id);hatMsg('');return} if(!h.coins){hatMsg('Reach level '+h.lv+' to wear the '+esc(T(h.n))+'. You\'re level '+levelOf(profile.xp).l+'.');return} + if(!HAT_SHOP_OPEN){hatMsg(esc(T('The hat shop is closed for now. Coming soon.')));return} if(profile.coinsBuy the '+esc(T(h.n))+' for '+h.coins+' coins? '); - $('hatBuy').onclick=()=>{if(profile.coins{if(!HAT_SHOP_OPEN||profile.coinsPick a ship function resume() { if (G.state !== 'paused') return; G.state = 'play'; showScreen(null); last = performance.now(); } function quitRun() { finalizeRun(); rollMissions(); run = null; G.state = 'idle'; showMenu(); } +// The hangar shop is closed for now (the owner's call): skins can't be bought with shards, skins already owned stay yours to equip, +// and shards still add up. Set this to true to open buying again. +const SHOP_OPEN = false; function renderHangar() { $('#hShards').textContent = save.shards; $('#skins').innerHTML = SKINS.map(k => { const owned = save.owned.includes(k.id), eq = save.skin === k.id; - const st = eq ? 'Equipped' : owned ? 'Equip' : `${SHARD_SVG}${k.cost}${save.shards >= k.cost ? ' · Unlock' : ''}`; + const st = eq ? 'Equipped' : owned ? 'Equip' : !SHOP_OPEN ? 'Coming soon' : `${SHARD_SVG}${k.cost}${save.shards >= k.cost ? ' · Unlock' : ''}`; const glow = k.trail === 'rainbow' ? '#FFFFFF' : k.trail[0]; - return ``; + return ``; }).join(''); } $('#skins').addEventListener('click', e => { const btn = e.target.closest('.skin'); if (!btn) return; const k = skinById(btn.dataset.id); if (save.owned.includes(k.id)) { save.skin = k.id; sfx.click(); } + else if (!SHOP_OPEN) { sfx.deny(); toast('The hangar shop is closed for now. Coming soon.'); return; } else if (save.shards >= k.cost) { save.shards -= k.cost; save.owned.push(k.id); save.skin = k.id; sfx.buy(); toast(`${k.name} unlocked`, 'gold'); } else { sfx.deny(); btn.classList.remove('shake'); void btn.offsetWidth; btn.classList.add('shake'); toast(`Need ${k.cost - save.shards} more shards`); return; } persist(); renderHangar();