[PR #7368] [MERGED] port map: Minecraft.run is the game's loop, run_event_loop #7556

Closed
opened 2026-11-03 07:19:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7368
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/mapgap-rest-003


📝 Commits (2)

  • 1b15477 port map: Minecraft.run is the game's loop, run_event_loop
  • 72336fa Merge main into #7368

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/rest-003.tsv (+1 -1)

📄 Description

tools/port_map/rest-003.tsv row 76 cited crates/horizon-client/src/game.rs::run for Minecraft.run; game.rs has no run — gaps --kind map reports no fn crates/horizon-client/src/game.rs::run. The main loop is run_event_loop.

row was now
76 Minecraft.run port crates/horizon-client/src/game.rs::run (note: "the main loop") port crates/horizon-client/src/game.rs::run_event_loop
  • run_event_loop (game.rs:20250) runs the game until it ends and then shuts it down: with a window it hands to the winit loop (EventLoop::new()?.run_app(&mut split)), headless it calls Game::run_headless, and either way it stops the narrator, leaves fullscreen and writes the crash report (write_report) before returning the game's error. Those are the parts of vanilla's run around runTick: the poll-and-tick loop, emergencySaveAndCrash, and the profiler teardown.
  • run_with (game.rs:20758) is the process entry — options, resources, thread setup — that reaches it; the loading screen's own loop is run_loading (game.rs:20695), taken when resources are missing. The note now names the loop and both paths instead of saying "the main loop".

Map-check:

$ PORT_LEDGER_OUT=/tmp/led-mapgap python3 tools/port_ledger.py map-check tools/port_map/rest-003.tsv
143 rows, no problems.

Proven: run_event_loop exists at game.rs:20250 and is the only fn on the game's main path that runs to exit: run_with calls it after setup (game.rs:20888), its headless arm calls Game::run_headless (headless.rs:51), its window arm runs EventLoop::run_app (game.rs:20260), and it writes the report on both.

Not proven: that the winit redraw cadence reproduces Minecraft.run's while (running) { pollEvents(); runTick(); } step for step — the loop lives in the event loop and the frames it drives, not in this fn, so the citation names the game's loop as a whole. No frame-rate or tick-timing parity is claimed.


🔄 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/7368 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/mapgap-rest-003` --- ### 📝 Commits (2) - [`1b15477`](https://github.com/horizon-rust/horizon/commit/1b15477a1521210e07de5679ac4e1b98decf1f6e) port map: Minecraft.run is the game's loop, run_event_loop - [`72336fa`](https://github.com/horizon-rust/horizon/commit/72336fa383bcc37e5a28d99e8af1a7cb4db6a9f0) Merge main into #7368 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-003.tsv` (+1 -1) </details> ### 📄 Description `tools/port_map/rest-003.tsv` row 76 cited `crates/horizon-client/src/game.rs::run` for `Minecraft.run`; `game.rs` has no `run` — `gaps --kind map` reports `no fn crates/horizon-client/src/game.rs::run`. The main loop is `run_event_loop`. | row | was | now | | --- | --- | --- | | 76 `Minecraft.run` | `port crates/horizon-client/src/game.rs::run` (note: "the main loop") | `port crates/horizon-client/src/game.rs::run_event_loop` | - `run_event_loop` (game.rs:20250) runs the game until it ends and then shuts it down: with a window it hands to the winit loop (`EventLoop::new()?.run_app(&mut split)`), headless it calls `Game::run_headless`, and either way it stops the narrator, leaves fullscreen and writes the crash report (`write_report`) before returning the game's error. Those are the parts of vanilla's `run` around `runTick`: the poll-and-tick loop, `emergencySaveAndCrash`, and the profiler teardown. - `run_with` (game.rs:20758) is the process entry — options, resources, thread setup — that reaches it; the loading screen's own loop is `run_loading` (game.rs:20695), taken when resources are missing. The note now names the loop and both paths instead of saying "the main loop". Map-check: ``` $ PORT_LEDGER_OUT=/tmp/led-mapgap python3 tools/port_ledger.py map-check tools/port_map/rest-003.tsv 143 rows, no problems. ``` **Proven:** `run_event_loop` exists at game.rs:20250 and is the only fn on the game's main path that runs to exit: `run_with` calls it after setup (game.rs:20888), its headless arm calls `Game::run_headless` (headless.rs:51), its window arm runs `EventLoop::run_app` (game.rs:20260), and it writes the report on both. **Not proven:** that the winit redraw cadence reproduces `Minecraft.run`'s `while (running) { pollEvents(); runTick(); }` step for step — the loop lives in the event loop and the frames it drives, not in this fn, so the citation names the game's loop as a whole. No frame-rate or tick-timing parity is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:40 +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#7556
No description provided.