diff --git a/README.md b/README.md index f1d723aae..e102924d5 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Horizon is downloaded only through **the Horizon launcher**: get it from [playho -It lists Horizon's releases and installs the build for your platform, shows each release's patch notes and the roadmap, updates Horizon and itself, and doubles as a command-line tool and an MCP server. See [the launcher's README](launcher/README.md). +It lists Horizon's releases and installs the build for your platform, shows each release's patch notes, updates Horizon and itself, and doubles as a command-line tool and an MCP server. See [the launcher's README](launcher/README.md). ## Screenshots @@ -151,7 +151,7 @@ The client starts on the title screen. Command-line options (`--world`, `--seed` ## Project status -The table below is the project's own audit of each subsystem. Every subsystem now matches vanilla in every harness that compares it. 100% means 100% of what the harnesses compare, not proof that nothing else differs. The remaining known differences and the final checks are listed in the roadmap. +The table below is the project's own audit of each subsystem. Every subsystem now matches vanilla in every harness that compares it. 100% means 100% of what the harnesses compare, not proof that nothing else differs. The remaining known differences are listed below. ### Java parity: 100% @@ -180,18 +180,9 @@ them too (Rust uses Java's own float maths on each platform). | Audio | 1 | None: the sound engine, sound events, music, situational music, ambience and subtitles match vanilla | | Block behaviours and ticking | 1 | None: block updates, random ticks, redstone, dispensers (6,000 cases), crafters (4,000 crafts), block entity removal (containers spill, 4,000 cases), copper golem chest sorting and the sculk family (435 scenarios: shrieker warnings and warden summoning included) match vanilla | -### Roadmap +### Known issues -**Known differences.** Online-mode servers (Mojang's session servers) are not supported; skins served over https show the default skin unless already cached; pack icons show the unknown-pack texture in game; the creative hotbar keys (C/X) aren't wired to the hotbar loader; item tooltips lack attribute lines. - -**Final checks.** A from-scratch audit (`tools/parity.py --all`) on Linux and on macOS, and the launch checks on the packaged Linux, macOS and Windows builds listed in [Rust rewrite status](docs/rust-parity.md#completion-criteria-and-playable-builds). - -**Next.** With vanilla parity as the base: - -- **Performance optimisation:** take the client and the server as far as they can go (rendering, chunk generation and meshing, memory, multithreaded ticking), building on v2026.10.13.1's faster renderer, while the differential harnesses keep gameplay identical to vanilla. -- **Mod support:** a stable API for writing and loading mods against Horizon. -- **Built-in recording:** capture gameplay video in a keypress, without external tools. -- **Automatic version updates:** a pipeline that ports each new Minecraft release on its own: compare the new version with the pinned one, regenerate the data, rewrite the changed parts and prove them with the same differential harnesses. +Online-mode servers (Mojang's session servers) are not supported; skins served over https show the default skin unless already cached; pack icons show the unknown-pack texture in game; the creative hotbar keys (C/X) aren't wired to the hotbar loader; item tooltips lack attribute lines. ## Contributing diff --git a/launcher/README.md b/launcher/README.md index 25e9882cb..6b91a0a66 100644 --- a/launcher/README.md +++ b/launcher/README.md @@ -18,7 +18,6 @@ The opening, then Play ([clip](docs/opening.webm)): 26.3 server jar from that version's own json, Python 3.10+ and Java 25), then starts the client, or a server (`--dedicated --nogui`) in a folder you choose, with a live console. - **Patch notes**: each release's notes, newest first, with a link to GitHub Sponsors. Quiet "Join Discord" and "Website" links sit in the sidebar footer. -- **What's next**: the README's roadmap, from main. Data lives in the platform's data directory (`~/.local/share/horizon-launcher` on Linux, `~/Library/Application Support/horizon-launcher` on macOS, `%APPDATA%\horizon-launcher` on @@ -62,7 +61,6 @@ The same binary is a command-line tool; without a subcommand it opens the window horizon-launcher play [--version ] horizon-launcher server [--dir ] [--version ] [--accept-eula] horizon-launcher notes [] patch notes as plain text - horizon-launcher next the roadmap horizon-launcher links the Discord, sponsor and website links horizon-launcher menu-style [horizon|classic] show or set the game's menu style horizon-launcher update [--check] Horizon and the launcher @@ -80,7 +78,7 @@ scripts and tests). (with the full path to the binary if it is not on your `PATH`). Its tools: `list_versions`, `install_version`, `remove_version`, `prepare_resources`, `launch_client`, `start_server`, -`server_command`, `server_log`, `stop_server`, `patch_notes`, `roadmap`, `links`, `menu_style` and `check_updates`. +`server_command`, `server_log`, `stop_server`, `patch_notes`, `links`, `menu_style` and `check_updates`. A server started through MCP stops (cleanly, with `stop`) when the session ends. Starting one needs `accept_eula`, which an agent should only pass with the player's consent. diff --git a/launcher/src/backend.rs b/launcher/src/backend.rs index f83716966..4013d7ca0 100644 --- a/launcher/src/backend.rs +++ b/launcher/src/backend.rs @@ -188,29 +188,6 @@ pub fn latest(releases: &[Release]) -> Option<&Release> { releases.iter().find(|r| r.asset.is_some()) } -/// The README's roadmap section from main (the project status section if it has none). -pub fn roadmap() -> Result { - let url = format!("https://raw.githubusercontent.com/{REPO}/main/README.md"); - let readme = get(&url)?.into_string().map_err(|e| e.to_string())?; - let level = |l: &str| l.chars().take_while(|c| *c == '#').count(); - for title in ["Roadmap", "Project status"] { - let lines: Vec<&str> = readme.lines().collect(); - if let Some(start) = lines - .iter() - .position(|l| level(l) > 0 && l.trim_start_matches('#').trim() == title) - { - let depth = level(lines[start]); - let section: Vec<&str> = lines[start + 1..] - .iter() - .take_while(|l| !(level(l) > 0 && level(l) <= depth)) - .copied() - .collect(); - return Ok(section.join("\n").trim().to_string()); - } - } - Err("The README has no roadmap section yet.".into()) -} - /// The community, sponsor and website links, from `launcher/links.json` on main, so they can change /// without a launcher release. An empty address hides its button. #[derive(Clone, Debug, PartialEq, serde::Serialize)] @@ -1094,7 +1071,6 @@ pub enum Job { pub enum Msg { Releases(Result, String>), - Roadmap(Result), Links(Links), Progress(String, f32), Installed(String, Result<(), String>), diff --git a/launcher/src/cli.rs b/launcher/src/cli.rs index 67ace9a82..df78436aa 100644 --- a/launcher/src/cli.rs +++ b/launcher/src/cli.rs @@ -59,8 +59,6 @@ enum Cmd { }, /// Show a release's patch notes (default: the newest) Notes { tag: Option }, - /// Show the roadmap - Next, /// Show the Discord, sponsor and website links Links, /// Show or set the game's menu style (classic is vanilla's own screens) @@ -240,14 +238,6 @@ fn execute(command: Cmd, as_json: bool) -> Result<(), String> { ); } } - Cmd::Next => { - let roadmap = backend::roadmap()?; - if as_json { - json(serde_json::json!({ "roadmap": roadmap })); - } else { - print!("{}", backend::markdown_to_text(&roadmap)); - } - } Cmd::Links => { let links = backend::links(); if as_json { diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 3a46184a5..7dbac7b5a 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -26,16 +26,14 @@ enum Page { Play, Versions, Notes, - Next, Settings, } impl Page { - const ALL: [(Page, &'static str); 5] = [ + const ALL: [(Page, &'static str); 4] = [ (Page::Play, "Play"), (Page::Versions, "Versions"), (Page::Notes, "Patch notes"), - (Page::Next, "What's next"), (Page::Settings, "Settings"), ]; fn index(self) -> usize { @@ -121,7 +119,6 @@ struct Launcher { bar: (f32, f32), mode: Mode, releases: Load>, - roadmap: Load, installed: Vec, installing: Option<(String, f32)>, install_error: Option<(String, String)>, @@ -202,7 +199,6 @@ impl Launcher { bar: (0., 0.), mode: Mode::Client, releases: Load::Loading, - roadmap: Load::Loading, installed, installing: None, install_error: None, @@ -235,7 +231,6 @@ impl Launcher { } }); this.fetch_releases(); - this.fetch_roadmap(); this.fetch_links(); this.check_updates(); this @@ -312,21 +307,12 @@ impl Launcher { }); } - fn fetch_roadmap(&mut self) { - self.roadmap = Load::Loading; - let tx = self.tx.clone(); - std::thread::spawn(move || { - let _ = tx.send(Msg::Roadmap(backend::roadmap())); - }); - } - fn drain(&mut self, cx: &mut Context) { let mut changed = false; while let Ok(msg) = self.rx.try_recv() { changed = true; match msg { Msg::Releases(r) => self.releases = r.map_or_else(Load::Failed, Load::Ready), - Msg::Roadmap(r) => self.roadmap = r.map_or_else(Load::Failed, Load::Ready), Msg::Links(links) => self.links = links, // The page reads is_prepared when drawn; `changed` redraws it. Msg::Reused(_) => self.installed = backend::installed(), @@ -2044,27 +2030,6 @@ impl Launcher { } page.child(list) } - - fn next_page(&mut self, cx: &mut Context) -> Div { - let t = self.theme; - let page = div().flex().flex_col().gap(px(24.)).child(page_header( - "What's next", - "The roadmap, from the README on GitHub.", - &t, - )); - match &self.roadmap { - Load::Loading => page.child(centered("Loading the roadmap…", &t)), - Load::Failed(e) => page.child(centered(e, &t).child( - button("retry-roadmap", "Try again", Kind::Secondary, &t).on_click(cx.listener( - |this, _: &ClickEvent, _, cx| { - this.fetch_roadmap(); - cx.notify(); - }, - )), - )), - Load::Ready(text) => page.child(divider(&t)).child(markdown::render(text, &t)), - } - } } /// A thin bar. A known fraction eases from its previous value; an unknown one shuttles slowly. @@ -2111,7 +2076,6 @@ impl Render for Launcher { Page::Play => self.play_page(cx), Page::Versions => self.versions_page(cx), Page::Notes => self.notes_page(cx), - Page::Next => self.next_page(cx), Page::Settings => self.settings_page(cx), }; // The new page fades in and rises a few pixels. diff --git a/launcher/src/markdown.rs b/launcher/src/markdown.rs index ee50f6470..2ff536b0f 100644 --- a/launcher/src/markdown.rs +++ b/launcher/src/markdown.rs @@ -1,4 +1,4 @@ -//! Release notes and the roadmap: pulldown-cmark events into gpui elements. +//! Release notes: pulldown-cmark events into gpui elements. use crate::theme::Theme; use gpui::{ div, prelude::*, px, AnyElement, FontStyle, FontWeight, HighlightStyle, SharedString, diff --git a/launcher/src/mcp.rs b/launcher/src/mcp.rs index af9f901bc..fa5145464 100644 --- a/launcher/src/mcp.rs +++ b/launcher/src/mcp.rs @@ -37,7 +37,6 @@ fn tools() -> Value { { "name": "stop_server", "description": "Stop the running server cleanly (it saves the world), killing it if it does not stop within 30 seconds.", "inputSchema": none }, { "name": "patch_notes", "description": "A release's patch notes as markdown.", "inputSchema": { "type": "object", "properties": { "tag": { "type": "string", "description": "Default: the newest release." } } } }, - { "name": "roadmap", "description": "What's planned next for Horizon, from the README's roadmap.", "inputSchema": none }, { "name": "links", "description": "The Horizon links: the Discord invite, the GitHub Sponsors page and the website (an empty one is not offered).", "inputSchema": none }, { "name": "menu_style", "description": "Show or set the game's menu style. \"horizon\" is Horizon's own menus, \"classic\" is vanilla's screens, which have no way back inside the game. The game reads it when it starts.", "inputSchema": { "type": "object", "properties": { "style": { "type": "string", "enum": ["horizon", "classic"], "description": "Omit to show the current style." } } } }, @@ -193,7 +192,6 @@ impl Session { r.body )) } - "roadmap" => backend::roadmap(), "links" => Ok(serde_json::to_string_pretty(&backend::links()).unwrap()), "menu_style" => { if let Some(name) = arg_str(args, "style") { diff --git a/website/Caddyfile b/website/Caddyfile index ebda45386..f0ba13136 100644 --- a/website/Caddyfile +++ b/website/Caddyfile @@ -20,7 +20,7 @@ Referrer-Policy strict-origin-when-cross-origin X-Frame-Options DENY Permissions-Policy "interest-cohort=(), browsing-topics=(), camera=(), microphone=(), geolocation=()" - Content-Security-Policy "default-src 'self'; script-src 'self' {$CSP_SCRIPT}; style-src 'self' {$CSP_STYLE}; img-src 'self' data:; font-src 'self'; connect-src 'self' https://api.github.com https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'" + Content-Security-Policy "default-src 'self'; script-src 'self' {$CSP_SCRIPT}; style-src 'self' {$CSP_STYLE}; img-src 'self' data: https://avatars.githubusercontent.com; font-src 'self'; connect-src 'self' https://api.github.com https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'" -Server } @assets path /assets/* diff --git a/website/LEGAL.md b/website/LEGAL.md index 28c3dc606..8bc6b27e9 100644 --- a/website/LEGAL.md +++ b/website/LEGAL.md @@ -14,8 +14,7 @@ Mojang or Microsoft. Minecraft is a trademark of Mojang Synergies AB. The site loads no third-party code at runtime: no frameworks, CDNs, analytics, trackers or cookies. The only requests to other hosts are the browser's calls to `api.github.com` -(releases and patch notes) and `raw.githubusercontent.com` (the README's roadmap and -`launcher/links.json`), both on Horizon's own repository. +(releases and patch notes) and `raw.githubusercontent.com` (`launcher/links.json`), both on Horizon's own repository. ## Fonts @@ -72,5 +71,12 @@ files: players need their own legally obtained copy of Minecraft: Java Edition. ## Text -The parity table and the roadmap are generated from Horizon's README, and the patch notes +The parity table is generated from Horizon's README, and the patch notes come from Horizon's GitHub releases: Horizon's own text, MIT. + +## Contributors + +The Contributors block lists the GitHub accounts that have committed to Horizon: login, +commit count and profile link, from GitHub's API. Their avatars are not stored in this repository; +the visitor's browser loads them from `avatars.githubusercontent.com`, each one the picture its +owner chose for their GitHub account. Bots are left out. diff --git a/website/README.md b/website/README.md index 7a2e6d319..b831efaeb 100644 --- a/website/README.md +++ b/website/README.md @@ -6,7 +6,7 @@ One static page in the launcher's design language rather than its layout: the pa violet accent of `crates/horizon-theme`, Instrument Serif for display type and Geist for the rest, 1px dividers and short, eased motion. A full-viewport hero over Horizon's own sunset, then a scroll through what it is, the screenshots, the parity grid, the launcher, the patch -notes, the roadmap and the community links. Plain HTML, CSS and JavaScript; no framework and +notes, the community links and the contributors. Plain HTML, CSS and JavaScript; no framework and no runtime dependencies. ## Layout @@ -17,9 +17,10 @@ serve.mjs a tiny static server for local checks src/index.html the page, with {{placeholders}} build.mjs fills src/404.html the not-found page src/style.css the design tokens and every style -src/main.js download buttons, patch notes, roadmap, links, nav and menu, tabs, lightbox, motion +src/main.js download buttons, patch notes, links, contributors, nav and menu, tabs, lightbox, motion src/markdown.js a small Markdown renderer (escapes everything), shared by build and page src/releases.js the patch notes' markup, shared by build and page +src/contributors.js the contributors' filtering and markup, shared by build and page public/ fonts, screenshots, the hero, icons, og.png, robots.txt, sitemap.xml: copied as is scripts/assets.mjs rebuilds public/ from the repo (fonts to WOFF2, images to WebP) scripts/shots.mjs Playwright screenshots at every width, and og.png @@ -31,13 +32,16 @@ shots/ (gitignored) full-page screenshots at 360–1920 px, a 1250× ## What comes from where - **Built in** (`build.mjs`): the parity table, its score, harness count and audit date, - and the roadmap, all from `README.md`; the Discord and Sponsor links from - `launcher/links.json`; the latest releases, when GitHub answers. Locally these come from + all from `README.md`; the Discord and Sponsor links from + `launcher/links.json`; the latest releases and the contributors (`/repos/ludovic111/horizon/contributors`, + bots left out, the owner first), when GitHub answers; without an answer the build still succeeds and + the Contributors block and its menu entries stay hidden until the page loads them. Locally these come from the checkout; on Railway, which builds only this folder, from `main` on GitHub. The build - fails if the README has no parity table or roadmap, so a broken README never deploys. + fails if the README has no parity table, so a broken README never deploys. - **Fetched by the page**: the releases (the download button picks the newest `launcher-v*` release's asset for the visitor's OS, and the three latest game releases' - notes are rendered), the roadmap from the raw README on `main`, and `links.json`. Each + notes are rendered), the contributors (avatars come from `avatars.githubusercontent.com`), + and `links.json` from `main`. Each falls back to what was built in, and the download button to the releases page. ## Run it locally diff --git a/website/build.mjs b/website/build.mjs index 0edf6d53c..3d7d94d3d 100644 --- a/website/build.mjs +++ b/website/build.mjs @@ -1,9 +1,9 @@ -// Builds the site into dist/: src/index.html with the README's parity table, roadmap and -// the community links baked in, plus public/ and fingerprinted CSS and JS. No dependencies. +// Builds the site into dist/: src/index.html with the README's parity table and +// the community links and contributors baked in, plus public/ and fingerprinted CSS and JS. No dependencies. // // Railway builds only website/, so the README and links.json come from the repo when they -// are next to it (a local checkout) and from main on GitHub otherwise. The latest releases -// are baked in when GitHub answers, so the page reads well before (or without) JavaScript. +// are next to it (a local checkout) and from main on GitHub otherwise. The latest releases and +// the contributors are baked in when GitHub answers, so the page reads well before (or without) JavaScript. import { readFile, writeFile, mkdir, rm, cp } from "node:fs/promises"; import { existsSync } from "node:fs"; import { createHash } from "node:crypto"; @@ -11,6 +11,7 @@ import { join, dirname } from "node:path"; import { fileURLToPath } from "node:url"; import { markdown, inline, section, escape } from "./src/markdown.js"; import { releasesHtml } from "./src/releases.js"; +import { contributorsFrom, contributorsHtml } from "./src/contributors.js"; const site = dirname(fileURLToPath(import.meta.url)); const dist = join(site, "dist"); @@ -50,6 +51,18 @@ try { console.warn(`releases: ${e.message}; the page will load them itself`); } +let contributors = []; +try { + const res = await fetch(`https://api.github.com/repos/${REPO}/contributors?per_page=100`, { + headers: { Accept: "application/vnd.github+json", ...(process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {}) }, + signal: AbortSignal.timeout(15000), + }); + if (res.ok) contributors = contributorsFrom(await res.json()); + else console.warn(`contributors: ${res.status} from GitHub; the page will load them itself`); +} catch (e) { + console.warn(`contributors: ${e.message}; the page will load them itself`); +} + // --- The parity table ------------------------------------------------------------------ const status = section(readme, "Project status") ?? ""; @@ -93,10 +106,7 @@ const parityCells = body const matching = body.filter(([, score]) => Number(score) === 1).length; const parityHeadline = matching === body.length ? "Every subsystem matches vanilla." : `${matching} of ${body.length} subsystems match vanilla.`; -// --- The roadmap and the latest notes ------------------------------------------------- - -const roadmap = section(readme, "Roadmap"); -if (!roadmap) throw new Error("README: no Roadmap section"); +// --- The latest notes ------------------------------------------------- const isGame = (tag) => /^v\d{4}\.\d{1,2}\.\d{1,2}/.test(tag); const isLauncher = (tag) => tag.startsWith("launcher-v"); @@ -115,7 +125,7 @@ await cp(join(site, "LEGAL.md"), join(dist, "LEGAL.md")); // The page's modules, fingerprinted; each import of a shared module is rewritten to its name. const names = {}; const rewrite = (code) => code.replace(/"\.\/(\w+\.js)"/g, (all, file) => (names[file] ? `"./${names[file]}"` : all)); -for (const file of ["markdown.js", "releases.js", "main.js"]) { +for (const file of ["markdown.js", "releases.js", "contributors.js", "main.js"]) { const code = rewrite(await readFile(join(site, "src", file), "utf8")); names[file] = `${file.replace(".js", "")}.${fingerprint(code)}.js`; await writeFile(join(dist, "assets", names[file]), code); @@ -129,6 +139,7 @@ const inlineCss = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s*\n\s*/g, "\n" const baked = { links, + contributors, releases: releases.slice(0, 12).map((r) => ({ tag_name: r.tag_name, name: r.name, @@ -155,11 +166,12 @@ const values = { PARITY_CELLS: parityCells, PARITY_HEADLINE: parityHeadline, SUBSYSTEMS: String(body.length), - ROADMAP: markdown(roadmap, { shift: 1 }), NOTES: notesHtml, LAUNCHER_META: `${launcher ? `Launcher ${escape(launcher.tag_name.replace("launcher-v", ""))} for` : "For"} Linux x86-64, macOS on Apple Silicon and Windows x64.`, DISCORD: escape(links.discord || DEFAULT_LINKS.discord), SPONSOR: escape(links.sponsor || DEFAULT_LINKS.sponsor), + CONTRIBUTORS: contributorsHtml(contributors), + CONTRIBUTORS_HIDDEN: contributors.length ? "" : " hidden", BAKED: JSON.stringify(baked).replace(/([\s\S]*?)<\/style>/g)) console.log( `built dist/ from ${readmeFrom}: ${body.length} subsystems, ${percent}, ${harnesses} harnesses, ` + - `${game.length} game releases baked${launcher ? `, launcher ${launcher.tag_name}` : ""}`, + `${game.length} game releases baked${launcher ? `, launcher ${launcher.tag_name}` : ""}, ${contributors.length} contributors`, ); diff --git a/website/src/contributors.js b/website/src/contributors.js new file mode 100644 index 000000000..5d2030f5e --- /dev/null +++ b/website/src/contributors.js @@ -0,0 +1,39 @@ +// The contributors: GitHub's list for the repository, without bots, the owner first. Shared by +// build.mjs (baked into the page) and main.js (refreshed from GitHub). +import { escape } from "./markdown.js"; + +const OWNER = "ludovic111"; +const AVATARS = "https://avatars.githubusercontent.com/"; + +// Reduces GitHub's contributor objects to what the page shows; bots (type Bot, or a login +// ending in [bot]) and anything without a login or a profile address are dropped. +export function contributorsFrom(list) { + if (!Array.isArray(list)) return []; + return list + .filter((c) => c && typeof c.login === "string" && c.login && c.type !== "Bot" && !/\[bot\]$/i.test(c.login)) + .map((c) => ({ + login: c.login, + html_url: typeof c.html_url === "string" ? c.html_url : `https://github.com/${c.login}`, + avatar_url: typeof c.avatar_url === "string" ? c.avatar_url : "", + contributions: Number(c.contributions) || 0, + })) + .sort((a, b) => (b.login === OWNER) - (a.login === OWNER) || b.contributions - a.contributions); +} + +// GitHub serves avatars at any size: 96 px is twice what the page draws, for sharp screens. +function avatar(url) { + if (!url.startsWith(AVATARS)) return ""; + const u = new URL(url); + u.searchParams.set("s", "96"); + return u.href; +} + +export function contributorsHtml(list) { + return list + .map((c) => { + const src = avatar(c.avatar_url); + const count = `${c.contributions.toLocaleString("en-US")} ${c.contributions === 1 ? "commit" : "commits"}`; + return `
  • ${src ? `` : ``}${escape(c.login)}${count}
  • `; + }) + .join(""); +} diff --git a/website/src/index.html b/website/src/index.html index bebba79ea..65b3b54e6 100644 --- a/website/src/index.html +++ b/website/src/index.html @@ -44,8 +44,8 @@ Parity Launcher Notes - Roadmap Community + Contributors