Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 0734daa911 Swing the hand and raise it as vanilla does: SwingState, equip heights, attack clicks
The local player's clicks now go through a port of Minecraft.startAttack,
continueAttack and handleKeybinds' attack part with MultiPlayerGameMode's
block breaking (first_person.rs): attacking the air swings (and sets the
miss time), creative breaking swings every tick through its destroy delay,
survival mining keeps swinging after a block breaks, swords cannot break
blocks in creative, and attacking an entity in creative sets the delay.
The swing is LivingEntity.SwingState (restart rules, durations under haste
and mining fatigue, forward wrap on restart); the equip height follows
FirstPersonHandsAndItems with the item swap ticker, and placing or
starting to use an item drops the hand (itemUsed). Mining fatigue scales
by Math.pow(0.3, amplifier + 1) as in 26.3.

test_first_person_parity drives the real startAttack, continueAttack,
startUseItem, MultiPlayerGameMode breaking, SwingState, the tickers and
FirstPersonHandsAndItems over 4,192 scripted click sequences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:33:29 +02:00
Ludovic Marie d9351ec054 Menus: Horizon-style options screen, pause polish, screenshots
Options open as the launcher's Settings page: a sidebar with the sliding
selection (Video, Audio, Controls, Accessibility, Language, Chat, Interface)
and rows with a switch, slider or value button per option
(options_horizon.rs; new sections or rows slot into SECTIONS). Key binds,
the language list and resource packs open vanilla's pages. Interface holds
Menu style (Horizon / Classic). The pause menu hides the in-game HUD over the
blurred world. Scripted and frame-limited runs default to Classic, so the
harnesses see vanilla's screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:33:15 +02:00
Ludovic Marie eb18bb42af Menus: Horizon style for the title, worlds, create, multiplayer and pause screens
One theme for the launcher and the game: crates/horizon-theme holds the
palette, type scale, spacing, radii, control sizes, motion and the bundled
fonts; launcher/src/theme.rs and the game's ui_theme both read it. ui_theme
ports the launcher's components (button with hover layer and press state,
sidebar list with the sliding selection, segmented control, switch, rows)
and draws Geist and Instrument Serif through the HUD atlas.

The title is laid out like the launcher (sidebar, page header, rows) over a
live backdrop: Horizon generates an ice-spikes landscape for a fixed seed,
orbits a camera over it with falling snow, then blurs and cold-grades the
frame (post.rs). The launcher's opening (wordmark, then the interface) plays
once per session and a click or key skips it. Menu style Horizon / Classic
lives in horizon.txt, never options.txt; Classic keeps vanilla's drawing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:19:14 +02:00
Ludovic Marie f2c7a2d359 Draw the first-person hand with its own projection at hudFov
GameRenderer.render3dHud sets up the hand's projection at Camera's hudFov
(70, changed only by death and fluids), never the FOV option or the
sprint, speed and bow modifier. The hand pass now has its own globals
with that projection (a port of JOML setPerspective, as Projection does).
The camera harness compares the world and hand projection matrices at FOV
options 30, 70, 110 and others with vanilla's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:07:39 +02:00
Ludovic Marie c982fadaf5 Graphics benchmark: scripted flights over four scenes at render distances 8/16/32, with CPU and GPU frame times
horizon-ctl gains 'fly' (a constant-speed camera path that replies with the
frame summary); frame summaries add CPU time per frame (waits for the GPU,
display and limiter excluded), per-phase averages and GPU time from timestamp
queries. --offscreen renders into a texture on the discrete GPU so the 4080
can be measured under the headless compositor. Baselines: lavapipe on vscreen
and the RTX 4080 offscreen, seed 1234.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:04:23 +02:00
Ludovic Marie 1a10d4efe8 Windows: launcher without VCRUNTIME140.dll, a clear message without Vulkan, import checks in CI
The Windows launcher was built without crt-static and imported VCRUNTIME140.dll,
which only the Visual C++ redistributable installs: players without it got a
missing-DLL dialog before anything started. The game itself links only system
DLLs (vulkan-1.dll is loaded at run time).

- launcher.yml links the C runtime on Windows.
- tools/check_imports.py reads PE import and delay-import tables (and ELF
  loader, needed libraries and run paths); release.yml and launcher.yml fail
  when a Windows binary imports a non-system DLL.
- release.yml builds Linux on Ubuntu 22.04: the NixOS-made Linux release asked
  for a /nix/store loader, so it ran nowhere but NixOS.
- No adapter: the game says the Vulkan driver is missing and what to install,
  and on Windows keeps the console open until Enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:02:15 +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 27a32cc30d README: parity is what the harnesses check, until the final audit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:17:34 +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 2e4c4d1861 Launcher: run the game from the saves folder, never a version folder
