Commit Graph

47 Commits

Author SHA1 Message Date
Ludovic Marie 0892f944c0 Agent control: wait for a state, and the log of what happened
wait-for screen NAME|widget ID|loaded|chat TEXT|event KIND replies once
the game gets there (--timeout, default 30 s, ends in an error of kind
timeout; --since SEQ counts chat and events from an earlier point), so
scripts and agents stop polling. events [--since SEQ] lists what
happened, oldest first, numbered: screens, chat lines, deaths, respawns,
items gained or lost, dimensions, worlds opened and closed. The state is
compared once per event loop turn and only under --control, so watching
never changes the game. respawn now says when the death screen's button
is not active yet instead of clicking it to no effect.

horizon-ctl and its MCP gain both; tools/agent_control_e2e.py gains an
events scenario.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:51:30 +02:00
Ludovic Marie 1a067b3d9e Agent control: read and set every option by key
options-get [KEY...] gives every options.txt option by its vanilla key
with its value and what it accepts (type, range, step or choices; enums
by name, key bindings as key.keyboard.w). options-set KEY VALUE sets one,
applies it at once and saves options.txt as the options screen does
(language and resource packs reload too); a value the option refuses is
an error naming what it accepts, and the option keeps its value. After a
set, ui reads the redrawn screen.

horizon-ctl and its MCP gain both; tools/agent_control_e2e.py gains an
options scenario.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:38:20 +02:00
Ludovic Marie 8c5d1ed86b Agent control: the widget tree of every screen, click and set by id
`ui` lists every widget the last frame drew (title menus, pause, options
in both menu styles, inventories and menus) with an id, its kind, label,
bounds and value; `click ID` clicks one through the same window events
as the mouse, `set ID VALUE` moves a slider along its track. Ids come
from labels (FOV: 70 is fov), world/server/language rows carry their
names, Horizon switches, sliders and segments their row's caption, and
inventory slots are slot-ID with their stacks. After a click, the next
widget command waits for a redrawn frame.

