Commit Graph

1686 Commits

Author SHA1 Message Date
Ludovic Marie bf4fcc3aa9 Merge pull request #394 from ludovic111/fix/text-highlight
Vanilla text selection colours and blinking cursors in the creative search and anvil
2026-10-15 21:07:57 +02:00
Ludovic Marie adef2bdc24 Draw text selections with vanilla's colours and blink the field cursors
GuiGraphicsExtractor.textHighlight paints an inverting white fill, then
adds pure blue (GUI_TEXT_HIGHLIGHT, additive). Horizon only inverted, so
selections lacked the blue: black text on a light box, not blue text.
The anvil's name box skips the inversion (setInvertHighlightedTextColor
false), as in AnvilScreen.

The creative search and anvil name box now draw like EditBox: the cursor
blinks from when the field took the focus (300 ms on, 300 ms off), turns
into a bar once the field is full, and Select All highlights the value.
Sign lines draw their Select All highlight too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:44:19 +02:00
Ludovic Marie aca5f3a8ba Merge pull request #358 from ludovic111/fix/inventory-shift
Shift-click on every container screen, even when Shift is pressed after it opens
2026-10-15 19:38:36 +02:00
Ludovic Marie 36f61d68f1 Merge pull request #250 from ludovic111/feat/telemetry-launcher
Opt-in data collection (2/5): the launcher asks, Settings changes it, CLI and MCP
2026-10-15 19:06:43 +02:00
Ludovic Marie d53a366718 Opt-in data collection (2/5): the launcher asks, and Settings changes it
- First run (and when CONSENT_VERSION changes): a question over the launcher
  with four switches, all off, what each sends in plain words, what is never
  sent, "View what would be sent" (the exact JSON), and "Send nothing" /
  "Save choices".
- Settings → Data collection: the same switches any time, the install ID and
  what waits, "View what would be sent" and "Delete my data" (server deletion,
  outbox cleared, new install ID).
- The outbox is sent at start and on close (at most 3 s), only when there is a
  server (none yet) and only what the player allows.
- CLI `horizon-launcher data status|allow|deny|show|delete|send|bug|benchmark`
  and MCP tools data_collection, set_data_collection, data_preview,
  delete_my_data, report_bug. Bug reports and benchmark uploads are printed for
  the player to confirm; logs are scrubbed and lose chat lines.
- horizon-telemetry joins the launcher's paths (launcher.yml, release_train,
  pr_ready).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 18:52:45 +02:00
