[PR #451] [MERGED] Level loading screen like vanilla: panorama, chunk map and progress bar #2575

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/451
Author: @ludovic111
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: fix/level-loading-screen


📝 Commits (1)

  • 5373998 Level loading screen like vanilla: panorama, chunk map and progress bar

📊 Changes

5 files changed (+245 additions, -20 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+78 -19)
📝 crates/horizon-client/src/game/initial_spawn.rs (+0 -1)
➕ crates/horizon-client/src/level_loading.rs (+142 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/streaming.rs (+24 -0)

📄 Description

Fixes #364

What vanilla does (LevelLoadingScreen, opened by Minecraft.doWorldLoad and by dimension changes)

  • Background (extractBackground):
    • Reason.OTHER (opening a world): the panorama, the blur and the menu background;
    • NETHER_PORTAL: the nether portal block sprite over the screen;
    • END_PORTAL: the end portal effect.
  • Chunk map (extractChunksForRendering): the ChunkLoadStatusView around the player, radius max(5, 3) + RADIUS_AROUND_FULL_CHUNK + 1 = 8. That is 17×17 cells of 2 px coloured by COLORS, black where a chunk hasn't been asked for, centred on the screen.
  • Text and bar: multiplayer.downloadingTerrain at yCenter - radius*2 - 27. Under it, a 200×2 bar (black, filled green) showing smoothedProgress, which eases a fifth of the way each tick towards LevelLoadProgressTracker.get(): weight 10 for the prepared server plus the 49 player chunks.

Horizon drew "Loading terrain..." (or its own "Finding a place to spawn...") centred on a flat dark fill.

Changes

  • New level_loading.rs: statuses and colours, the progress weights and easing, and the drawing, with tests.
  • Streaming::latest_status maps Horizon's pipeline onto ChunkStatus:
    • generating → EMPTY;
    • proto → TERRAIN;
    • decorated or finishing → FEATURES;
    • loaded but unlit → INITIALIZE_LIGHT;
    • lit → FULL.
  • game.rs:
    • loading_reason while the player isn't placed;
    • the title's panorama, blur and menu background for OTHER;
    • the portal overlay sprite for nether portals;
    • progress from the lit chunks of the 7×7 around the player.
  • The non-vanilla "Finding a place to spawn..." text is gone, with spawn_search.
  • Not included: the End portal's animated background. That case keeps the old dark fill.

How it was verified

  • Unit tests progress_weighs_the_prepared_server_and_the_player_chunks and colours_are_opaque_rgba.
  • In game (Mac mini, offscreen), screenshots while a new world loads:
    • the text above the bar, the bar filling green, and the 34 px chunk map below with the spawn chunks coming in;
    • the background is the same panorama, blur and menu background as the world list. The shared test resources ship placeholder panorama faces, so both show flat grey here.
  • Ludovic: please look at it once with real assets (the panorama behind the map).

Self-check (fmt, clippy, client tests, parity) for the whole batch: see the last comment.

🤖 Generated with Claude Code


🔄 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/451 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/level-loading-screen` --- ### 📝 Commits (1) - [`5373998`](https://github.com/horizon-rust/horizon/commit/5373998ee0fb02fbf3ec51fa6f48d69fc2a16729) Level loading screen like vanilla: panorama, chunk map and progress bar ### 📊 Changes **5 files changed** (+245 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+78 -19) 📝 `crates/horizon-client/src/game/initial_spawn.rs` (+0 -1) ➕ `crates/horizon-client/src/level_loading.rs` (+142 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/streaming.rs` (+24 -0) </details> ### 📄 Description Fixes #364 **What vanilla does** (`LevelLoadingScreen`, opened by `Minecraft.doWorldLoad` and by dimension changes) - **Background** (`extractBackground`): - `Reason.OTHER` (opening a world): the panorama, the blur and the menu background; - `NETHER_PORTAL`: the nether portal block sprite over the screen; - `END_PORTAL`: the end portal effect. - **Chunk map** (`extractChunksForRendering`): the `ChunkLoadStatusView` around the player, radius `max(5, 3) + RADIUS_AROUND_FULL_CHUNK + 1` = 8. That is 17×17 cells of 2 px coloured by `COLORS`, black where a chunk hasn't been asked for, centred on the screen. - **Text and bar:** `multiplayer.downloadingTerrain` at `yCenter - radius*2 - 27`. Under it, a 200×2 bar (black, filled green) showing `smoothedProgress`, which eases a fifth of the way each tick towards `LevelLoadProgressTracker.get()`: weight 10 for the prepared server plus the 49 player chunks. Horizon drew "Loading terrain..." (or its own "Finding a place to spawn...") centred on a flat dark fill. **Changes** - New `level_loading.rs`: statuses and colours, the progress weights and easing, and the drawing, with tests. - `Streaming::latest_status` maps Horizon's pipeline onto `ChunkStatus`: - generating → EMPTY; - proto → TERRAIN; - decorated or finishing → FEATURES; - loaded but unlit → INITIALIZE_LIGHT; - lit → FULL. - `game.rs`: - `loading_reason` while the player isn't placed; - the title's panorama, blur and menu background for `OTHER`; - the portal overlay sprite for nether portals; - progress from the lit chunks of the 7×7 around the player. - The non-vanilla "Finding a place to spawn..." text is gone, with `spawn_search`. - Not included: the End portal's animated background. That case keeps the old dark fill. **How it was verified** - Unit tests `progress_weighs_the_prepared_server_and_the_player_chunks` and `colours_are_opaque_rgba`. - In game (Mac mini, offscreen), screenshots while a new world loads: - the text above the bar, the bar filling green, and the 34 px chunk map below with the spawn chunks coming in; - the background is the same panorama, blur and menu background as the world list. The shared test resources ship placeholder panorama faces, so both show flat grey here. - **Ludovic:** please look at it once with real assets (the panorama behind the map). Self-check (fmt, clippy, client tests, parity) for the whole batch: see the last comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:18 +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#2575
No description provided.