Commit Graph

1572 Commits

Author SHA1 Message Date
Ludovic Marie 3ed8abd25e Merge pull request #300 from ludovic111/fix/autosave-spike
Autosave stops waiting for entity writes: no more 2 s freeze (#224)
2026-10-15 09:58:50 +02:00
Ludovic Marie c0e1095ea9 Merge pull request #294 from ludovic111/fix/arrow-interpolation
Arrows stop jumping along their path after they land (#278)
2026-10-15 09:58:46 +02:00
Ludovic Marie 9593d9e329 Merge pull request #292 from ludovic111/fix/golem-persistence
Copper golems keep the persistence vanilla saved (#289)
2026-10-15 09:58:42 +02:00
Ludovic Marie b18261cc79 Autosave doesn't wait for the entity writes
The autosave queued its chunks without waiting (#284), then saved the
entities with the waiting call. The region writer is one FIFO thread,
so the main thread still waited for every chunk queued before the
entities: a 1.9 s frame at the 5-minute autosave on a world with ~900
columns. Like PersistentEntitySectionManager.autoSave (saveAll's flush
only on save-all and quit), the autosave now queues the entities too.

Part of #224

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:39:04 +02:00
Ludovic Marie 02cfbf6f28 Merge pull request #298 from ludovic111/fix/firework-entity-light
Draw flying firework rockets as their lit item model like vanilla
2026-10-15 09:31:33 +02:00
Ludovic Marie eb1467f45f Merge pull request #297 from ludovic111/fix/leaves-option-remesh
Rebuild every section when See-Through Leaves, Smooth Lighting or Biome Blend changes
2026-10-15 09:30:39 +02:00
Ludovic Marie bab7cf92a7 Merge pull request #296 from ludovic111/fix/reversed-z-depth
Render the world with reversed depth like vanilla (far fire no longer flickers)
2026-10-15 09:30:02 +02:00
Ludovic Marie cf67db1873 Render firework rockets as their lit item model like vanilla
FireworkEntityRenderer submits the rocket's item in the GROUND context,
turned to the camera (and over on its side when shot at an angle), at the
packed light of its eye. Horizon drew a flat 0.5-block sprite at full
brightness, so rockets glowed at night and had no item shading.

Fixes #279

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
Ludovic Marie 81b07d1dd9 Rebuild every section when a meshing option changes like vanilla
Options.cutoutLeaves, ambientOcclusion and biomeBlendRadius call
LevelExtractor.allChanged when they change. Horizon only handed the new
value to the mesher, so after turning See-Through Leaves off the loaded
sections kept their see-through leaves, pale against the sky, beside the
opaque ones of sections rebuilt later.

Fixes #273

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
Ludovic Marie 1bfef88477 Render the world with reversed depth like vanilla
Vanilla 26.3's Projection passes its planes reversed and every pipeline
tests GREATER_THAN_OR_EQUAL. Horizon kept forward depth with a 0.05 near
plane, so far geometry lost precision and fire_side's quad, 0.01 pixel in
front of the block it burns on, z-fought with it.

Fixes #272

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
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 b5a2afb71e Merge pull request #291 from ludovic111/feat/bee-flight
Bees fly, pollinate flowers, get angry and sting
2026-10-15 08:19:07 +02:00
Ludovic Marie 77cad63374 Merge pull request #287 from ludovic111/fix/bat-flight
Bats hang upside down and fly, with their wing animations
2026-10-15 08:12:08 +02:00
Ludovic Marie 271a26515a Merge pull request #285 from ludovic111/fix/strider-lava
Striders stand on lava instead of bobbing in it
2026-10-15 08:08:58 +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 6dde5ec2d0 Merge pull request #288 from ludovic111/fix/save-roundtrip-macos
Run the save round-trip harness on macOS without vscreen
2026-10-15 07:26:54 +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 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
Ludovic Marie 375a685b84 Merge pull request #230 from rdbtCVS/perf/generation-scan-invalidation-20261014
perf(streaming): skip unchanged generation scans
2026-10-15 07:11:36 +02:00
Ludovic Marie e64c80243d Run the save round-trip harness on macOS without vscreen
On macOS the Horizon client renders offscreen (--offscreen) with audio off,
from the logged-in session; Linux keeps vscreen and the null ALSA device.
The vanilla side was already a headless dedicated server. --bin-dir is
resolved, since the client runs from the run folder. parity.py no longer
skips save_roundtrip off Linux; it stays local-only (no rendering over SSH).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:04:56 +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 49b6367d2e perf_bench: a load ends when every streaming stage is idle
Builds that report status.streaming are loaded once chunk counts are
stable and no stage (generation, decoration, light, meshing) has held work
for half a second. Meshing going quiet also waited through the remeshing
that follows a load (fluids settling, random ticks: 1500 falling to 60
meshes/s for ~150 s at RD16), which is simulation, not loading. Older
builds keep the meshing-rate rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:03 +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 bb1c292a40 Launcher benchmark reports go to the telemetry outbox with the benchmark-upload consent; tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:02 +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