The client ran in the version's own folder, so saves and options.txt would have
landed there and been deleted with the version, and the saves in
~/.local/share/horizon (where the release folders' horizon.sh keeps them) were
not seen. It now runs in HORIZON_HOME, else horizon in the platform's data
folder, with --resources pointing at the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:12:16 +02:00
Ludovic Marie ed05c1970f Launcher: release workflow for launcher-v tags (Linux, macOS, Windows, draft), README for updates, CLI and MCP; quieter CLI progress
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:28:57 +02:00
Ludovic Marie 6c51322171 Launcher: opening screen over the prismal background, violet accent from it, opening setting, docs frames and clip
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:27:30 +02:00
Ludovic Marie 86e4a05c01 Launcher: CLI subcommands and an MCP server over stdio, both on the shared core
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:20:39 +02:00
Ludovic Marie 53583b28d8 Launcher design pass: aurora background, eased page, pill, hover and bar motion, Play hero, Settings page with update state; Geist, Instrument Serif and Geist Mono
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:18:17 +02:00
Ludovic Marie 55ecf5a59e Launcher core: update checks for Horizon and the launcher, self-update, install by tag, notes as plain text, tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:13:57 +02:00
Ludovic Marie e5e27c24d4 Launcher: backend as a shared library; game and launcher tags kept apart, numeric version order, HORIZON_LAUNCHER_HOME
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:11:00 +02:00
Ludovic Marie 5a2602406b Launcher: preview screenshot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:01:46 +02:00
Ludovic Marie a2fe7286c1 Launcher: README and screenshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:51:46 +02:00
Ludovic Marie d7bcc04064 Launcher workflow: also run on pushes to the launcher branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:50:59 +02:00
Ludovic Marie 7ff1b97f80 Launcher: tables in notes, the README roadmap, the server's EULA, and a macOS/Windows build workflow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:50:49 +02:00
Ludovic Marie 57257ae231 Launcher: a GPUI app that installs, prepares and starts Horizon builds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:45:05 +02:00
Ludovic Marie b279705c8d README: every subsystem matches vanilla in its harnesses (100%), audit and launch checks next
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 07:18:24 +02:00
Ludovic Marie 7d4304a840 Merge branch 'parity/leftovers' into parity-base 2026-10-13 07:07:54 +02:00
Ludovic Marie b7ced27dd1 Merge branch 'parity/server-leftovers' into parity-base 2026-10-13 06:52:25 +02:00
Ludovic Marie c6d0184353 Merge branch 'parity/screens' into parity-base 2026-10-13 06:47:44 +02:00
Ludovic Marie 98ec7bc509 Edit word moves with Cmd on macOS, as InputQuirks does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:38:47 +02:00
Ludovic Marie 2aa3cd5afa Merge branch 'parity-base' into parity/screens 2026-10-13 06:29:00 +02:00
Ludovic Marie b0e5fe5591 docs: pack screen session count 2026-10-13 06:28:59 +02:00
Ludovic Marie 8a13322143 README: the resource pack screen and the chat input match vanilla
Assets and Menus score 1; Java parity is 93%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:28:53 +02:00
Ludovic Marie 436d71eba2 Compare the chat screen's input and command suggestions with vanilla
horizon_client::chat::ChatScreen is now a port of vanilla's ChatScreen,
EditBox and CommandSuggestions: the input's scrolling, cursor, selection,
word moves and select all, history up and down, argument colouring, usage
lines and parse errors, the suggestion list (sorting, hover, Tab and
Shift+Tab cycling, clicks, wheel) and its tooltips, drawn as GUI calls the
game paints. tools/test_chat_screen_parity.py drives a real ChatScreen on
vanilla's client command tree (custom suggestions answered by the server
dispatcher): 3000/3000 cases match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:27:55 +02:00
Ludovic Marie e70c9fdd69 Document the recipe book search, ghost recipe and hotbar harnesses; more old options.txt bodies
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 06:22:53 +02:00
Ludovic Marie 08eeb06eff Merge branch 'parity-base' into parity/leftovers 2026-10-13 06:22:05 +02:00
Ludovic Marie 35f0b5ec30 Read creative toolbars (hotbar.nbt) through the HOTBAR data fixers, compared with HotbarManager
EmptyItemInHotbarFix was missing from the data fixers. horizon_client::hotbar loads the nine rows of nine stacks of an older file as vanilla does: lenient counts, unregistered items empty, stray entries dropped from their row, a row that is no list ending the reading, short rows lost and long ones cut.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 06:21:56 +02:00
Ludovic Marie 639237afcc Show the ported pack screen in the game
The options' Packs page is horizon_client::pack_screen: vanilla's layout,
lists, focus and selection, search box typing, the mouse wheel per list and
the confirmation of an incompatible pack (Escape answers no). Packs carry
their raw description, compatibility (too old, too new, unknown) and icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:10:23 +02:00
Ludovic Marie a7606c4ad4 Compare the resource pack screen's drawing with vanilla
horizon_client::pack_screen ports PackSelectionScreen, its two
TransferableSelectionLists and the ConfirmScreen of an incompatible pack as
vanilla's state machine (clicks, wheel, search typing, focus, selection,
scroll) and gives its GUI calls; screen_draw holds the widgets (StringWidget,
MultiLineTextWidget, Button, a font-aware EditBox port) and StringSplitter's
line splitting with legacy codes. Pack components keep their legacy codes and
style fields. tools/test_pack_screen_parity.py runs a real
PackSelectionScreen through the same actions: 1500/1500 cases match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:07:04 +02:00
Ludovic Marie 2c34e0753d Merge branch 'parity/menus-golem' into parity-base 2026-10-13 05:59:38 +02:00
Ludovic Marie 27d18063a8 Merge branch 'parity/save-roundtrip' into parity-base 2026-10-13 05:49:27 +02:00
Ludovic Marie 7c8afc8a34 Merge branch 'parity-base' into parity/server-leftovers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 05:44:19 +02:00
Ludovic Marie 0a2601c33a Send recipes, advancements and command replies to players as vanilla does
- ClientboundUpdateRecipesPacket at join: the recipe property sets and the
  stonecutter's recipes, from the data pack (lan/recipes.rs).
