#127: dialogs wait for the reader, and say who is talking
A line now stays until it is DISMISSED - there is no timer under it at all. A prologue whose lines expire on their own reads at the game's pace rather than at the reader's, and that was most of what made the opening feel rushed even after #125 slowed the beats down. The beats that are about the guide talking already hold while the banner is speaking, so dismissing a line is what advances the prologue. A player who never clicks is still never stuck: each beat's own deadline is the way out, and the test pins that the deadline sits past the floor. A dismissed line eats the press, so clicking to continue does not also steer the fleet on the way through. The speaker's name sits in a notch cut out of the top border at the left, the way a label is riveted to a panel - the frame is one polygon, so the fill and the stroke cannot disagree about where that notch is. Everything up to the breach is the convoy's controller; after it there is nobody left to talk to, so the closing lines are the ship's own log, which is the point being made. The tick strip along the bottom is gone. It read as an underline attached to the last line rather than as part of the frame. What replaces it is a blinking caret at the bottom right - the one thing that says a click is what moves this on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
ddc3de595e
commit
902d6922e7
3 changed files with 170 additions and 58 deletions
|
|
@ -26,6 +26,9 @@ extends SceneTree
|
|||
# L. #125 - the convoy is spread out, with its holds surrounded by escorts
|
||||
# M. #125 - the breach is a growing black hole with a lens over it, not a
|
||||
# few lines turning around a point
|
||||
# N. #127 - a dialog stays up until it is dismissed: no timer closes it,
|
||||
# a click does, and the click is eaten rather than also steering
|
||||
# O. #127 - every dialog names its speaker
|
||||
|
||||
var game_state: Node
|
||||
var scene: Node
|
||||
|
|
@ -90,6 +93,39 @@ func _process(delta: float) -> bool:
|
|||
if not director.running:
|
||||
return _fail("the director did not start on a new game")
|
||||
|
||||
# --- N. a dialog waits for the reader --------------------
|
||||
var first_line: String = narration.label.text
|
||||
if first_line.strip_edges() == "":
|
||||
return _fail("the prologue opened with an empty banner")
|
||||
# Ten seconds of clock, with nothing pressed. A timer-driven
|
||||
# banner would have moved on several times over.
|
||||
for i in range(600):
|
||||
narration._process(1.0 / 60.0)
|
||||
if narration.label.text != first_line:
|
||||
return _fail("the line changed on its own after 10s - #127 asks for a click")
|
||||
if not narration.visible:
|
||||
return _fail("the banner closed itself")
|
||||
var click: InputEventMouseButton = InputEventMouseButton.new()
|
||||
click.button_index = MOUSE_BUTTON_LEFT
|
||||
click.pressed = true
|
||||
narration._unhandled_input(click)
|
||||
if narration.label.text == first_line and narration.is_speaking():
|
||||
return _fail("a click did not move the dialog on")
|
||||
print("line held for 10s untouched, then a click moved it on")
|
||||
|
||||
# --- O. and it says who is talking -----------------------
|
||||
if narration.speaker.strip_edges() == "":
|
||||
return _fail("the dialog names no speaker")
|
||||
if narration.speaker_label.text != narration.speaker:
|
||||
return _fail("the speaker label does not show the speaker")
|
||||
# It sits on the top border, at the left - above the text, and
|
||||
# left of centre.
|
||||
if narration.speaker_label.position.y >= narration.label.position.y:
|
||||
return _fail("the speaker sits below the text, not on the top border")
|
||||
if narration.speaker_label.position.x > narration.size.x * 0.5:
|
||||
return _fail("the speaker is not at the left of the border")
|
||||
print("speaker \"%s\" on the top-left border" % narration.speaker)
|
||||
|
||||
# --- K. nothing ends before its floor --------------------
|
||||
# The floors are what #125 bought: every beat had a condition
|
||||
# that could be satisfied while the guide was still talking.
|
||||
|
|
@ -100,6 +136,10 @@ func _process(delta: float) -> bool:
|
|||
return _fail("the opening beat was over before the first line finished")
|
||||
if not narration.is_speaking():
|
||||
return _fail("the opening beat is silent, so waiting for it proves nothing")
|
||||
# A player who never clicks must not be stuck: the beat's own
|
||||
# deadline is the way out.
|
||||
if director._deadline() <= director._floor_time():
|
||||
return _fail("the opening beat has no deadline past its floor - a silent player would stall")
|
||||
print("opening beat still running at %.1fs, guide still talking" % director.beat_time)
|
||||
|
||||
# --- C. the convoy --------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue