Commit Graph

598 Commits

Author SHA1 Message Date
Ludovic Marie 6d7f11feb2 Prepare: require only this platform's libraries; accept republished 26.3 manifests
lab.prepare imported every client library in the version JSON, ignoring
its OS rules, so a Linux install failed on the macOS-only
java-objc-bridge the official launcher never downloads there. The rule
evaluation moves from runtime.py into lab.py and one selector,
client_library_artifacts, now serves preparation, the runtime and the
model baking harness: OS rules as the launcher applies them, and the
natives for this architecture (classifier suffixes, plain natives being
the x64 build only when an ARM variant is listed). Required libraries
are still checksummed and a missing one still errors.

Mojang republished 26.3.json twice (702fe591, then 11f1aefe, the current
one) with only assetIndex changed: non-English translations, same jars
and libraries. The lock pins the current file and accepts both earlier
ones; preparation takes the launcher's copy so it matches the asset
index installed with it, and an unknown republish errors clearly.
Fixes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:20:17 +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 73ca04b10d Merge origin/main: Horizon menus; graphics settings in the Video section
The Horizon options shell's Video section now holds the graphics settings:
a Simple / Advanced switch (remembered in horizon-graphics.txt), then the
level's rows, each with its frame-time cost and one-line description
(ui_theme::described_row). Horizon settings draw as switches, sliders or
value buttons like vanilla options. The Classic style keeps the Video
Settings buttons to the same screens. Main's menu blur and the world's
resolution-scale pass are separate (post.wgsl, world_post.wgsl).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 17:17:43 +02:00
Ludovic Marie 9dc0803a24 Graphics benchmark: games run with HORIZON_NO_AUDIO=1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 17:12:30 +02:00
Ludovic Marie 87733155b3 Merge remote-tracking branch 'origin/game-bugs' into parity-base 2026-10-13 17:11:28 +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 ad701d73d9 Fewer stalls: region writes on a writer thread, culled entities, villager POI scans skip empty sections
- Unloaded chunks and entity chunks are encoded and written by a background
  region writer, in order; loads see queued records first, and synchronous
  saves wait for the queue. Deleting entity chunks a region doesn't hold no
  longer rewrites the region file.
- Mobs render within Entity.shouldRenderAtSqrDistance (64 x bounding-box size
  x entity distance) and inside the view frustum (EntityRenderer.shouldRender);
  block entities outside the frustum are skipped, beams and structure blocks
  excepted.
- Minecarts and dropped items tick only in entity-ticking chunks, like mobs.
- Villager POI searches skip sections whose palette has no POI block.
- Streaming bookkeeping uses the Fx hash and checks a column's light
  readiness once per frame instead of once per dirty section.
- HORIZON_SPIKES=MS prints the timed spans of slow frames; frame summaries
  give the phase split of the slowest 1%.

RD 32 village flight on the 4080: 81 -> 230 fps; 1% low 5.8 -> 18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:14:57 +02:00
Ludovic Marie 72542a89e2 Compare sprint-jumping with vanilla in the sprint scene
The --sprint-input scene drives the real LocalPlayer.aiStep sprint and
jump path from keyboard state. Add sprint-jump runs: sprint held or
started by double-tapping forward, jump tapped, held through landings or
pressed first, at five headings, with too little food to sprint, under a
two-block ceiling and up onto a slab. All 293,175 states match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:38:48 +02:00
Ludovic Marie 45bd1a7be8 Renderer and tick performance: section arena with indirect multi-draw, dense occlusion graph, entity ticking within the simulation distance, fast chunk-map hashing
- Terrain sections live in one vertex arena (first-fit free list, grown on the
  GPU) and draw with one multi_draw_indexed_indirect per pass instead of a
  buffer bind and draw per section; per-frame scratch vectors are reused.
- The SectionOcclusionGraph search runs over dense arrays around the camera
  instead of hash sets, with per-column visibility.
- Mobs outside the entity-ticking chunks (Chebyshev distance of the
  simulation distance, DistanceManager.inEntityTickingRange) only check
  despawning, as in ServerLevel.tick; before, every loaded mob ticked.