horizon-ctl and its MCP gain ui, click and set, and launch --offscreen.
tools/agent_control_e2e.py gains a ui scenario and runs offscreen on
macOS; both scenarios now handle Singleplayer opening Create New World
when there are no worlds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:08:15 +02:00
rdbtCVS aab88753b6 Keep title panorama optional during full resource preparation 2026-10-14 19:15:16 +01:00
rdbtCVS eebf5621bf Fix classic menu panorama resource preparation 2026-10-14 18:54:51 +01:00
Ludovic Marie 8355a6ff14 horizon-prepare sounds: the sound copy in Rust, run by the launcher
tools/fetch_sounds.py (and the lab.py functions it used) becomes
`horizon-prepare sounds` (horizon_prepare::sounds): the pinned asset index,
sounds.json and every .ogg from the player's own launcher install, each SHA-1
checked, into .local/horizon-client/<version>. The launcher runs it as part of
Prepare (in-process, the version's own binary when its sources differ and it
knows the subcommand, in-process for older versions), and a launcher install
without the assets only logs that the game will be silent. Player docs no
longer mention Python for sound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:10:34 +02:00
Ludovic Marie 66c6bd6b13 F3 + C writes a crash report
The debug crash from #90 printed a stand-in report; it now ends the game
with a DebugCrash error that main reports as "Manually triggered debug
crash" with the stack where it was raised. The game keeps the error that
ends it as an error, not a string, so main can tell. Leading std backtrace
frames are dropped (macOS keeps them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:15:20 +02:00
Ludovic Marie 1569572ba0 Game logs and crash reports; launcher crash notice; logs in the CLIs and MCP
The game writes logs/latest.log in its home like vanilla's log4j config
(client-1.21.2.xml): [HH:mm:ss] [thread/LEVEL]: message, rolled at start and
at midnight to logs/<date>-<n>.log.gz, seven a day. Messages go through the
log facade and still print their old text on stderr.

A main-thread panic or a fatal error writes
crash-reports/crash-<date>_<time>-client.txt (error, stack, Horizon and
Minecraft versions, OS, CPU, memory, GPU adapter, render settings, resource
packs, world, last 50 log lines). Development builds crash on purpose with
HORIZON_DEBUG_CRASH.

The launcher shows "Horizon crashed" when the game it started ends badly,
with Open report, Copy report, Open logs folder and Report on Discord;
Settings gets a Logs row. horizon-launcher logs and horizon-ctl logs
(--lines N, --crash) print the log's end or the newest report, and both MCP
servers have a logs tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:58:35 +02:00
Ludovic Marie a995fd3b46 Prepare with horizon-prepare: launcher, release folders, messages and docs
The launcher prepares a version in-process when it ships the preparer sources
the launcher was built with, with the version's own horizon-prepare when they
differ, and with the Python script only for versions made before it. Release
folders ship horizon-prepare and its sources; resources are reused between
versions with the same preparer. The game's messages, PLAY.txt, the docs and
release builds name horizon-prepare, and tools/prepare_native_client.py is a
wrapper of it for the development tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:29:33 +02:00
Ludovic Marie 6716b0d953 Docs: agent control with horizon-ctl and its MCP server
README gets an Agent control section (out of the roadmap: it's done), the
native client guide describes every command group, the blocking semantics,
exit codes, launch discovery, MCP and the two transports, and PLAY.txt tells
release players about horizon-ctl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:59:35 +02:00
Ludovic Marie 3f3f294c52 Merge origin/main: game-bugs and launcher 0.1.2
Villager POI search: main's per-search state classification replaces this
branch's state table (same sections skipped, same positions in order).
status keeps main's mob and block-entity counts and this branch's pending
uploads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 18:41:36 +02:00
Ludovic Marie 7f1e197428 Section arena in pages; graphics docs and benchmark comparison
At render distance 32 the single section arena grew past the 4 GiB buffer
limit and the renderer panicked. Sections now live in pages of at most
256 MiB (or the device's buffer limit); draws keep their order and bind each
page once per run of consecutive draws in it, so translucent sections stay
back to front. docs/graphics.md describes the settings, the benchmark and
what changed; graphics_bench.py --compare prints a before/after table and
keeps each game's log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 17:10:07 +02:00
Ludovic Marie 59fd98dea4 Sound: play under the launcher's own stream name, open any sample format, say what opened
PipeWire remembers mute per application name. A test run's stream, muted once
in the mixer, left "PipeWire ALSA [horizon-client]" muted for every later game,
the release played from the launcher included: no sound at all, with the device,
the stream and the mixer all working.

- The launcher starts the game as "Horizon" (media.role Game), its own entry.
- The game opens no output on a vscreen, where agents run it (HORIZON_AUDIO=1
  forces it, for a null sink), so nobody needs to mute it again.
- Any device sample format is accepted (the mixer converts from f32): a plain
  ALSA default reporting i16 used to fail.
- Other output devices are tried when the default does not open, and the log
  names the output opened or every reason none did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:02:15 +02:00
Ludovic Marie 8cdec2c8d9 Tidy the repository now that parity is reached: launcher-first README, docs index, research leftovers removed
Removed (each unreferenced by code, workflows, tests or living docs; no harness
dependency record names any of them, and parity.py --list still finds all 281):
- 22 one-off write-ups of the Java-pack experiments in docs/: adaptive-terrain,
  client-graphics-smoke, compact-headers, core-performance, culling-empty,
  culling-rays, debounce-queue, dispatch-retry, foreground-first,
  graphics-api-comparison, heap-budget, mac-first-test, optimization-plan,
  playable-validation, quad-reuse, server-graphics-context, shader-world-smoke,
  terrain-measurements, terrain-position, terrain-read-wait, tick-membership,
  worker-pacing. Their findings are folded into one paragraph of java-packs.md.
- 24 benchmarks/ observation dumps only those write-ups linked (client graphics,
  culling, queues, heap, Mac Vulkan, shader worlds, software identity, and the
  unlinked rust-core, rust-worldgen-2026-10-05, rust-native-client and
  rust-cuboid-model-decoding runs), plus 12 unlinked files inside kept
  report folders. The scoped-parity reports the living docs cite stay.
- debug/: one server log from a chunk investigation.
- The manual macos-shader-research and macos-vulkan-research workflows.
- tools/logs/latest.log, an empty log committed by accident (now ignored).

Kept: research-lock.json (parity.py, packaging, the launcher and datafix read
it), the Java-pack how-tos (vulkan, collectors, profiling, process-memory,
tick-state) and tools/test_client_graphics.py (ci.yml runs it).

README: leads with what Horizon is and "Download the launcher" (the
launcher-v* releases; the launcher updates itself), then build from source
for developers. Direct game downloads and PLAY.txt steps for players are gone;
the launcher has its own section with two screenshots. The roadmap merges the
known differences, the final checks and the plans after parity, under the
"Roadmap" heading the launcher's What's next page reads. The parity table and
its 100%-of-what-the-harnesses-compare note are unchanged.

docs/README.md indexes what remains: build and run, parity (status and
workflow), world generation, world data and simulation, the old Java track.
Links to the removed pages and README anchors are fixed.

packaging/PLAY.txt now speaks to players who came through the launcher and
points anyone with a bare archive to it, keeping the manual steps short.

The launcher's README link points at main instead of the launcher branch.
.gitignore: tools/logs/ and .DS_Store. No code behaviour changes; the compiler
and clippy flag no unused code and the tree has no stale TODOs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:16:55 +02:00
Ludovic Marie 83bcfb15af Docs: professional README and no personal details
Restructure the README around what Horizon is, its status, how to build it
from your own copy of the game, and its parity table. The Java performance
pack material and the research lab notes move to docs/java-packs.md and
docs/research-lab.md. The target platform is stated generically instead of
naming a machine, the stale list of missing mobs is dropped in favour of the
audited table, and the legal notice follows Mojang's usage wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:14:10 +02:00
Ludovic Marie 37898e856b Build from the user's own copy of the game instead of downloading it
Horizon no longer fetches anything of Minecraft from Mojang's servers. The
client jar, version JSON, libraries and assets come from the user's official
launcher install, and the server jar is one they downloaded themselves
(--server-jar or HORIZON_SERVER_JAR). Every file is checked against checksums
pinned in research-lock.json, and the prepared .local/ layout is byte-identical
to the old downloads, so the harnesses and the native client are unchanged.

CI keeps the offline checks on GitHub's runners; the vanilla comparisons and
the mod build need the game, so they move to a manual job on a self-hosted
runner that holds the maintainer's own copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:00:18 +02:00
Ludovic Marie 77f9c075ca Add a control socket and horizon-ctl to drive the client from scripts
`--control` opens a local Unix socket; horizon-ctl sends text commands and
prints JSON replies. Scripts can read status, press keys and mouse buttons,
look, teleport, give items, change render distance, take PNG screenshots
of the presented frame, and benchmark frame times without a person at the
keyboard. Under control, losing focus no longer pauses the game.

Key presses and play-screen mouse buttons move into shared methods so the
window and the socket take the same paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:42:52 +02:00
Ludovic Marie 34f4722e42 Show audited Java parity in the README and correct stale status
Score fourteen subsystems against the code (55% overall) and test that the
README percentage matches the table. Fluids, redstone, crop growth and the
Nether already run in the client; the native-client status still described
the old test-generator terrain without mobs or containers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:21:53 +02:00
Ludovic Marie be1352b4dc Target ludodesktop only and drop the M2 Mac from scope
The Rust rewrite now targets one Linux machine (Ubuntu 26.04, i7-13700KF,
RTX 4080, GNOME on Wayland). macOS and Windows are out of scope; the Java
packs, including the Mac starter, remain available but are no longer developed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:18:30 +02:00
Ludovic Marie 08b8e71838 Drop Windows from scope and add a native client packager
Horizon now targets Linux and macOS only: remove the Windows CI runners and
wgpu's DX12 backend, and update the scope docs. The Ubuntu RTX 4080 desktop
becomes the first physical Linux target. tools/package_native_client.py bundles
a release build with its prepared resources and a launcher for playing on
another machine of the same platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:48:58 +02:00
Ludovic Marie 3777c9009b WIP: playable client — streaming world, lighting, HUD, crafting, saves, audio, items
Checkpoint of the playable client rewrite before build verification.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:24:14 +02:00
Ludovic Marie 082cbb4077 Apply pending player attribute callbacks during resident simulation
Refresh scale dimensions and clamp health and absorption after movement, preserving native callback order and queued synchronization. Replay per-reference JVM identities in the scene comparison and cover changing limits, modifiers and low tunnels. Waypoint callbacks remain explicit requests for the future manager runtime.
2026-10-07 18:27:58 +02:00
Ludovic Marie 4e01780255 Validate resident crouching, pose dimensions and ledge backoff
Connect Shift input timing, dry pose fit, movement slowdown and eye height to the resident walking scene. Compare exact evolving state against pinned native client/server methods and record Linux window validation. Full gameplay and release acceptance remain unfinished.
2026-10-07 18:15:56 +02:00
Ludovic Marie 24ce21abee Connect native-validated sprint input to resident movement and hunger 2026-10-07 17:55:29 +02:00
Ludovic Marie ecb3ebfd34 Account for accepted movement distance in resident player hunger 2026-10-07 17:29:13 +02:00
Ludovic Marie 5023f82078 Record interactive hunger recovery validation 2026-10-07 17:16:58 +02:00
Ludovic Marie 3403705c74 Bind resident player hunger, regeneration and starvation to live health 2026-10-07 17:14:57 +02:00
Ludovic Marie c82f0ee8be Apply native-validated landing damage to resident player health 2026-10-07 16:56:23 +02:00
Ludovic Marie 5eb1d61e3a Bind native landing and fall callbacks to the resident player scene 2026-10-07 16:20:23 +02:00
Ludovic Marie 59676c6e84 Connect native-validated player motion to fixed-rate walking controls 2026-10-07 15:45:47 +02:00
Ludovic Marie 40a9f04f42 Preserve attribute state during dry movement ticks 2026-10-07 15:30:41 +02:00
Ludovic Marie 405e174e64 Bind stored player motion to resident chunks and live attributes 2026-10-07 15:15:57 +02:00
Ludovic Marie c109f91cc5 Connect resident client chunks to native-validated world collisions 2026-10-07 14:42:44 +02:00
Ludovic Marie a6966ab450 Mesh resident block models with native culling and UV-aware merging 2026-10-06 22:30:16 +02:00
Ludovic Marie f5ba959cdc Match native neighboring block-face visibility and suppression 2026-10-06 22:10:44 +02:00
Ludovic Marie 1a88d6c300 Render registry-bound variants and multipart block models 2026-10-06 21:59:03 +02:00
Ludovic Marie 90a76bc0aa Match vanilla blockstate transforms and UV-locked baking 2026-10-06 21:49:27 +02:00
Ludovic Marie f286aa24e1 Match weighted model choice and multipart random consumption 2026-10-06 21:31:55 +02:00
Ludovic Marie 1d0b537a0a Bind vanilla blockstate selectors and multipart model parts 2026-10-06 21:26:47 +02:00
Ludovic Marie 54a2b552ee Decode vanilla blockstate variants and multipart conditions 2026-10-06 21:16:15 +02:00
Ludovic Marie b3a508dba8 Match native numeric scanner rejection in model resources 2026-10-06 21:09:56 +02:00
Ludovic Marie 81ea783e35 Match vanilla sprite animation metadata and tick selection 2026-10-06 21:05:55 +02:00
Ludovic Marie 6a4add0c67 Render baked vanilla models and animated cutout sprites natively 2026-10-06 20:47:09 +02:00
Ludovic Marie 8c7d8f6416 Bake vanilla cuboid geometry with native float-bit validation 2026-10-06 20:30:09 +02:00
Ludovic Marie f0a03aea52 Resolve vanilla model inheritance and texture aliases 2026-10-06 20:17:53 +02:00
Ludovic Marie 9dbd93192f Decode pinned cuboid models and verify native client semantics 2026-10-06 20:10:30 +02:00
Ludovic Marie e8b66b83fc Add native Horizon development client with textured chunk rendering 2026-10-06 19:17:08 +02:00