#33: opening intro cutscene
OpeningIntro (game/scripts/opening_intro.gd) plays on every New vacation (not Continue, not when hosting co-op): the farmers leave in their loaded station wagon, "Later that night....", a bickering UFO crew drops a part whose blue flash brings the scarecrow (hung on a post in its T-pose) to life, the UFO zooms off, then the loading screen and the first morning's sign. Hold Space / Enter / A (or E, or the mouse button) 1 s to skip from any stage; Escape pauses it; Restart the night skips it; Save & quit clears it. It ends with the farm exactly as new_campaign() leaves it. Hooks: ReviewPanel keeps the sign down while the intro has the farm (and only focuses Start when the sign is up); DialogueDirector holds its conversations and the sign, then intro_over() plays night 1's morning conversations before the sign; Tutorial hides; FarmAudio gets set_scene / end_scene (ambience and music held by a cutscene) and stop_cue (the morning stinger plays with the sign instead); Main wires new_vacation(intro), blocked, resume's freeze, restart and to_menu. Tests: test_intro (45 checks); test_flow skips the new intro. Tool: game/tools/capture_intro.gd saves a frame per stage for the timing review. Docs: README, RULES, LAYOUT (staging points), PLAYTEST. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d96ef8b5be
commit
c6daf3d217
19 changed files with 2112 additions and 21 deletions
|
|
@ -1,6 +1,7 @@
|
|||
extends RefCounted
|
||||
## The whole game through its entry scene (main.tscn, with test save and settings paths): the
|
||||
## main menu over the paused farm; New vacation, Continue, and their questions; pausing freezes
|
||||
## main menu over the paused farm; New vacation (its opening intro, skipped here: test_intro
|
||||
## covers it), Continue, and their questions; pausing freezes
|
||||
## the simulation tick; settings apply and persist from the pause menu; Restart the night and
|
||||
## Save & quit to menu put the farm back at the saved morning without touching the save; a
|
||||
## damaged save can't be continued; quitting a hosted co-op game from the pause menu leaves the
|
||||
|
|
@ -62,6 +63,15 @@ func _press(action: String) -> void:
|
|||
await r.process_frame
|
||||
|
||||
|
||||
## New vacation's opening intro, skipped to its end (the first morning's sign).
|
||||
func _skip_intro() -> void:
|
||||
sim.intro.skip()
|
||||
var t := 0.0
|
||||
while sim.intro.busy() and t < 10.0:
|
||||
sim.intro.step(DT)
|
||||
t += DT
|
||||
|
||||
|
||||
func _hud_visible() -> bool:
|
||||
return (main.farm.get_node("Hud") as CanvasLayer).visible
|
||||
|
||||
|
|
@ -85,9 +95,12 @@ func _title_screen() -> void:
|
|||
"the UI theme is the project's default")
|
||||
main.main_menu.new_button.pressed.emit()
|
||||
var saved := SaveGame.read(SAVE)
|
||||
r.check(main.screen == Main.Screen.PLAYING and not r.paused and sim.intro.running and c.state.phase == P.MORNING,
|
||||
"New vacation (no save to replace) starts at once, with the opening intro")
|
||||
_skip_intro()
|
||||
r.check(main.screen == Main.Screen.PLAYING and not r.paused and _hud_visible() and c.state.phase == P.MORNING
|
||||
and sim.review_panel.visible and main.get_viewport().get_camera_3d() == sim.camera,
|
||||
"New vacation (no save to replace) starts at once: the morning screen, the HUD, the follow camera")
|
||||
"after it, the morning screen, the HUD, the follow camera")
|
||||
r.check(saved.status == SaveGame.Status.OK and saved.state.night == 1, "and saves the new vacation's first morning")
|
||||
|
||||
|
||||
|
|
@ -197,6 +210,7 @@ func _continue_and_new() -> void:
|
|||
main.main_menu.new_button.pressed.emit()
|
||||
r.check(main.screen == Main.Screen.PLAYING and SaveGame.read(SAVE).status == SaveGame.Status.OK,
|
||||
"New vacation doesn't ask about a damaged save and replaces it")
|
||||
_skip_intro()
|
||||
|
||||
|
||||
## Hosting co-op, the pause menu freezes only this scarecrow; quitting to the menu from it must
|
||||
|
|
@ -414,6 +428,7 @@ func _audio() -> void:
|
|||
r.check(audio._day.playing and audio._night.playing and (audio._day.stream as AudioStreamWAV).loop_mode == AudioStreamWAV.LOOP_FORWARD
|
||||
and audio._day.bus == &"Ambience", "the day and night ambience loop on the Ambience bus")
|
||||
main.new_vacation()
|
||||
_skip_intro()
|
||||
var before := audio.played.duplicate()
|
||||
var count := func(cue: String) -> int: return int(audio.played.get(cue, 0)) - int(before.get(cue, 0))
|
||||
sim.combat.fired.emit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue