fix(game): fast text no longer cuts off the sages' voice on the white screen #3177

Merged
HumanBean merged 2 commits from HumanBean/Longshot:fix/fast-text-sage-voice into main 2026-12-04 16:12:28 +00:00
Owner

Summary

After a temple, the sage's last words are shown alone on a white screen with a voice. With Text speed above Normal,
that screen closed early and cut the voice off: it closes by itself a while after the last letter appears, and a faster
text brought that forward (at Instant, after about 3 s instead of about 9.5 s).

Those screens now keep the game's own pace whatever Text speed says. They are the five sages' messages
(EventFlowMsg/Dm_Awake_<sage>_Get). Other dialogue, including the medallion boxes just before, stays as fast as chosen.

To see it on main: set Text speed to Instant and finish a temple.

Read first: game/crates/game-core/src/narration.rs. It wraps the text system mod's letter step and puts the step's
time back while one of those messages is the last one opened.

Testing

Tested: CachyOS (Linux 7.3.3), RTX 3090, NVIDIA 620.70, headless, the Forest sage's event started from a test-only
hook (not in this PR), no button pressed once the white screen opened. On main at Instant the words appeared at once
and the screen closed after about 3 s; with the fix, Instant typed and closed as Normal did (about 9.5 s). The medallion
box before it still appeared at once at Instant. Screenshots were compared; the voice itself was not listened to.

The test game-core/tests/narration.rs fails on main and passes here, with all of game-core's tests, clippy and fmt.
mise run test: 885 passed, 13 skipped, 1 failed (test_lifter):
the_repository_s_lock_and_the_table_agree fails the same way on main; two build-driver dev_runtime tests hit a
held lock and passed when run again (11 of 11). This change touches nothing in the builder.

Still to test:

  • By ear, at 2x or Instant: finish a temple (or load a save before a boss), expecting the whole voice on the white
    screen (by hand).
  • The other four sages' screens (Fire, Water, Shadow, Spirit; Spirit has two messages): the same (by hand).
  • A language other than English: the same (by hand).

Measurements

Nothing to measure: a letter's time is changed on five messages; one flag is read at each letter step.

Risks

Only these five messages are covered. Other voiced cutscene text still follows Text speed; if one of those is cut off
too, its message file can be added. If a build ever shows another animated text while one of these is still the last
message opened, it would type at the game's pace until the next message. A revert is enough. Nothing changes in saves or
settings.

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).
  • 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.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm

## Summary After a temple, the sage's last words are shown alone on a white screen with a voice. With Text speed above Normal, that screen closed early and cut the voice off: it closes by itself a while after the last letter appears, and a faster text brought that forward (at Instant, after about 3 s instead of about 9.5 s). Those screens now keep the game's own pace whatever Text speed says. They are the five sages' messages (`EventFlowMsg/Dm_Awake_<sage>_Get`). Other dialogue, including the medallion boxes just before, stays as fast as chosen. To see it on `main`: set Text speed to Instant and finish a temple. Read first: `game/crates/game-core/src/narration.rs`. It wraps the text system mod's letter step and puts the step's time back while one of those messages is the last one opened. ## Testing **Tested:** CachyOS (Linux 7.3.3), RTX 3090, NVIDIA 620.70, headless, the Forest sage's event started from a test-only hook (not in this PR), no button pressed once the white screen opened. On `main` at Instant the words appeared at once and the screen closed after about 3 s; with the fix, Instant typed and closed as Normal did (about 9.5 s). The medallion box before it still appeared at once at Instant. Screenshots were compared; the voice itself was not listened to. The test `game-core/tests/narration.rs` fails on `main` and passes here, with all of `game-core`'s tests, clippy and fmt. `mise run test`: 885 passed, 13 skipped, 1 failed (`test_lifter`): `the_repository_s_lock_and_the_table_agree` fails the same way on `main`; two `build-driver` `dev_runtime` tests hit a held lock and passed when run again (11 of 11). This change touches nothing in the builder. **Still to test:** - By ear, at 2x or Instant: finish a temple (or load a save before a boss), expecting the whole voice on the white screen (by hand). - The other four sages' screens (Fire, Water, Shadow, Spirit; Spirit has two messages): the same (by hand). - A language other than English: the same (by hand). ## Measurements Nothing to measure: a letter's time is changed on five messages; one flag is read at each letter step. ## Risks Only these five messages are covered. Other voiced cutscene text still follows Text speed; if one of those is cut off too, its message file can be added. If a build ever shows another animated text while one of these is still the last message opened, it would type at the game's pace until the next message. A revert is enough. Nothing changes in saves or settings. ## 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. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm
Fails here: a Text speed rule's scaled time reaches the letters.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm
fix(game): fast text leaves the sages' full-screen words at the game's pace, so their voice is not cut off
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m19s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m13s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 13m37s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 16m11s
CI / Website build and checks (pull_request) Failing after 37s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 50m21s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m6s
ef19bf8d3d
The white screen closes a while after its last letter: at 2x, 4x or Instant it closed with the voice still speaking.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm
Author
Owner

