#166-#173: plainer words, a point to shoot at, and a catalog that says when it is broken
Eight tickets. The last one is the interesting one. #166 - PLAINER DIALOG. Every spoken line rewritten: the nine prologue lines and all twenty quest brief/done pairs. Mostly splitting em-dash subclauses into sentences and dropping the literary register ("hulls" -> "ships", "That is our hands back" -> "That frees us for other work"). Same meaning, same voice. #167 - NOTHING ANNOUNCED TWICE. Quests carry an `important` flag; seven of the twenty have it, and they are the search for the World Ship. A quest handed out with its goal ALREADY met is now credited in silence unless it is one of those - no brief, no answer, both signals still fired and the index still moved, so it appears ticked in the objectives panel. The chain used to stop the game to set a task the player had already done, then stop it again to congratulate them on it. #168 - THE KEYBOARD CAN ANSWER A DIALOG. The rule the ticket asks for (still arriving, show it all; already whole, move on) was already the rule for a click since #149, but a key press reached the banner and did nothing - and this game is played with WASD and a mouse. Touch, click and key now go through one door. Modifiers alone and auto-repeat echoes are not presses. #169 - A LOADING SCREEN. A press raises a cover, and the load happens after it has been on screen for a frame, so the wait is something the player is watching. Deliberately still a blocking load: load_threaded_request() comes back FAILED for these scenes, reporting text-parse errors that load() does not produce, because the global class names and preloads they reach each other through are not resolvable off the loading thread. A progress bar is not worth a menu that sometimes refuses to start the game, and the web build ships with thread support off anyway. Further presses while loading are ignored - on the web a button fires on PRESS, so an impatient double tap costs nothing to make and used to build the world twice. #170 - THE PICTURE BEFORE THE CAPTION. The prologue's first line was up before the scene had finished arriving, so the game opened STOPPED (#128) over a convoy nobody had seen yet. It flies for three seconds first. #171 - THE CONTROLS FOLLOW WHAT IS BEING HELD. is_touchscreen_available() asks whether a touch COULD arrive, and in a browser that is yes on any laptop whose panel reports touch support - so the web build put thumb sticks over a screen being played with a mouse, and switched mouse aiming off on the machine it exists for. The reading is now the last input actually used, it lives in GameState so the sticks and the guns cannot disagree, and it is two-way: nothing can strand a tablet, because the gesture that needs the controls is the gesture that brings them back. A touch suppresses mouse evidence for a second, so the click Godot manufactures out of a tap is not mistaken for a mouse. #172 - AIM AT A PLACE. Every gun was handed the same direction, so a fleet firing at something threw a sheet of parallel bolts past either side of it and only the middle hull could hit - worse the wider the formation. Guns now take a POINT and each hull works out its own heading to it, so the fleet's fire converges. The mouse already had a place and was flattening it into a bearing; a pushed stick names the point at the guns' reach along it, so touch loses nothing. The assist (#89) still bends a shot onto an enemy, now per hull and around that hull's own heading. The aim guide stops at the point and marks it. #173 - AND THE ONE THAT EXPLAINS ITSELF. "In the web export version the fleet can not store any resources" is not a web bug. It is the third time the Godot editor's .tres writer has quietly dropped a property it thought was default-valued: InterceptorVesselDefinition losing `capabilities` leaves cargo_capacity at 20 and takes away the "cargo" claim that fleet_cargo_capacity() actually gates on, so the hold is zero and nothing can be mined or carried. That is the symptom, word for word. test_definitions_intact caught it in the suite. What it could not do is catch it in a BUILD - an export is taken from the working tree at whatever moment the editor last touched it, which is exactly when the damage is done and exactly where nobody is running tests. The checks move to core/CatalogCheck.gd and now run at startup in every build as well as in the test, from the same function. On the web push_error lands in the on-page log web_shell.html mirrors, which is the only error a phone can read. The tree is intact today, so a fresh export should restore the hold. The point of the change is that the next time it is not, the build says so. Full suite green at 154/154. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139MmxRAJSUe1j77kftAWv3
This commit is contained in:
parent
3fcc26c8bc
commit
0fad1dd155
24 changed files with 1372 additions and 286 deletions
|
|
@ -172,22 +172,38 @@ func _handle_key(event: InputEventKey) -> void:
|
|||
|
||||
|
||||
# #85: on a computer the on-screen sticks and the pivot pair are dead weight -
|
||||
# WASD steers, the mouse aims, Q/E pivot. They are taken away together, once,
|
||||
# the first time the player uses a keyboard or a mouse.
|
||||
# WASD steers, the mouse aims, Q/E pivot.
|
||||
#
|
||||
# Two guards, both deliberate. A touch device that ALSO has a keyboard keeps
|
||||
# everything, because a finger is still a way to play it. And a device wrongly
|
||||
# reported as non-touch keeps its controls until the player has demonstrably
|
||||
# used something else - so nobody is ever left with no way to steer or shoot.
|
||||
# #171: they now come and GO, rather than being taken away once and for all.
|
||||
#
|
||||
# The old rule asked DisplayServer.is_touchscreen_available() and, if it said
|
||||
# yes, kept everything for ever - because the failure to avoid is a phone left
|
||||
# with no way to steer. In a browser that query says yes on half the laptops
|
||||
# in the world, so the web build showed thumb sticks to people holding a
|
||||
# mouse, which is the ticket. It also could not be undone: a wrong answer the
|
||||
# other way stranded a tablet with no controls until it was restarted.
|
||||
#
|
||||
# Following the LAST INPUT ACTUALLY USED fixes both ends. Touch the screen and
|
||||
# the controls are there; use the mouse or the keyboard and they go. Nobody is
|
||||
# ever stranded, because the gesture that needs them is the same gesture that
|
||||
# brings them back, and it takes one tap. GameState owns the reading (see
|
||||
# note_touch_input) so the mouse-aiming gate cannot disagree with this.
|
||||
func _note_keyboard() -> void:
|
||||
if keyboard_seen:
|
||||
return
|
||||
keyboard_seen = true
|
||||
if DisplayServer.is_touchscreen_available():
|
||||
return
|
||||
GameState.note_pointer_input()
|
||||
_sync_touch_controls()
|
||||
|
||||
|
||||
func _note_touch() -> void:
|
||||
GameState.note_touch_input()
|
||||
_sync_touch_controls()
|
||||
|
||||
|
||||
func _sync_touch_controls() -> void:
|
||||
var offered: bool = GameState.pointer_is_touch
|
||||
for control in [joystick, fire_stick, pivot_cw_button, pivot_ccw_button]:
|
||||
if control != null:
|
||||
control.visible = false
|
||||
if control != null and control.visible != offered:
|
||||
control.visible = offered
|
||||
|
||||
|
||||
func _button_holds(button: IconButton, at_position: Vector2) -> bool:
|
||||
|
|
@ -339,6 +355,11 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
|
||||
|
||||
func _handle_touch(event: InputEventScreenTouch) -> void:
|
||||
# #171: a finger on the glass is the one unambiguous piece of evidence
|
||||
# that this is a touch device being played by touch, and it is recorded
|
||||
# before anything gets a chance to claim the event - a touch swallowed by
|
||||
# the joystick is still a touch.
|
||||
_note_touch()
|
||||
# The joystick gets first refusal on every touch, and only claims ones
|
||||
# that begin inside its own rect - so pinch-to-zoom still works anywhere
|
||||
# else on screen.
|
||||
|
|
@ -372,6 +393,8 @@ func _handle_touch(event: InputEventScreenTouch) -> void:
|
|||
|
||||
|
||||
func _handle_drag(event: InputEventScreenDrag) -> void:
|
||||
# A finger moving on the glass, same as a finger arriving on it (#171).
|
||||
_note_touch()
|
||||
if gas_bomb_controller != null and gas_bomb_controller.handle_drag(event):
|
||||
return
|
||||
if laser_controller != null and laser_controller.handle_drag(event):
|
||||
|
|
|
|||
Loading…
Reference in a new issue