Commit Graph

3685 Commits

Author SHA1 Message Date
Ludovic Marie 5530d682ab Arrows interpolate from their last tick, not from where they were shot
arrows::tick never set the projectile's previous position (Entity.setOldPosAndRot
at the start of every tick); Projectile::tick does, but arrows don't go
through it. The renderer lerped from the spawn point to the current
position every frame, so a flying or stuck arrow jumped along its whole
path. The arrow harness now prints the old position too.

Fixes #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:03:39 +02:00
Ludovic Marie f88bfc66f8 Recipe toasts show the crafting station and cycle through every unlocked recipe (#283)
RecipeToast keeps the station and result of each display unlocked while it
is up, draws the station at 0.6 scale in the plaque's corner over the result,
takes turns through them over the display time and stays up five more seconds
after each unlock. Toasts slide in and out on ToastInstance's squared curve,
honour notificationDisplayTime and play ui.toast.in / ui.toast.out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:55:36 +02:00
Ludovic Marie 7c2a31206c Bees fly, pollinate flowers, get angry and sting (#208)
A port of vanilla 26.3 Bee: FlyingMoveControl and flying navigation,
hover wandering, flower search and pollination (nectar), growing crops,
tempting and breeding, persistent anger with the hurt-by alert, the sting
(poison, stinger lost, later death), drowning, staying home at night and
in rain, roll, textures and NBT. Hives as homes are not simulated yet.

FlyingMoveControl clamps the pitch like Entity.setXRot, so a rotlerp
that wraps to 359 gives 90 as in vanilla.

Mob AI parity: 9 bee scenarios, 3609/3609 ticks; full harness 120/120.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie 2bcb30b375 Bats hang upside down and fly, with their wing animations (#215)
Bats fell into the generic fallback AI and walked like land animals; their
animation states were never started. Port vanilla Bat: hanging from a solid
block until a player comes within 4 blocks or the block goes, the take-off
level event, customServerAiStep's flight towards random nearby air, Bat.tick
(held to the ceiling while resting, vertical speed scaled by 0.6 in flight),
setupAnimationStates (flying and resting keyframes), waking when hurt,
BatFlags in the save, no fall damage, movement events without sounds, the
lower voice pitch, and no omnidirectional air drag (vanilla gives that only
to bees, parrots and sulfur cubes).

Mob AI parity harness: six bat scenarios, 6/6 match (1906/1906 mob-ticks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie 8cd97334bf Striders stand on lava instead of bobbing in it (#256)
Striders fell into the generic fallback AI, whose FloatGoal jumped them
up and down in lava. Port vanilla Strider: its goals (no FloatGoal,
StriderGoToLavaGoal, RandomStrollGoal every 60 ticks, LookAtPlayerGoal for
striders), floatStrider, standing on lava sources through the living
collision context and the half-block liquid shape, travelling in air where
lava holds it up, StriderPathNavigation's lava destinations, the walk target
value, going cold (suffocating speed modifier, cold texture) away from warm
blocks, the happy/retreat sounds and a lava-proof checkFallDamage.

Mobs now keep Entity.mainSupportingBlockPos from their last move, as
getBlockStateOnLegacy reads it.

Mob AI parity harness: five strider scenarios, 5/5 match (1105/1105
mob-ticks; 0/5 and 5/1105 before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie fb15822b3b Load PersistenceRequired as vanilla does: copper golems save 0 again
Mob.readAdditionalSaveData assigns persistenceRequired from the tag,
overriding the constructor's setPersistenceRequired (copper golems,
elder guardians). Horizon ORed it in, so a copper golem vanilla saved
with 0 came back with 1. The monument's elder guardian, which Horizon
builds from NBT where vanilla calls the constructor, now carries the
flag in its spawn NBT.

Fixes #289

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:41:31 +02:00
Ludovic Marie e626a727a1 Merge pull request #267 from ludovic111/feat/perf-mesh-once
Mesh each column once its neighbours' light has settled
2026-10-15 07:35:44 +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 0f569a4918 Merge pull request #261 from ludovic111/feat/launcher-perf
Launcher measurements: a session performance log and horizon-launcher benchmark
2026-10-15 07:20:59 +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 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
Ludovic Marie 0c685d9db4 Stop reloading saved columns every frame after the player moves
Generation asked for columns within the view distance + 3 or two of a
finished chunk, but a column that came back finished (loaded from the
save) was kept only within + 2 or one of a finished chunk. After a
teleport, saved columns in between were loaded, dropped, asked for and
loaded again on every frame, forever: 8 of them at render distance 16
held 8 of the 39 in-flight generation slots and kept the disk and a
worker busy. The requested, kept and unloaded ranges now live in Ranges
and nest; requested_columns_stay_loaded checks it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:14:31 +02:00
Ludovic Marie 78f206bc22 Mesh only when no neighbour is being lit; skip columns that can't be lit yet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:04:25 +02:00
Ludovic Marie 4f3326e983 Mesh a column once its neighbours' light has settled
A new chunk relights its eight neighbours, and every finished light job
dirties all sections of the 3x3 columns around it. Meshing waited only for
the column itself to be lit, so sections near the loading frontier were
meshed with half-settled light and again after each neighbour's relight:
about 2.25 meshes per section while a world loads. Wait until no column of the
3x3 is being lit or queued for light. The final meshes are the same; they are
built once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:04:25 +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 ff29d50f73 Merge pull request #219 from rdbtCVS/fix/classic-title-menu-parity
Fix classic title menu layout and accessibility shortcut
2026-10-15 07:02:08 +02:00
Ludovic Marie 146c0fd3ce benchmark: a load ends when every streaming stage is idle
Same rule as perf_bench: with status.streaming, the last sections are drawn
once no stage has held work for half a second, so the remeshing that
follows a load (fluids settling, random ticks) isn't counted as loading.
Without it, meshing still has to go quiet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +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 0f61ed6b63 benchmark: Apple GPUs by name (Metal has no vendor ID)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +02:00
Ludovic Marie 32695d4680 benchmark: a load ends when meshing goes quiet too
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 c78f2d3e27 Launcher measurements: a session performance log and horizon-launcher benchmark
Each session rewrites benchmarks/launcher-<time>-session.json in the data
folder (report format v1): start to first frame, release list fetch,
install/update and prepare durations, Play to the game's first frame (the
game now logs its first frame), RSS, UI frame times, binary size.
horizon-launcher benchmark starts the launcher N times (cold, then warm),
switches pages, measures idle CPU and memory and the release list fetch,
and writes one report with means and 95% CIs. Nothing is uploaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:02 +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 c44d311d46 Merge pull request #239 from rdbtCVS/perf/chunk-membership-sync-20261014
perf(client): skip tick chunk synchronization when membership is unchanged
2026-10-15 06:58:40 +02:00
Ludovic Marie c8ce1e081d Merge pull request #184 from rdbtCVS/t3code/fix-effect-icon-rendering
Fix status effect icons and display effects in inventories
2026-10-15 06:58:33 +02:00
Ludovic Marie 9b0d8fd7d7 Merge pull request #204 from rdbtCVS/perf/entity-model-document-20261014
perf(client): share parsed entity models across startup batches
2026-10-15 06:58:11 +02:00
Ludovic Marie 639d315859 Merge pull request #210 from rdbtCVS/perf/single-state-model-parse-20261014
perf(client): reuse parsed model states during preparation
2026-10-15 06:56:45 +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 5071cd785a Merge pull request #237 from rdbtCVS/perf/entity-material-buckets-20261014
perf: reuse renderer entity material batching buffers
2026-10-15 06:55:45 +02:00
Ludovic Marie 3df34df87b Merge pull request #284 from ludovic111/fix/bastion-chunks
Save every generated chunk and decorated proto chunks, as vanilla does (#249)
2026-10-15 06:48:44 +02:00
Ludovic Marie 8965ca5e2b Merge pull request #274 from ludovic111/fix/mesh-out-of-range
Mesh columns loaded past the render distance once they come in range (#228)
2026-10-15 06:48:24 +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 1c3fd6e23c Save every generated chunk and the proto chunks decoration wrote to (#249)
Horizon saved a chunk only once a player changed it and never saved proto
chunks, so leaving an area dropped decorated chunks while the final chunks
next to them stayed loaded (or were regenerated later). Coming back, those
chunks were generated again and their decoration was skipped beside a final
neighbour: whole chunks of a bastion lost their pieces, other chunks their
features. Like vanilla, generated chunks are now saved, proto chunks that
decoration wrote to are saved with their status (terrain or features) and
restored onto the chunk generated again, columns that finish after the player
left are saved, and saving waits for the decorations in flight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:37:05 +02:00
Ludovic Marie 4901bdf231 Mesh sections of columns that load past the render distance once in range (#228)
The mesh loop dropped every dirty section of a loaded column outside the
render distance. Columns load up to three chunks past it, and a column
loaded from a save with its light runs no light job, so nothing asked for
its sections again: once the player came closer it stayed invisible until
a block in it changed. Those sections now wait and are put back when the
centre, radius or forced chunks change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:12:18 +02:00
Ludovic Marie 087cbacdc4 Merge pull request #268 from Online5277/fix/entity-use-occlusion
Prevent block interactions through targeted entities
2026-10-15 05:38:42 +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 5c2201a781 Merge pull request #200 from ludovic111/feat/friends-join
Play with friends (3/3): Join a friend with the code alone, in game and in the launcher; end-to-end harness
2026-10-15 05:07:05 +02:00
Ludovic Marie 44a78fe65e Merge pull request #199 from ludovic111/feat/friends-host
Play with friends (2/3): Invite friends in the pause menu (no server needed)
2026-10-15 05:06:36 +02:00
Ludovic Marie 213af61b92 status: report each streaming stage's work
`status` gains `streaming` (queued jobs, chunks generating, protos waiting for
decoration, decorating, finishing, lighting, meshing) and `dirty_light`, so a
slow load shows which stage it waits on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 04:55:14 +02:00
Ludovic Marie 12b5e39ac8 Merge pull request #192 from ludovic111/feat/friends-relay
Play with friends (1/3): invite codes that need no server, port mapping, STUN, a relay anyone can run
2026-10-15 04:49:42 +02:00
Ludovic Marie 7a184a41f0 Merge pull request #259 from Online5277/fix/options-list-clipping
Clip options rows smoothly at list boundaries
2026-10-15 04:39:25 +02:00
Ludovic Marie ef569d3201 Merge pull request #262 from Online5277/fix/spectator-movement
Prevent climbable blocks from slowing spectator flight
2026-10-15 04:39:22 +02:00
Ludovic Marie 20ecaf0254 Merge pull request #266 from Online5277/fix/gamemode-switcher
Add the F3+F4 game mode switcher
2026-10-15 04:39:17 +02:00
Ludovic Marie 75a30185a5 Keep blank splash lines like SplashManager.prepare
Vanilla trims each line and drops only the hidden splash (hash 125780783);
a blank line stays a (blank) splash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 04:37:23 +02:00
rdbtCVS bd4101e9d1 Update merged world-menu test for title resource loading 2026-10-15 04:37:23 +02:00
rdbtCVS a0f3315a79 Address title menu review: language, icon opacity, and splash behavior 2026-10-15 04:37:23 +02:00
rdbtCVS cccb5bff96 Match Minecraft integer centering for title menu icons 2026-10-15 04:37:08 +02:00