Tested in game: RTX 3090, NVIDIA 620.70, CachyOS, headless: the Forest sage's white screen at Instant closed after about 3 s on main and about 9.5 s with the fix, as at Normal; the medallion box before it still appeared at once. Voice not listened to.

Tested in game: RTX 3090, NVIDIA 620.70, CachyOS, headless: the Forest sage's white screen at Instant closed after about 3 s on main and about 9.5 s with the fix, as at Normal; the medallion box before it still appeared at once. Voice not listened to.
HumanBean changed title from WIP: fix(game): fast text no longer cuts off the sages' voice on the white screen to fix(game): fast text no longer cuts off the sages' voice on the white screen 2026-12-04 11:35:25 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open as long as it does at Normal speed, but the reported run did not check whether the voice finishes. The other affected messages and a non-English language also remain untested. Recommend approval; not approved on the forge.

The change keeps the sages’ white-screen text at the game’s pace while leaving the preceding medallion text fast. It adds a small hook and shared state to the text path; its use of the last opened message can also affect another animated pane until a new message opens.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L1 game/crates/game-core/src/narration.rs:28: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. (more on the line) Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • Can another animated text pane step after a sage’s message closes but before another message lookup, or can another message open while the sage’s pane is active? The global flag would apply the wrong pace in either case.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven for the reported voice cutoff. On the author’s Linux RTX 3090 run, the Forest screen at Instant closed after about 3 seconds on main and 9.5 seconds with the change, matching Normal; the voice was not listened to. The game-free test checks the letter-step behavior.

Other systems: The hook applies to text panes on game worker threads on Windows and Linux, independently of GPU. Text size rules still run inside the wrapper. The state is global rather than associated with a pane, so overlapping or subsequent animated panes need particular attention; the available run does not establish whether those occur while the flag is set.

Switches: None added, changed or removed.

Reviewed: ef19bf8d3d against d6e819e084: Read the diff, commit messages, repository rules, PR template, narration implementation and test, text-system rules and hook definitions, and the relevant text and chain code. Skimmed the remaining portions of engine.rs, lib.rs and the user guide; no generated files or recorded runs were changed. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The game-free test exercises the handler chain and would fail without the time restoration.
  • The change contains no game-derived output, generated files, API version changes or third-party edits.
  • The Forest run reports that the preceding medallion box remains instant.

Testing: Read-only review; no code or tests were run. The supplied CI checks were still running.

