Commit Graph

401 Commits

Author SHA1 Message Date
Ludovic Marie 7c0d3ceea6 Port report: ranked work items from a version diff
tools/port_report.py turns a diff into work items: rank 1 blocks the switch (facts,
packets, DataFixers, data component types, report formats, tables to regenerate),
rank 2 and 3 one item per Horizon file that ports changed vanilla code (with or
without a harness), rank 4 new content, rank 5 summaries. version_port.py report
writes report.md and report.json; port prepares, diffs and reports in one go.
The class map now resolves names of both versions. The doc records the 26.2 -> 26.3
replay against Horizon's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:51:39 +02:00
Ludovic Marie 93bb113e0d Diff vanilla classes method by method and map them to Horizon
tools/class_index.py hashes every method's bytecode with constant-pool references
resolved and branch targets as instruction indices, lambdas folded into their
declaring method; class diffs list moved classes. tools/vanilla_map.py maps vanilla
classes to the Rust files whose comments name them and the harnesses whose oracles
or probes reach them. version_port.py prepare indexes, diff reports both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:44:26 +02:00
Ludovic Marie 58ad81674b version_port.py: detect, prepare and diff Minecraft releases
detect reads Mojang's manifest; prepare downloads and verifies a version into the
version store (outside the repository), runs its data generator and reads the
jar's own version facts; diff compares facts, packets, registries, blocks, item
components, commands, data packs, assets and lang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:38:37 +02:00
Ludovic Marie 720e91fb8c Design the version-port pipeline: detect, prepare, diff, regenerate, report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:33:51 +02:00
Ludovic Marie 282acfe086 Merge pull request #254 from ludovic111/feat/perf-battery-mode
Battery mode: an opt-in 60 FPS cap (30 in menus or unfocused) and half the worker threads
2026-10-15 07:23:31 +02:00
Ludovic Marie a6860bbec6 Merge pull request #263 from ludovic111/feat/benchmark-mode
horizon-client --benchmark SCENARIO: benchmark your own machine, report in the shared format
2026-10-15 07:20:54 +02:00
Ludovic Marie 18234d3a01 Merge pull request #264 from ludovic111/feat/perf-bench-report-v1
perf_bench.py: repeats with 95% CIs, the shared report format, loads end when meshing is done
2026-10-15 07:20:42 +02:00
Ludovic Marie 7b6ef36d90 Merge pull request #247 from ludovic111/feat/bench-report
Benchmark report format v1 (docs/benchmark-report.md, crates/horizon-bench)
2026-10-15 07:20:04 +02:00
rdbtCVS 69925a57c5 perf(streaming): skip unchanged exhausted generation scans 2026-10-15 07:04:23 +02:00
Ludovic Marie cfa6033535 Merge pull request #220 from rdbtCVS/perf/reuse-pack-overlays-20261014
perf: reuse unchanged resource-pack overlays after validation
2026-10-15 07:03:05 +02:00
Ludovic Marie 014b1f5267 Benchmark reports go to the telemetry outbox, with the benchmark-upload consent only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +02:00
Ludovic Marie 309dea385b horizon-client --benchmark SCENARIO: the perf_bench run from inside the game, written as a report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +02:00
Ludovic Marie 7d36d09edd perf_bench.py: a load ends when meshing goes quiet too
Sections wait for their neighbours' light before they are meshed, so the
chunk counts settled while edge sections were still undrawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:03 +02:00
Ludovic Marie 2a91612928 perf_bench.py: repeats, and the benchmark report format v1
Each game runs --repeats times (3) per render distance and writes one v1
report per distance (benchmarks/perf/<label>-rd<N>.json): figures as means
with standard deviation and 95% CI, per-flight frame entries with the fixed
histogram, the hardware without the host name. frames() and summary() match
crates/horizon-bench value for value (tested on the same inputs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:03 +02:00
Ludovic Marie 650ad39d85 Benchmark report uploads are dated to the day, like every telemetry item
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:00:54 +02:00
Ludovic Marie a500e25705 horizon-bench: load average, power source, RSS and CPU time probes; launcher metric names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:00:54 +02:00
Ludovic Marie e0ab3f8fcc Benchmark report format v1: docs/benchmark-report.md and crates/horizon-bench
One versioned JSON report for every benchmark Horizon writes (the game's
--benchmark, the launcher's measurements, tools/perf_bench.py): the local log
a player can attach and, with consent, what the telemetry upload sends.
Summaries over repeats (mean, stdev, 95% CI) and fixed-edge frame-time
histograms, never raw frame streams; no host, user or path in uploads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:00:54 +02:00
Ludovic Marie 407e863d9f Merge pull request #233 from rdbtCVS/perf/lighting-worker-results-20261014
perf: return only lighting from chunk light workers
2026-10-15 06:56:10 +02:00
Ludovic Marie 30144e478d Merge pull request #206 from ludovic111/feat/perf-bench
Benchmark Horizon against vanilla 26.3 and vanilla + performance mods (tools/perf_bench.py, docs/benchmark.md)
2026-10-15 06:38:45 +02:00
Ludovic Marie 416012ad4c Merge pull request #241 from ludovic111/feat/controllers2-focus
Controllers: focus navigation in menus, on-screen keyboard, menu navigation option
2026-10-15 05:25:30 +02:00
Ludovic Marie e6be303517 docs/benchmark.md: no unmeasured startup figure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:40:12 +02:00
Ludovic Marie b691b5ebaa Benchmark Horizon against vanilla 26.3 and vanilla with performance mods
tools/perf_bench.py runs Horizon, the vanilla 26.3 client and vanilla with
Sodium, Lithium, FerriteCore and ImmediatelyFast through the same steps:
fresh world (seed 1234, creative) per render distance, start to title, start
to in-world, then per scene teleport, chunk load, settle and a fixed 192-block
flight. Every frame time is kept and one function computes average FPS, 1% and
0.1% lows, p50/p95/p99/p99.9 and a frame-time histogram for every game; RSS is
sampled from outside the process for every game. One options.txt (vanilla's
keys, Fancy preset values with a Custom preset so the render distance holds)
is written for all of them.

Vanilla is driven by a dev-only Fabric mod (mods/horizon/src/bench) compiled
against the user's own client jar: it creates the world with
WorldOpenFlows.createFreshLevel, teleports with /tp and places the player on
the path every frame as horizon-ctl fly does. Nothing of the game is
redistributed and the performance mods are fetched from Modrinth with the
hashes pinned in packs/mods.lock.json.

Horizon side: `fly ... PITCH raw` also replies with every frame time, and
--offscreen drives frames from the event loop, so a window nobody sees (a
locked macOS session) still renders.

docs/benchmark.md describes what is measured, how fairness is kept, the
caveats and how to reproduce it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:40:12 +02:00
Ludovic Marie 210a6f5ddd Controllers: focus follows scrolled lists, clipped targets, pad status shows focus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:10:15 +02:00
Ludovic Marie fe7df463fa Play with friends: bound handshakes and the relay's first line in time, cap relay connections
A read timeout restarts with every byte, so a peer trickling one byte at
a time could hold the host's 8 handshake slots (or relay threads) for
hours. The host's openings and the relay's first line now end after 10 s
in all; the relay closes connections past RELAY_MAX_CONNECTIONS (4096).
The docs say what happens to a router mapping when the game crashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:08:07 +02:00
Ludovic Marie 5189a735c7 Invite codes: one address per LAN, no unique-local IPv6, the macOS firewall prompt in the docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:05:54 +02:00
Ludovic Marie de464a8fc0 Play with friends without a server: endpoints and key in the code
Ludovic can't pay for a hosted relay, so nothing depends on one now. The
host's game finds how it can be reached on its own: its interface
addresses (LAN, VPNs such as Tailscale or ZeroTier, IPv6), a port opened
on the router for an hour at a time (PCP, then NAT-PMP, then UPnP IGD;
renewed while sharing, deleted on stop) and its public address from STUN
(Cloudflare's and Google's public servers by default, configurable). The
invite code carries those endpoints and an 80-bit secret in base32 groups
with a checksum; guests dial every endpoint at once and run the same
SPAKE2 + ChaCha20-Poly1305 handshake, no rendezvous involved. When nothing
can reach the host it says why and what to do (UPnP, the port to forward,
a relay, a VPN; CGNAT and double NAT detected).

The relay stays as something anyone can run (binary, Dockerfile, systemd
unit; Railway config removed): with one configured the host also gets a
short code, and the full code names the relay so guests fall back to it.
No relay by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:05:54 +02:00
Ludovic Marie 60ddf3daf8 Play with friends: invite codes, the relay and the encrypted tunnel
horizon-friends: codes (Crockford base32, nameplate + secret), the relay's
JSON-line protocol, SPAKE2 then ChaCha20-Poly1305 frames keyed off the
code's secret, direct connections (candidates, TCP simultaneous open from
a reuse-port socket) with the relay as fallback, and the host and guest
ends that carry the game's TCP stream between loopback ports.

horizon-relay: the service (codes, rendezvous, byte relay, rate limits,
bandwidth caps, idle timeouts, counts only), its Dockerfile and Railway
config. Nothing is deployed and nothing in the game uses it yet.

Design: docs/play-with-friends.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:05:54 +02:00
Ludovic Marie 186cf8c320 Merge pull request #251 from ludovic111/feat/telemetry-server
Opt-in data collection (4/5): the ingest server (SQLite, rollups, retention, aggregate endpoint)
2026-10-15 03:04:31 +02:00
Ludovic Marie f12578238e Merge pull request #248 from ludovic111/feat/telemetry-consent
Opt-in data collection (1/5): consent, payloads, outbox and a gated uploader
2026-10-15 03:01:26 +02:00
Ludovic Marie 12c1af0261 Opt-in data collection (4/5): the ingest server
crates/horizon-telemetry-server, its own workspace like the launcher's (the
game's workspace never builds a web server):
- POST /v1/batch (zstd, decoded and checked by horizon-telemetry), DELETE
  /v1/installs/<id>, GET /v1/aggregate (cached 10 min, CORS for the website),
  GET /healthz.
- SQLite: machine descriptions stored once, one row of columns per session
  with 80-byte summary blobs, zstd bodies for crash/bug/benchmark, daily totals
  rebuilt when a day changes and kept after raw rows expire (180 days). About
  190 bytes per session on disk.
- Per-address token bucket (addresses in memory only), per-install daily cap,
  groups under 5 install-days hidden from the totals.
- Tests: refusals, rate limit, daily cap, deletion (rows and totals), retention,
  storage size, and end to end with the launcher's uploader.
- Dockerfile and a path-filtered CI workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:53:59 +02:00
Ludovic Marie 89b58991bb Merge pull request #246 from rdbtCVS/perf/save-batch-entity-grouping-20261014
perf: group block entities once per save batch
2026-10-15 02:38:17 +02:00
Ludovic Marie cc8744a06b Trim synthetic overlay benchmarks; record Mac real-pack numbers
The real-pack benchmark on the production resource_root path stays as the
reproducible measurement. On the Mac mini it saves 1.18 s (Faithful 32x) and
5.29 s (FPBR) per startup with the pack enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:26:46 +02:00
Ludovic Marie 0229615560 Battery mode: an opt-in frame cap and fewer worker threads
A Horizon graphics setting (Performance, off by default, batteryMode in
horizon-graphics.txt): at most 60 frames per second in a world, 30 in menus
without a world or behind other windows, and half the automatic worker
threads. It only changes when frames are drawn; ticks and what frames show
are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:24:57 +02:00
Ludovic Marie 43138159b2 Opt-in data collection (1/5): consent, payloads, outbox and a gated uploader
horizon-telemetry, shared by the launcher, the game and the ingest server:
- consent.json in the game folder: four switches, all off until the player
  answers, a consent version that re-asks when what is collected changes, the
  answer's time, and a random install ID made at the first yes.
- Payloads: perf summaries (percentiles + 14 frame-time buckets from a
  fixed-size Timings recorder), crash and bug reports, and benchmark reports
  carried as docs/benchmark-report.md defines them; size caps per kind.
- A scrubber for user folders, user names, e-mail and IP addresses, UUIDs and
  caller-known private terms.
- The outbox: only allowed kinds get in, daily caps, 200 items / 2 MiB.
- zstd batches with bounded decoding; the uploader re-reads the consent and
  drops withdrawn items before connecting, backs off and caps batches a day.
- tests/consent_gating.rs: a local mock server sees zero connections with the
  consent missing, outdated or withdrawn.

No server is set (DEFAULT_ENDPOINT is None): nothing is sent yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:21:13 +02:00
rdbtCVS 1295fccd17 perf(client): validate overlay reuse with source stamps and benchmark real packs 2026-10-15 02:19:11 +02:00
rdbtCVS 8177726f70 perf: reuse validated resource-pack overlays 2026-10-15 02:19:11 +02:00
rdbtCVS cb28f691ff perf: return only lighting from chunk light workers 2026-10-15 02:18:30 +02:00
rdbtCVS 34628c1471 perf: group block entities once per save batch 2026-10-15 01:07:56 +01:00
Ludovic Marie 8df59b96a9 Merge pull request #243 from rdbtCVS/perf/visibility-shortcuts-20261014
perf(mesher): short-circuit section visibility flood fills
2026-10-15 02:06:31 +02:00
Ludovic Marie 142b8da33e Merge pull request #236 from ludovic111/feat/pr-ready
pr_ready: one self-check for agents and contributors, CONTRIBUTING.md and a PR template
2026-10-15 02:04:01 +02:00
rdbtCVS 90f84ac10d perf(mesher): short-circuit section visibility flood fills 2026-10-15 00:45:44 +01:00
Ludovic Marie fa8056e172 Merge pull request #226 from ludovic111/feat/rust-edition-title
Title screen: "RUST EDITION" under the logo
2026-10-15 01:16:08 +02:00
Ludovic Marie 48c85fa19f Add tools/pr_ready.py, CONTRIBUTING.md and a pull request template
pr_ready is the one self-check to run before asking for review: from the
files a branch changes it runs rustfmt, clippy with warnings denied, the
tests of the touched crates (mapped through cargo metadata), the launcher's
own workspace when it is affected, the tokens.css check, the Cargo.lock
rule, the Python tests and the public-tree check, and the vanilla harnesses
the change can affect, picked by tools/parity.py exactly as CI's parity job
picks them. It runs locally or on a fleet machine through ~/fleet/rbuild;
on the Mac mini the harnesses use the parity runner's own workspace and
scripts. It prints one Markdown block for the pull request body and exits
non-zero on any failure.

tools/parity.py gains --changed-files for copies without Git history, and
tools/ci/vanilla-data.sh accepts the preparation key from outside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:13:39 +02:00
Ludovic Marie 7a07251acf CI disk: short artifact retention, runner cleanup, sccache on the Mac runners
Releases now ship as often as changes land, so nothing they leave behind may
grow without bound. Workflow uploads keep 3 days (nightly parity logs 7); the
releases carry their own assets.

tools/ci/runner-gc.sh, run every 6 hours by launchd on the Mac mini from a copy
of main, skips a runner in a job, removes a checkout's cargo build folders past
12 GB and harness work folders under .local/ untouched for 3 days, and keeps the
2 newest shared preparations while no runner works. The runners build through
the machine's sccache, so what it removes comes back from the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:05:59 +02:00
Ludovic Marie 86e0e122f4 Release train: ship every settled player-facing change, no 3-hour gap
Ludovic wants releases as often as changes land. A kind now releases when
player-facing pull requests merged since its last release and the newest of
them merged 15 minutes ago (a burst of merges becomes one release), or the
oldest an hour ago when merges never pause; release-now still ships at once.
There is no minimum time between releases. The scheduled checks run every 10
minutes (game at :02, launcher at :07) so a settled release goes out without
another merge.

Release titles keep proper nouns (Horizon's mark, Microsoft, LAN, ...) when
they lowercase the clauses after the first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:01:26 +02:00
Ludovic Marie 8f3f72c7ef Title screen: "RUST EDITION" under the logo
The classic title screen's banner now reads "RUST EDITION". It is rebuilt
at load time from the player's own textures/gui/title/edition.png:
"EDITION" is kept column for column, the "T" is lifted out of it, and R, U
and S are Horizon's own glyphs (rectangles in title_edition.rs) drawn the
way the texture's letters are built, in shades sampled from it. "RUST"
spans "JAVA"'s columns, so the banner stays centred. Only vanilla 26.3's
exact texture (pixel fingerprint) is rebuilt: a resource pack's banner is
left as drawn. No Mojang pixels are added to the repository.

The logo and banner are now blitted as LogoRenderer does: the logo's top
44 of 64 rows and the banner's top 14 of 16 rows at y = 30 + 44 - 7
(the banner was 20 px too low and squeezed 16 rows into 14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:54:50 +02:00
Ludovic Marie 8a95aa79a7 Website and README: the round-2 menus and launcher screenshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:08:40 +02:00
Ludovic Marie cd39680534 Show the new launcher and menus on the website and in the README
The README banner is redrawn in the new design (docs/media/banner.html), and the launcher and
menu screenshots (README and website) are the restyled ones. The website's launcher section
gains a Launcher tab: its screenshots no longer show the old background, whose licence was
never confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:08:40 +02:00
Ludovic Marie 2094fb58ad Describe the game menus' sidebar and plates as built
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:08:40 +02:00
Ludovic Marie a248e9242a Ship the launcher as Horizon.app in a .dmg, and in Linux's menus
macOS: packaging/macos/package.sh (run by launcher.yml) builds Horizon.app (Info.plist, bundle
id dev.horizon.launcher, macOS 11+, the .icns), signs it ad hoc, and makes the two release
assets: horizon-launcher-macos-arm64.dmg, the installer (the app and an Applications link over
a background, laid out by dmgbuild without a GUI), and the .zip the launcher updates from. A
launcher inside the app replaces the whole bundle: copied beside it with ditto, swapped in by
renames, restarted; a bare binary, as older launchers are, still finds its binary in the zip.
A macOS test zips, unpacks, swaps and re-verifies a signed bundle. Signing for real is a
MACOS_SIGN_IDENTITY away (packaging/macos/README.md, with what Gatekeeper asks meanwhile).

Linux: release builds keep horizon-launcher.desktop (with the binary's current path),
horizon.desktop (hidden, for the game window's icon) and the hicolor icons under
$XDG_DATA_HOME, without root; `horizon-launcher desktop-entry --remove` takes them out and
stops it, `desktop-entry` puts them back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:08:40 +02:00