- On a player's first tick the minecraft:tick criteria are met: the recipes
  their advancements grant go out in ClientboundRecipeBookAddPacket, then
  ClientboundUpdateAdvancementsPacket with what the player may see
  (lan/advancements.rs).
- Command replies reach remote players as the components vanilla sends:
  Text keeps the Component it was built from (literal, translatable,
  siblings, style), sendFailure wraps the message as vanilla does, and the
  NBT wraps the elements of mixed lists.

The dedicated-server harness drops its known gaps: it compares these
packets (sorted where vanilla's hash maps order them per run) and the
replies to three failing commands, keeps only the first set_time among the
joining packets and turns random ticks off in the generated world.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 05:43:51 +02:00
Ludovic Marie b28fcec7f0 Compare the ghost recipe of a recipe book click with the vanilla client's
Book::ghost is the one place that places a recipe's ingredients into the grid or furnace slots; the harness runs fillGhostRecipe against the real menus. Fixes found: the result and the dyed, potion and map demo ingredients cycle through every stack (not the first), a furnace's fuels follow the registry's component lookup, and items keep their registry order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 05:43:31 +02:00
Ludovic Marie d6fd90a347 Merge branch 'parity-base' into parity/menus-golem 2026-10-13 05:36:44 +02:00
Ludovic Marie 23d7ebdfaa Search the recipe book as vanilla's FullTextSearchTree does, over the full tooltip lines of every result
The recipe book view harness now searches: names, parts of names, ids with a colon, odd texts.
Horizon's recipe tooltips lacked attribute modifiers, smithing template, potion, dyed, pot, rocket and disc lines, and the results a display cycles through (map copies, tipped arrows, dyed armour).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 05:35:49 +02:00
Ludovic Marie 6b6506a65a Merge branch 'parity/platform-maths' into parity-base 2026-10-13 05:22:43 +02:00
Ludovic Marie 765f53b2ba Merge branch 'parity-base' into parity/platform-maths 2026-10-13 05:15:09 +02:00
Ludovic Marie e70c38e578 Send the command tree in vanilla's registration order
The LAN and dedicated servers built the tree from the data generator's
commands report, which sorts each node's children. lan/command_order.rs,
generated from vanilla's Commands(CommandSelection.ALL) by
tools/generate_lan_command_order.py, gives the registration order, and the
dedicated-server harness now compares the tree in order (the game rules,
registered in an identity-hashed order, aside).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:59:34 +02:00
Ludovic Marie 41c4f2247e Merge branch 'parity-base' into parity/menus-golem 2026-10-13 04:48:24 +02:00
Ludovic Marie 8976bd37d4 Select resource packs as vanilla's PackSelectionModel does, compared with vanilla
horizon_client::packs::SelectionModel ports PackRepository's selection and
PackSelectionModel (default positions, fixed and required packs, moving up
and down, commit), and the pack screen uses it. The new pack_selection
harness drives vanilla's model and Horizon's through 4,000 random action
sequences; every state matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:47:36 +02:00
Ludovic Marie 708a162090 Merge branch 'parity-base' into parity/save-roundtrip 2026-10-13 04:40:01 +02:00
Ludovic Marie 66114adfd9 save_roundtrip: promote only the fields a full chunk saves differently
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:40:01 +02:00
Ludovic Marie 2756b55b5b Merge branch 'parity/old-saves' into parity-base 2026-10-13 04:37:51 +02:00