WIP: feat(menu): a Progress tab, read live from the game #2943

Closed
neotoxic wants to merge 6 commits from neotoxic/Longshot:feat/progress-tab into main
Contributor

Summary

Players asked to follow their progress without leaving the game: what is done, what is left, where, and what it takes. This adds a Progress tab to the Insert menu, read live from the game being played. It lists what the launcher's Progress page (LongshotLauncher#366) lists, the same way: the story's next steps first, then area by area (the area Link is in first, marked here, then the areas with something feasible, then the story's order). Each line has the one thing to know about it in its value cell: what a chest or a minigame gives, what a Piece of Heart or a Gold Skulltula takes (an item, night, a price), what is still missing, or Done. The help box says the line's detail, reward, needs and area. Up and Down choose a line, Left and Right jump to the previous or next area, Enter (A) cycles what is shown: feasible now, what is left so far (up to the current chapter), or all of the game.

Read first:

  • gpu/vk/progress_track.h: the catalogue (assets/progress/catalogue.tsv, the launcher's, same bytes) and what it says of the game's values; plain C++.
  • gpu/vk/progress_tab.h: the list, its order, the selection, each value cell's text; plain C++.
  • game/oot_tracker.c: the live read, through game/flags.h (no call into the game, nothing written), and the area Link is in.
  • gpu/vk/vk_menu.cpp: TAB_PROGRESS and draw_progress, next to the Mods tab's own drawing.

Cost: nothing runs while the menu is closed or on another tab. On the tab, the game is read at most every 250 ms (593 flags), and the list is worked out again only when a value changed.

The catalogue holds hand-written French and English words, the MurmurHash3 of field names and the 64-bit keys of placements: no game file. It is the one the launcher ships; HumanBean said names and IDs are fine for the launcher, and I am asking him for this repository too (see below). The approach to reading flags follows mooki's Progress editor (#1411); the reads themselves are main's game/flags.h. #2421 (Dyst's debug page) is a different tool and touches none of these files.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 5080, driver 617.42. On a save at Lake Hylia (91 of 439 done, 27 feasible), the tab shows the same counts and lines as the launcher's page on the same save; Lake Hylia comes first, marked here; Left, Right and Enter do what Summary says; French and English menus. Screenshots in the first comment. The lines done and feasible match the launcher's on 12 saves, 5268 of 5268 (an off-tree check: the launcher's code and progress_track.h fed the same saves).

Checks added: tests/test_progress_track.py (the catalogue, each kind of test, the real catalogue reads), tests/test_progress_tab.py (the list's order, the three choices, the selection, the value cells), tests/test_oot_tracker.py (the live read on a made-up GameDataMgr: no save, unreadable flags, Bool, Int, Enum, keys moved, the area). test_menu_* and test_game_flags.py pass; test_menu_hooks, test_menu_keys, test_menu_save_atomic, test_oot_menu_mouse and test_game_boundary fail on main too on this PC.

Still to test:

  • Linux (Steam Deck): open the tab in play, expecting the same list (@Beanstalk).
  • The full mise run test on Linux CI.

Measurements

Verdict: no difference with the menu closed (dev.py ab); on the tab, a read of the 593 flags costs about 21 µs every 250 ms and the whole tab about 87 µs a frame to draw.

Setup: Windows 11, NVIDIA GeForce RTX 5080, driver 617.42.

Menu closed, dev.py ab --scene hyrule-field (Hyrule Field, child; 67 % resolution, 2560x1440, frame generation Off, uncapped; 60 s each after warm-up, 3 interleaved pairs, the median):

Before: main @ 4908cc6d After: this PR @ eda219e8
fps (each run) 120.0 / 120.0 / 120.0 120.0 / 120.0 / 120.0
1% low fps 76.6 76.7
median frame time 6.44 ms 6.43 ms
p99 frame time 13.05 ms 13.03 ms

On the tab (a timing job; the menu opened on the tab for 67 s on a save at Lake Hylia, the game in a window; a build timed with steady_clock around the calls, not part of this PR):

average first
track_read, 593 flags (every 250 ms) 21.3 µs 319.6 µs (each key searched once, then kept)
the list worked out again (values unchanged / first) 0.6 µs 30.2 µs
track_area 1.7 µs 4.2 µs
draw_progress, the read included (a frame) 87.3 µs (max 468.4)

Risks

A game version whose flag layout differs reads as no save or unreadable: the tab says so and keeps the last list, it never writes. Hyrule Field's map holds Lake Hylia and Lon Lon Ranch: there, the area comes from the location the last save named, so walking from the lake into the field shows the lake as here until the next save. Nothing changes after updating: no setting, no save, no cache.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (the menu, flags and new tests run here; the full suite on Linux CI)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible. (the catalogue: names and IDs, waiting for the maintainers' word for this repository)

When it applies

  • A check under tests/ that reads changed source is updated, not weakened. (tests/menu_model_fixture.py: the new tab)
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows built and run; Linux on CI)
  • Screenshots of the same spot on main and here, for a change that shows on screen. (the tab is new: here only)
  • Docs updated. (the player's guide, Progress tab; docs/dev/reference/progress-tab.md)
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

🤖 Generated with Claude Code

## Summary Players asked to follow their progress without leaving the game: what is done, what is left, where, and what it takes. This adds a **Progress** tab to the Insert menu, read live from the game being played. It lists what the launcher's Progress page (LongshotLauncher#366) lists, the same way: the story's next steps first, then area by area (the area Link is in first, marked *here*, then the areas with something feasible, then the story's order). Each line has the one thing to know about it in its value cell: what a chest or a minigame gives, what a Piece of Heart or a Gold Skulltula takes (an item, night, a price), what is still missing, or Done. The help box says the line's detail, reward, needs and area. Up and Down choose a line, Left and Right jump to the previous or next area, Enter (A) cycles what is shown: feasible now, what is left so far (up to the current chapter), or all of the game. Read first: - `gpu/vk/progress_track.h`: the catalogue (`assets/progress/catalogue.tsv`, the launcher's, same bytes) and what it says of the game's values; plain C++. - `gpu/vk/progress_tab.h`: the list, its order, the selection, each value cell's text; plain C++. - `game/oot_tracker.c`: the live read, through `game/flags.h` (no call into the game, nothing written), and the area Link is in. - `gpu/vk/vk_menu.cpp`: `TAB_PROGRESS` and `draw_progress`, next to the Mods tab's own drawing. Cost: nothing runs while the menu is closed or on another tab. On the tab, the game is read at most every 250 ms (593 flags), and the list is worked out again only when a value changed. The catalogue holds hand-written French and English words, the MurmurHash3 of field names and the 64-bit keys of placements: no game file. It is the one the launcher ships; HumanBean said names and IDs are fine for the launcher, and I am asking him for this repository too (see below). The approach to reading flags follows mooki's Progress editor (#1411); the reads themselves are main's `game/flags.h`. #2421 (Dyst's debug page) is a different tool and touches none of these files. ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 5080, driver 617.42. On a save at Lake Hylia (91 of 439 done, 27 feasible), the tab shows the same counts and lines as the launcher's page on the same save; Lake Hylia comes first, marked here; Left, Right and Enter do what Summary says; French and English menus. Screenshots in the first comment. The lines done and feasible match the launcher's on 12 saves, 5268 of 5268 (an off-tree check: the launcher's code and `progress_track.h` fed the same saves). Checks added: `tests/test_progress_track.py` (the catalogue, each kind of test, the real catalogue reads), `tests/test_progress_tab.py` (the list's order, the three choices, the selection, the value cells), `tests/test_oot_tracker.py` (the live read on a made-up GameDataMgr: no save, unreadable flags, Bool, Int, Enum, keys moved, the area). `test_menu_*` and `test_game_flags.py` pass; `test_menu_hooks`, `test_menu_keys`, `test_menu_save_atomic`, `test_oot_menu_mouse` and `test_game_boundary` fail on main too on this PC. **Still to test:** - Linux (Steam Deck): open the tab in play, expecting the same list (@Beanstalk). - The full `mise run test` on Linux CI. ## Measurements **Verdict:** no difference with the menu closed (`dev.py ab`); on the tab, a read of the 593 flags costs about 21 µs every 250 ms and the whole tab about 87 µs a frame to draw. Setup: Windows 11, NVIDIA GeForce RTX 5080, driver 617.42. Menu closed, `dev.py ab --scene hyrule-field` (Hyrule Field, child; 67 % resolution, 2560x1440, frame generation Off, uncapped; 60 s each after warm-up, 3 interleaved pairs, the median): | | Before: main @ 4908cc6d | After: this PR @ eda219e8 | |---|---|---| | fps (each run) | 120.0 / 120.0 / 120.0 | 120.0 / 120.0 / 120.0 | | 1% low fps | 76.6 | 76.7 | | median frame time | 6.44 ms | 6.43 ms | | p99 frame time | 13.05 ms | 13.03 ms | On the tab (a timing job; the menu opened on the tab for 67 s on a save at Lake Hylia, the game in a window; a build timed with `steady_clock` around the calls, not part of this PR): | | average | first | |---|---|---| | `track_read`, 593 flags (every 250 ms) | 21.3 µs | 319.6 µs (each key searched once, then kept) | | the list worked out again (values unchanged / first) | 0.6 µs | 30.2 µs | | `track_area` | 1.7 µs | 4.2 µs | | `draw_progress`, the read included (a frame) | 87.3 µs (max 468.4) | | ## Risks A game version whose flag layout differs reads as no save or unreadable: the tab says so and keeps the last list, it never writes. Hyrule Field's map holds Lake Hylia and Lon Lon Ranch: there, the area comes from the location the last save named, so walking from the lake into the field shows the lake as *here* until the next save. Nothing changes after updating: no setting, no save, no cache. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (the menu, flags and new tests run here; the full suite on Linux CI) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [ ] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. (the catalogue: names and IDs, waiting for the maintainers' word for this repository) ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. (`tests/menu_model_fixture.py`: the new tab) - [x] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows built and run; Linux on CI) - [x] Screenshots of the same spot on `main` and here, for a change that shows on screen. (the tab is new: here only) - [x] Docs updated. (the player's guide, Progress tab; `docs/dev/reference/progress-tab.md`) - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The in-game Progress tab (read-only first) needs to know what there is to
do, where, what it gives and takes, and whether it is done or doable now,
from the game being played. This adds the catalogue the launcher ships
(assets/progress/catalogue.tsv, the same bytes: hand-written words and the
hashes of field names and placement keys, no game file), puts it in the
build as progress_catalogue.h like the logo, ships it with the sources a
player's build reads, and reads it in gpu/vk/progress_track.h: each
distinct flag listed once for one batch read, the tests compiled to a
flat table, and nothing worked out again while the values stay the same.

On 12 saves the lines done and doable are the launcher's, 5268 of 5268.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Progress tab needs the game being played, not the last save: whether
each catalogue line is done or doable changes as the player goes. This adds
game_track_read (game/oot_tracker.c), given to the renderer as MkwVkHost's
track_read (version 57): the live values of the catalogue's flags, read
through game/flags.h on the menu's thread with no call into the game and
nothing written; -1 while no save is loaded (no pouch manager, as at the
title), -2 when the flags do not read as a container. A 64-bit key's place
is kept by the caller, so a read after the first is one record, not a
search. The approach follows mooki's Progress editor (#1411); the reads
are main's flags service.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Players asked to follow their progress without leaving the game. The new
Progress tab lists the catalogue read live from the game, the way the
launcher's Progress page and Lenses of Truth now show it: the story's next
steps first, then area by area (the area Link is in first, then those with
something feasible, then the story's order), each line with the one thing
to know about it in its value cell (what a chest gives, what a Piece of
Heart or a Gold Skulltula takes, what is still missing). Up and Down choose
a line, Left and Right jump to the previous or next area, Enter (A) cycles
what is shown: what is feasible now, what is left so far, or all of the
game. The game is read only while the tab is drawn, at most every 250 ms,
with no call into the game; nothing runs while the menu is closed.

The area comes from the map; on Hyrule Field's map, which holds Lake Hylia
and Lon Lon Ranch, from the location the last save named.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): by day is no condition in a line's value cell
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
eda219e851
A Gold Skulltula there by day is there at night too: a detail's "by day"
only says when it is easier to see, and the value cell showed it as what
the line takes. Only night, which is a condition, is said now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: Windows 11, RTX 5080, driver 617.42: the tab on a save at Lake Hylia, French and English menus, Left/Right/Enter; same counts as the launcher's page

Tested in game: Windows 11, RTX 5080, driver 617.42: the tab on a save at Lake Hylia, French and English menus, Left/Right/Enter; same counts as the launcher's page
Author
Contributor

The tab in the game (Windows 11, RTX 5080, French menu), on a save at Lake Hylia, Show set to what is left so far: the story's next step, then Lake Hylia first (here), each line's value cell saying what it gives, takes or still misses.

vk_009225

The tab in the game (Windows 11, RTX 5080, French menu), on a save at Lake Hylia, Show set to what is left so far: the story's next step, then Lake Hylia first (here), each line's value cell saying what it gives, takes or still misses. ![vk_009225](https://git.magicbean.dev/attachments/7d90e463-aa9f-4636-aba0-b01efedbc22f)
docs(progress): the Progress tab for players and its reference page
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f408d1957e
Players read what the tab shows and its keys in the guide's Progress tab
section; the reference page says where the catalogue comes from, its
format, the live read and its limits (Hyrule Field's map holds the lake
and the ranch), how the list is ordered and what a value cell says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

@HumanBean a question for you before this leaves WIP: the tab needs the same catalogue as the launcher's Progress page (LongshotLauncher#366), at assets/progress/catalogue.tsv. It holds hand-written French and English words, the hashes of field names and the 64-bit IDs of placements, and no game file. You said names and IDs are fine for the launcher; is that OK for the Longshot repository too? If not, the tab could read the catalogue the launcher already installs instead of shipping its own.

@HumanBean a question for you before this leaves WIP: the tab needs the same catalogue as the launcher's Progress page (LongshotLauncher#366), at `assets/progress/catalogue.tsv`. It holds hand-written French and English words, the hashes of field names and the 64-bit IDs of placements, and no game file. You said names and IDs are fine for the launcher; is that OK for the Longshot repository too? If not, the tab could read the catalogue the launcher already installs instead of shipping its own.
chore(progress): the catalogue with each line's reward type
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
da2bee4973
A 12th column says what a line gives (heart, skulltula, fairy, rupees,
dungeon, upgrade, item, other), for Lenses of Truth's reward filter; the
launcher and the game ship the same catalogue, the same bytes, and read
only the columns they use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Replaced by #2957, as HumanBean asked: the same Progress list as a window of its own (F2, or Plus and B) in mod-api, a system mod; the catalogue shipped there with the game's flag names; flags.getMany, flags.placements and game.state().savedPlace in the mod API; and two modtool ops so the launcher's Progress page asks Longshot instead of keeping its own copy. Closing this one.

Replaced by #2957, as HumanBean asked: the same Progress list as a window of its own (F2, or Plus and B) in mod-api, a system mod; the catalogue shipped there with the game's flag names; `flags.getMany`, `flags.placements` and `game.state().savedPlace` in the mod API; and two modtool ops so the launcher's Progress page asks Longshot instead of keeping its own copy. Closing this one.
neotoxic closed this pull request 2026-12-01 16:36:25 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
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
MagicBeanDev/Longshot!2943
No description provided.