- World chunks use the Fx hash; sky darkening is sampled once per time and
  weather instead of once per mob; creaking-heart scans compare state ids.
- Horizon-only graphics settings (horizon-graphics.txt): frame pacing without
  spinning, present mode, animated textures, worker threads.

RD 32 village flight on the 4080: 3.1 -> 81 fps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:34:48 +02:00
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 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 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 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 2aa3cd5afa Merge branch 'parity-base' into parity/screens 2026-10-13 06:29:00 +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 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 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
Ludovic Marie ed1ea50c8e Merge parity-base into parity/platform-maths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:31:39 +02:00
Ludovic Marie 85242053e2 save_roundtrip: accept the promotion of vanilla's border proto chunks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:59:11 +02:00
Ludovic Marie 8e26af99a1 Merge remote-tracking branch 'origin/parity/spawn-gear' into parity/save-roundtrip 2026-10-13 03:54:23 +02:00
Ludovic Marie 7322bba2b5 dedicated_server: read the game time as the console prints it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:51:40 +02:00
Ludovic Marie ab0d708f87 Merge branch 'parity-base' into parity/menus-golem 2026-10-13 03:43:32 +02:00
Ludovic Marie 75336660bb Compare the focused chat with vanilla
The HUD harness's chat cases now also draw the chat as the open chat
screen does: foreground, at the focused height, scrolled, with the scroll
bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:42:57 +02:00
Ludovic Marie 71e677ed6a dedicated_server: settle the generated world in game ticks, without random ticks
The world was saved 20 wall-clock seconds after force-loading the area, so
on a busy machine chunks were still generating or their fluids flowing,
and random ticks changed blocks while the client was being sent its
chunks: which chunks differed varied from run to run. Wait until every
force-loaded chunk is loaded and 600 game ticks have passed, with
random_tick_speed 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:40:50 +02:00
Ludovic Marie a9fa46fd0a Run the copper golem on CopperGolemAi's brain and compare its chest sorting
The golem's goals are replaced by vanilla's brain (core and idle activities,
the transport cooldown, look-at-player-sometimes, stroll or wait), and
TransportItemsBetweenContainers moves into the library: nearest wanted
chest in chunk and block entity map order, queueing behind golems with a
chest open, the 60-tick interaction with its states, sounds and opener
counts, picking up and putting down (with vanilla's overcounting), visited
and unreachable positions. Weathering draws from the level random after the
living tick; the spin sound is client-local. mob_ai gains seven copper golem
scenarios that print each golem's state, hand and opened chest and every
chest's contents and openers; all match vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:40:13 +02:00
Ludovic Marie 9ac6d665fb Merge branch 'parity/rendering-gaps' into parity-base 2026-10-13 03:32:19 +02:00
Ludovic Marie 2db50eeca1 Merge branch 'parity-base' into parity/old-saves 2026-10-13 03:27:26 +02:00
Ludovic Marie 8c818c6f84 1.8.9 world: real maps by right click, objectives its scoreboard knows
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 03:17:12 +02:00
Ludovic Marie 19d4146f04 Draw player list heads from players' skins as vanilla does
Profiles' textures properties are unpacked as authlib does and looked up
as SkinManager does (signatures, the local player, allowed texture URLs,
downloads), skins are fetched and processed as SkinTextureDownloader does
and shown from atlas slots. The tab_list harness now runs a real
SkinManager and compares processLegacySkin over 400 PNGs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:16:04 +02:00
Ludovic Marie 991df3d23c Merge remote-tracking branch 'origin/parity/old-saves' into parity/old-saves-flat 2026-10-13 03:13:32 +02:00
Ludovic Marie ab9109c787 Route world generation's and mob AI's Math calls through jmath
Beardifier, density pow/log, Marsaglia's Gaussian, dripstone, ores, fancy
trunks, icebergs, end spikes, strongholds, note pitches, sculk charge
particles, the warden's and brains' weighted shuffles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:06:48 +02:00