Overlaps and merge order: Not checked; network unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open as long as it does at Normal speed, but the reported run did not check whether the voice finishes. The other affected messages and a non-English language also remain untested. Recommend approval; not approved on the forge. The change keeps the sages’ white-screen text at the game’s pace while leaving the preceding medallion text fast. It adds a small hook and shared state to the text path; its use of the last opened message can also affect another animated pane until a new message opens. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L1** `game/crates/game-core/src/narration.rs:28`: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. (more on the line) **Do:** Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - Can another animated text pane step after a sage’s message closes but before another message lookup, or can another message open while the sage’s pane is active? The global flag would apply the wrong pace in either case. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the reported voice cutoff. On the author’s Linux RTX 3090 run, the Forest screen at Instant closed after about 3 seconds on main and 9.5 seconds with the change, matching Normal; the voice was not listened to. The game-free test checks the letter-step behavior. **Other systems:** The hook applies to text panes on game worker threads on Windows and Linux, independently of GPU. Text size rules still run inside the wrapper. The state is global rather than associated with a pane, so overlapping or subsequent animated panes need particular attention; the available run does not establish whether those occur while the flag is set. **Switches:** None added, changed or removed. **Reviewed:** ef19bf8d3d9a against d6e819e08433: Read the diff, commit messages, repository rules, PR template, narration implementation and test, text-system rules and hook definitions, and the relevant text and chain code. Skimmed the remaining portions of engine.rs, lib.rs and the user guide; no generated files or recorded runs were changed. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The game-free test exercises the handler chain and would fail without the time restoration. - The change contains no game-derived output, generated files, API version changes or third-party edits. - The Forest run reports that the preceding medallion box remains instant. **Testing:** Read-only review; no code or tests were run. The supplied CI checks were still running. **Overlaps and merge order:** Not checked; network unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -0,0 +25,4 @@
static READ_ALOUD: AtomicBool = AtomicBool::new(false);
/// Whether the message file `file` holds a full-screen text read aloud: the sages' last words.
fn read_aloud(file: &str) -> bool {
Member

L1 (should fix): The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked.

When: At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice.

Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.

**L1** (should fix): The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. *When:* At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice. **Do:** Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.
Author
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open at the Normal text pace, but the reported run did not check whether the voice finishes. The other affected sage messages and another language also still need an in-game check. Recommend approval; not approved on the forge.

The change keeps the sages’ white-screen messages at the game’s normal text pace while leaving other dialogue at the selected speed. It adds a small pair of hook handlers and a game-free test.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L1 game/crates/game-core/src/narration.rs:28: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. When: At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice. Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.

Since the last review (on ef19bf8d3d)
Still open: L1 (The reported run confirms the Forest screen’s timing but does not confirm that the voice f…)

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven for the voice cutoff: the reported Forest run closed after about 9.5 seconds with the fix versus about 3 seconds on main at Instant, but the voice was not listened to.

Other systems: The handlers apply to text steps across platforms and text speeds; the reported in-game run covers Forest on Linux with NVIDIA. The test covers the five message names and restoring fast text after another message opens.

Switches: None.

Reviewed: ef19bf8d3d against d6e819e084: Read the diff, narration implementation and its test, repository instructions and pull request template. The combined read of the other changed files was truncated; their changes and relevant surrounding code were skimmed. No review checklist file was present.; nothing run (a code review).

Checked and fine:

  • The game-free test checks the five sage message names, a failed lookup, and the return to the selected text speed for other messages.
  • The reported Forest run shows the preceding medallion box remains instant.

Testing: The author reports a game-free test passing on the PR and failing on main, plus a headless Forest timing comparison. CI is still running; no commands that execute project code were run during this review.

Overlaps and merge order: Not checked; network access was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open at the Normal text pace, but the reported run did not check whether the voice finishes. The other affected sage messages and another language also still need an in-game check. Recommend approval; not approved on the forge. The change keeps the sages’ white-screen messages at the game’s normal text pace while leaving other dialogue at the selected speed. It adds a small pair of hook handlers and a game-free test. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L1** `game/crates/game-core/src/narration.rs:28`: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. *When:* At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice. **Do:** Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes. **Since the last review** (on ef19bf8d3d9a) Still open: L1 (The reported run confirms the Forest screen’s timing but does not confirm that the voice f…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the voice cutoff: the reported Forest run closed after about 9.5 seconds with the fix versus about 3 seconds on main at Instant, but the voice was not listened to. **Other systems:** The handlers apply to text steps across platforms and text speeds; the reported in-game run covers Forest on Linux with NVIDIA. The test covers the five message names and restoring fast text after another message opens. **Switches:** None. **Reviewed:** ef19bf8d3d9a against d6e819e08433: Read the diff, narration implementation and its test, repository instructions and pull request template. The combined read of the other changed files was truncated; their changes and relevant surrounding code were skimmed. No review checklist file was present.; nothing run (a code review). **Checked and fine:** - The game-free test checks the five sage message names, a failed lookup, and the return to the selected text speed for other messages. - The reported Forest run shows the preceding medallion box remains instant. **Testing:** The author reports a game-free test passing on the PR and failing on main, plus a headless Forest timing comparison. CI is still running; no commands that execute project code were run during this review. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/fast-text-sage-voice 2026-12-04 16:12:28 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!3177
No description provided.