When a dialog appears, no command should work and the game physics should be paused as long as the message is not acknowledged #128

Closed
opened 2026-08-25 12:59:29 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Done in 1e89780.

While a line is on the banner the whole tree is paused - the fleet, the enemies, and GameState's own production and wave clocks all stop, and input stops reaching every node except the banner. So a press while a dialog is up acknowledges it and does nothing else; it cannot also steer the fleet or open a menu on the way through.

The pause is owned by NarrationBanner rather than by its callers. What must not get out of step is "a line is showing" and "the game is stopped", and the banner is the only code that knows the first. It releases on the last line, on clear(), and on leaving the tree - a scene swapped out mid-line must not leave the game stopped with nothing left alive to start it again.

Two knock-on effects worth recording:

  • A prologue beat's deadline is now game time, so it can no longer expire behind an unread line. It is still the way past a beat the player will not finish (#125), just never a way past a line they have not acknowledged.
  • "The prologue leaves you movement and nothing else" (#122) was applied by _process on the first frame - and that frame no longer comes, because the prologue opens ON a dialog. BuildController and WorldMap now apply it at _ready too, where it does not depend on the game running.

Covered by tests/test_dialog_pause.gd, which pushes presses through the viewport rather than calling handlers, so the engine's own routing is what decides whether they arrive. Measured: the fleet holds still for a full second under a standing movement order, the wave clock does not advance, and the build button - which fires on a press with nothing in the way - fires zero times while a line is up.

Done in `1e89780`. While a line is on the banner the whole tree is paused - the fleet, the enemies, and GameState's own production and wave clocks all stop, and input stops reaching every node except the banner. So a press while a dialog is up acknowledges it and does nothing else; it cannot also steer the fleet or open a menu on the way through. The pause is owned by `NarrationBanner` rather than by its callers. What must not get out of step is "a line is showing" and "the game is stopped", and the banner is the only code that knows the first. It releases on the last line, on `clear()`, and on leaving the tree - a scene swapped out mid-line must not leave the game stopped with nothing left alive to start it again. Two knock-on effects worth recording: - A prologue beat's deadline is now game time, so it can no longer expire behind an unread line. It is still the way past a beat the player will not finish (#125), just never a way past a line they have not acknowledged. - "The prologue leaves you movement and nothing else" (#122) was applied by `_process` on the first frame - and that frame no longer comes, because the prologue opens ON a dialog. `BuildController` and `WorldMap` now apply it at `_ready` too, where it does not depend on the game running. Covered by `tests/test_dialog_pause.gd`, which pushes presses through the viewport rather than calling handlers, so the engine's own routing is what decides whether they arrive. Measured: the fleet holds still for a full second under a standing movement order, the wave clock does not advance, and the build button - which fires on a press with nothing in the way - fires zero times while a line is up.
Sign in to join this conversation.
No labels
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
metaheavens/spaceship#128
No description provided.