Ludovic Marie 713ff1d4a1 Merge pull request #355 from ludovic111/perf/spawn-heightmap
Natural spawning skips air sections when finding the surface
2026-10-15 18:42:48 +02:00
Ludovic Marie 4566d3175b Merge pull request #354 from ludovic111/fix/cpu-defaults
Cap a fresh install at vanilla's 120 FPS
2026-10-15 18:42:36 +02:00
Ludovic Marie 1264cb6556 Merge pull request #353 from ludovic111/fix/proto-save-off-main
Save proto chunks on a worker, not the main thread
2026-10-15 18:42:24 +02:00
Ludovic Marie 1ce266f66c Merge pull request #352 from ludovic111/fix/remesh-light-changes
Relit chunks remesh only where their light changed
2026-10-15 18:42:06 +02:00
Ludovic Marie 9cb9f8beeb Merge pull request #329 from ludovic111/feat/cargo-horizon-mod
cargo horizon-mod: new, build and run Horizon mods
2026-10-15 18:30:21 +02:00
Ludovic Marie 1a04810baf Merge pull request #328 from ludovic111/feat/mod-runtime
Horizon mods runtime: sandboxed WebAssembly components with wasmtime
2026-10-15 18:04:48 +02:00
Ludovic Marie c3b32fdab5 Merge pull request #327 from ludovic111/feat/mod-sdk
Horizon mod SDK: the WIT contract, a Rust SDK and an example mod
2026-10-15 18:02:34 +02:00
Ludovic Marie b8ed3a113a Merge pull request #326 from ludovic111/docs/mods-design
Mods design: Horizon's Rust mod system and what carries over from Java mods
2026-10-15 18:02:26 +02:00
Ludovic Marie 68cbad54a3 Merge pull request #351 from ludovic111/feat/agent-waits
Agent control: wait for a state, and the log of what happened
2026-10-15 17:43:54 +02:00
Ludovic Marie 24a702181a Merge pull request #350 from ludovic111/feat/agent-options
Agent control: read and set every option by key
2026-10-15 17:35:49 +02:00
Ludovic Marie f6ceb1da22 Merge pull request #342 from ludovic111/feat/launcher-mcp-game
Launcher MCP: play the running game through game_* tools
2026-10-15 17:34:47 +02:00
Ludovic Marie e6588a13f3 Merge pull request #349 from ludovic111/feat/agent-ui-tree
Agent control: the widget tree of every screen, click and set by id
2026-10-15 17:33:58 +02:00
Ludovic Marie 49fc287254 Merge pull request #321 from ludovic111/docs/agent-control
Agent control: audit and design (docs/agent-control.md)
2026-10-15 17:25:24 +02:00
Ludovic Marie 92d1338e24 Merge pull request #341 from rdbtCVS/perf/20261015-animated-sprite-mips
Cache animated sprite mip chains within an 8 MiB budget
2026-10-15 17:25:19 +02:00
Ludovic Marie 43134d5ebf Merge pull request #330 from rdbtCVS/perf/20261015-shared-model-library
perf(client): share parsed block and item models
2026-10-15 17:24:47 +02:00
Ludovic Marie 6b26f926df docs/agent-control.md: match what was built; before and after; status
The design sections now describe the implementation: ids for rows,
switches and segments, the redraw wait, wait-for --since and event KIND,
the events log (subscribe comes next), the launcher proxying through
horizon-ctl mcp. A before/after table and the PRs of each step replace
the plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:01:03 +02:00
Ludovic Marie 293c589e35 Read the physical Shift and Ctrl keys on every container screen
The workstation screens (anvil, grindstone, stonecutter, smithing,
enchanting, cartography, loom, beacon, villager trading, brewing stand),
the horse/llama/camel inventory and the creative item grid read Shift from
the sneak mapping (`keys`). Behind a screen a Shift press never reaches the
mapping (KeyboardHandler.keyPress: only releases do) and Right Shift isn't
mapped at all, so shift-click there worked only when Shift was already held
before the screen opened. They now read `has_shift_down` like
AbstractContainerScreen (`InputWithModifiers.hasShiftDown`), and the recipe
book reads Ctrl the same way (`Minecraft.hasControlDown`).

`status` reports `physical_keys` so scripts can check what the OS delivered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:50:44 +02:00
Ludovic Marie 58af88f809 Merge pull request #344 from ludovic111/feat/shader-pack-loader
Shader packs (1/3): load and validate Horizon WGSL packs
2026-10-15 16:14:09 +02:00
Ludovic Marie 7e9bca982b Merge pull request #340 from ludovic111/docs/resource-pack-audit
Resource packs: what works, audited against 26.3
2026-10-15 16:14:03 +02:00
Ludovic Marie b4cb428ca9 Merge pull request #333 from ludovic111/docs/shader-packs
Shader packs design: Horizon WGSL packs and OptiFine/Iris translation
2026-10-15 16:13:56 +02:00
Ludovic Marie 1b468100aa Save proto chunks on a worker, not the main thread (#224)
Converting a proto chunk for saving (VanillaTerrain::saved_proto copies it
block by block into a column, then encodes it) ran on the main thread: in
Streaming::save during the autosave, and in Streaming::update for every far
proto unloaded while exploring. The protos are now checked out (like a
decoration job does) and saved by a worker, ahead of every other job, then
handed back. The explicit save and quitting still save them in place, after
waiting for the saves in flight; dropping the streamer waits for them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:00:00 +02:00
Ludovic Marie e0ecbf1db1 Test that relit columns keep every mesh current
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:59:58 +02:00
Ludovic Marie 3137c7b977 Relit chunks remesh only where their light changed (#270)
A light job for a chunk that was already lit (a neighbour loaded, or a block
changed in an unlit neighbour) dirtied every section of the 3x3 columns
around it: 216 remeshes, whether or not any light changed. It now writes only
the sections whose light changed and dirties the sections around the changed
positions, as the incremental relight already does. A chunk lit for the
first time still dirties its 3x3 neighbourhood.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:59:58 +02:00
Ludovic Marie 7f631bb36f Natural spawning skips sections of air when it finds the surface
GameLevel::heightmap found getHeight by testing every block from the top
of the world down (with a block tag lookup each), for every spawnable chunk
every tick: a quarter of the main thread in a village. Sections holding
only air are now passed over whole; air counts for no heightmap, so the
height is the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:43:40 +02:00
Ludovic Marie 047bf45af1 Shader packs doc: match the first slice (sun angle, folders)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:25:31 +02:00
Ludovic Marie 9739740379 Shader packs: load and validate Horizon WGSL packs (pack.toml, prelude, options)
shader_pack.rs reads shaderpacks/<pack>/pack.toml, the player's option
values (shaderpacks/<pack>.txt) and each composite stage's WGSL, puts
the api 1 prelude (bindings, the Frame uniform, depth helpers) before
it and has naga parse and validate it, with errors pointing into the
pack's own file. Options are WGSL override constants. A file stamp
tells when the pack was edited, for hot reload. Nothing draws with it
yet. examples/shaderpacks/horizon-sample is the MIT sample pack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:18:32 +02:00
Ludovic Marie eb466fe2d2 Shader packs: Iris translation spike results and implementation order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:15:06 +02:00
rdbtCVS 6d4aa954bb docs: record model sharing results after upstream integration 2026-10-15 14:00:10 +01:00
rdbtCVS b1c365fca1 Cache animated sprite mip chains within an 8 MiB budget 2026-10-15 13:59:45 +01:00
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 41f82e8db0 Resource packs: audit of every 26.3 pack feature with its proof
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:42:42 +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 304ea50a5f Shader packs design: the renderer's passes, Horizon WGSL packs and Iris translation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:35:11 +02:00
Ludovic Marie 1573e4e553 Cap a fresh install at vanilla's 120 frames per second (#271)
Without an options.txt the game ran unlimited (260), while an options.txt
without maxFps, like vanilla, gives 120. With VSync off (or rendering
offscreen) that kept a core busy drawing frames nobody sees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:34:36 +02:00
Ludovic Marie 337ee470b5 Merge pull request #318 from rdbtCVS/perf/20261015-random-tick-eligibility
Cache random-tick section eligibility across unchanged chunks
2026-10-15 14:29:44 +02:00
Ludovic Marie 1286523047 Merge pull request #309 from rdbtCVS/perf/20261015-typed-block-facts
Load gameplay facts with typed decoding and interned shapes
2026-10-15 14:29:37 +02:00
Ludovic Marie b0abb62883 Launcher MCP: play the running game through game_* tools
An agent now needs one MCP server. horizon-launcher mcp runs the selected
version's horizon-ctl mcp as a child and offers its tools as game_<name>
(all but launch, which launch_client covers), passing calls and image
results through. launch_client starts the game with a control socket in
the launcher's data folder, takes world, creative and offscreen, and
returns once the socket answers. A game tool called while no game listens
says to call launch_client.

tools/launcher_mcp_e2e.py checks it end to end against this checkout's
builds in a scratch launcher home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:23:57 +02:00
Ludovic Marie a2b62913ba Merge pull request #331 from ludovic111/chore/discord-assets-to-kira
Move the Discord brand assets to the kira repo
2026-10-15 14:23:38 +02:00
Ludovic Marie 8dc2a0e90a Move the Discord brand assets to the kira repo; this repo holds the game, launcher and website
The Discord server banner (page + PNG), the server icon render and Kira's avatar (SVG master +
render) now live in the private kira repo (ludovic111/kira#1). xtask icons no longer renders them;
the brand README points there, and CONTRIBUTING states what belongs in this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:23:14 +02:00
rdbtCVS 969ff7e4d9 Merge main and preserve shared model-state preparation 2026-10-15 13:22:02 +01:00
rdbtCVS 7b8189d19c perf(client): share parsed block and item models 2026-10-15 13:20:49 +01: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
Ludovic Marie 90edb028bf Mods design: Horizon's Rust mod system and what carries over from Java mods
docs/mods.md: the sandboxed WebAssembly runtime, capabilities, hooks, budgets,
authoring, versions, multiplayer and distribution, with measured hook costs.
docs/research/java-mod-compat.md: why Fabric/NeoForge jars cannot run, data
import, which mods to port natively first, a porting guide outline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:04:56 +02:00
Ludovic Marie 0248df4d90 cargo horizon-mod: new, build and run Horizon mods
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:01:57 +02:00
Ludovic Marie b3906d803d Horizon mods runtime: load sandboxed WebAssembly components with wasmtime
Manifest and .hmod reading, capability checks against the component's imports,
fuel and memory limits per call, a trapping mod stopped alone, hot reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:01:57 +02:00