[PR #747] [CLOSED] Startup: keep the title's atlas and panorama in one UI bundle (#712) #2778

Closed
opened 2026-11-02 15:58:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/747
Author: @rdbtCVS
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: t3code/08bad3fd-2a


📝 Commits (1)

  • 7f1cf15 Startup: keep the title's atlas and panorama in one UI bundle (#712)

📊 Changes

61 files changed (+304 additions, -241 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+91 -67)
📝 crates/horizon-client/src/game/advancements.rs (+3 -3)
📝 crates/horizon-client/src/game/advancements_screen.rs (+9 -9)
📝 crates/horizon-client/src/game/armor_stands.rs (+3 -3)
📝 crates/horizon-client/src/game/beacon.rs (+11 -5)
📝 crates/horizon-client/src/game/boats.rs (+1 -0)
📝 crates/horizon-client/src/game/books.rs (+3 -3)
📝 crates/horizon-client/src/game/cartography.rs (+3 -3)
📝 crates/horizon-client/src/game/chat.rs (+15 -13)
📝 crates/horizon-client/src/game/command_blocks.rs (+1 -1)
📝 crates/horizon-client/src/game/commands.rs (+1 -1)
📝 crates/horizon-client/src/game/control.rs (+1 -1)
📝 crates/horizon-client/src/game/creatures.rs (+1 -1)
📝 crates/horizon-client/src/game/debug_keys.rs (+1 -1)
📝 crates/horizon-client/src/game/dragon.rs (+12 -4)
📝 crates/horizon-client/src/game/end.rs (+5 -3)
📝 crates/horizon-client/src/game/extras.rs (+4 -4)
📝 crates/horizon-client/src/game/fangs.rs (+1 -0)
📝 crates/horizon-client/src/game/fishing.rs (+1 -0)
📝 crates/horizon-client/src/game/fov.rs (+1 -1)

...and 41 more files

📄 Description

Part of #712 (stage 2a: extract the UI bundle). Stacked on #740 (stage 1);
this branch is based on t3code/08bad3fd, so until #740 merges the diff shown
here also contains stage 1. It shrinks to just this commit once #740 lands.

What and why

The title's GUI atlas and its panorama both come from the resource root and are
only needed to draw the title and menus, but they lived apart: the atlas on
Game and the panorama inside PackResources (which is world/render data).
Gather them into one UiResources { atlas, panorama } bundle, so stage 2 can
load the title bundle before the world bundle and make the title interactive
early.

This is a pure type move: no load order, output or rendering change. The atlas
is still built exactly as before, the panorama is still read from the same root,
and build_renderer takes the panorama from UiResources instead of
PackResources.

How

  • New UiResources in game.rs with UiResources::load(root) (atlas + panorama).
  • PackResources loses its panorama field; Game.atlas becomes
    Game.gui: UiResources.
  • All reading sites move from self.atlas to self.gui.atlas (mechanical).
  • Loaded/Game::new/start_game/build_renderer/renderer_for and
    reload_resources pass the bundle; the integrated server's font-only game
    gets an empty panorama (it draws nothing).
  • Loading keeps its own early Option<HudAtlas> for the loading screen.

No new dependencies. UiResources is Send (it crosses the loader channel),
which the existing smoke/async runs exercise; it is not Sync (the font is
main-thread state), so the shared_resources_* test still covers only
Resources/PackResources.

Testing

  • cargo build --profile fast -p horizon-client
  • cargo test -p horizon-client --locked — 913 passed
  • HORIZON_NO_AUDIO=1 ./target/fast/horizon-client --offscreen --frames 3 --resources … --smoke-report /tmp/s.json — sync path, 3 frames, report written
  • Async path (real window): loading screen at 331 ms, resources loaded, real renderer swapped in, title backdrop started, no surface errors
  • python3 tools/pr_ready.py --base origin/main

pr_ready (tools/pr_ready.py on archlinux, against origin/main at 4a56e505a, 44 s)

Check Result
Scope ⚠️ 62 files, +946 −296; 1242 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (22 s)
tests: horizon-client ✅ 913 passed (16 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The scope warning is inflated by the stacked stage-1 diff; this commit alone is
61 files, +304 −241. The file count is large only because self.atlas is
renamed to self.gui.atlas at ~204 call sites (one line each); the actual new
logic is the UiResources type and four call-site signatures.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/747 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `t3code/08bad3fd-2a` --- ### 📝 Commits (1) - [`7f1cf15`](https://github.com/horizon-rust/horizon/commit/7f1cf151c1798c18929c0ef97930a8c3cd649063) Startup: keep the title's atlas and panorama in one UI bundle (#712) ### 📊 Changes **61 files changed** (+304 additions, -241 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+91 -67) 📝 `crates/horizon-client/src/game/advancements.rs` (+3 -3) 📝 `crates/horizon-client/src/game/advancements_screen.rs` (+9 -9) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+3 -3) 📝 `crates/horizon-client/src/game/beacon.rs` (+11 -5) 📝 `crates/horizon-client/src/game/boats.rs` (+1 -0) 📝 `crates/horizon-client/src/game/books.rs` (+3 -3) 📝 `crates/horizon-client/src/game/cartography.rs` (+3 -3) 📝 `crates/horizon-client/src/game/chat.rs` (+15 -13) 📝 `crates/horizon-client/src/game/command_blocks.rs` (+1 -1) 📝 `crates/horizon-client/src/game/commands.rs` (+1 -1) 📝 `crates/horizon-client/src/game/control.rs` (+1 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -1) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+1 -1) 📝 `crates/horizon-client/src/game/dragon.rs` (+12 -4) 📝 `crates/horizon-client/src/game/end.rs` (+5 -3) 📝 `crates/horizon-client/src/game/extras.rs` (+4 -4) 📝 `crates/horizon-client/src/game/fangs.rs` (+1 -0) 📝 `crates/horizon-client/src/game/fishing.rs` (+1 -0) 📝 `crates/horizon-client/src/game/fov.rs` (+1 -1) _...and 41 more files_ </details> ### 📄 Description Part of #712 (stage 2a: extract the UI bundle). **Stacked on #740** (stage 1); this branch is based on `t3code/08bad3fd`, so until #740 merges the diff shown here also contains stage 1. It shrinks to just this commit once #740 lands. ## What and why The title's GUI atlas and its panorama both come from the resource root and are only needed to draw the title and menus, but they lived apart: the atlas on `Game` and the panorama inside `PackResources` (which is world/render data). Gather them into one `UiResources { atlas, panorama }` bundle, so stage 2 can load the title bundle before the world bundle and make the title interactive early. This is a pure type move: no load order, output or rendering change. The atlas is still built exactly as before, the panorama is still read from the same root, and `build_renderer` takes the panorama from `UiResources` instead of `PackResources`. ## How - New `UiResources` in `game.rs` with `UiResources::load(root)` (atlas + panorama). - `PackResources` loses its `panorama` field; `Game.atlas` becomes `Game.gui: UiResources`. - All reading sites move from `self.atlas` to `self.gui.atlas` (mechanical). - `Loaded`/`Game::new`/`start_game`/`build_renderer`/`renderer_for` and `reload_resources` pass the bundle; the integrated server's font-only game gets an empty panorama (it draws nothing). - `Loading` keeps its own early `Option<HudAtlas>` for the loading screen. No new dependencies. `UiResources` is `Send` (it crosses the loader channel), which the existing smoke/async runs exercise; it is not `Sync` (the font is main-thread state), so the `shared_resources_*` test still covers only `Resources`/`PackResources`. ## Testing - `cargo build --profile fast -p horizon-client` - `cargo test -p horizon-client --locked` — 913 passed - `HORIZON_NO_AUDIO=1 ./target/fast/horizon-client --offscreen --frames 3 --resources … --smoke-report /tmp/s.json` — sync path, 3 frames, report written - Async path (real window): loading screen at 331 ms, resources loaded, real renderer swapped in, title backdrop started, no surface errors - `python3 tools/pr_ready.py --base origin/main` **pr_ready** (`tools/pr_ready.py` on archlinux, against origin/main at 4a56e505a, 44 s) | Check | Result | | --- | --- | | Scope | ⚠️ 62 files, +946 −296; 1242 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (22 s) | | tests: horizon-client | ✅ 913 passed (16 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The scope warning is inflated by the stacked stage-1 diff; this commit alone is 61 files, +304 −241. The file count is large only because `self.atlas` is renamed to `self.gui.atlas` at ~204 call sites (one line each); the actual new logic is the `UiResources` type and four call-site signatures. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:58:58 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2778
No description provided.