Skip to content

Generalise Cinematic as DialoguePlayer #1346

@wjt

Description

@wjt

cinematic.gd was designed to be used in non-interactive cutscenes, like the main game intro (with concept art) and the outro cutscene of the Musican LoreQuest.

It is now being used in some interactive StoryQuest scenes to show narration or dialogue at the start of the screen, plus the first of each set of Sokoban puzzles. But several other game elements can also play dialogue in this way:

  • fill_game_logic.gd has optional intro dialogue
  • eternal_loom.gd plays dialogue at the start of the scene in the case where you have just completed the sokoban puzzles

And there are other elements that unexpectedly have dialogue attached, e.g. collectible_item.gd can optionally play dialogue and then switch to a new scene. (Actually so can the loom.)

Also its name has been found to be confusing!

I wonder if we can generalise cinematic.gd a little:

  1. Rename it to DialoguePlayer
  2. Add @export var autoplay: bool = true
  3. Add func play() -> void
  4. Add signal finished

Then:

  • Remove the dialogue from fill_game_logic. Instead add a DialoguePlayer node to those scenes, with autoplay enabled, and connect its finished signal to start on the FillGameLogic
  • Remove the dialogue and next scene properties from collectible. Instead add a collected signal to it, and collect it to play() on a DialoguePlayer node in the same scene.

The DialoguePlayer node would continue to handle switching scene.

XP Summary (total 375)

Subdomain Skill XP
Engineering: Gameplay & Systems Programming Problem Solving 150
Engineering: Gameplay & Systems Programming Creativity & Design Thinking 75
Engineering: Gameplay & Systems Programming Technical Literacy 150

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions