Skip to content

Create a Journey Facade Singleton #6

@willnationsdev

Description

@willnationsdev

Make a Journey singleton class. This means that you'll really create a _Journey C++ singleton and then you'll make an exposed Journey class with static functions that interface with the non-exposed _Journey singleton.

Journey will...

  1. Provide a getter for its internal StoryGraph.
  2. Provide a means of registering global properties.
    1. It will cache subsets of properties that use slash delimeters. That is, it will need a HashMap<StringName, Variant> that stores properties like "chapter1/found_doctor" => true, using a 1-to-1 mapping. And then, it will also store another HashMap<StringName, Set<StringName> so that it can report on which properties exist within the "chapter1" namespace, etc. If multiple slashes are present, then everything leading up to the final slash is considered a single key.
    2. It should be able to bind property names to any arbitrary StoryItem in the graph.
  3. It will provide a wrapper around all Dialogue, Content, and Task APIs.

Overall, Journey acts as a Facade for all of the internal operations related to the Journey API. We may also want to consider having it mimic the StoryGraph's API since it only has 1 graph and we may wish to hide the underlying implementation of Journey from the end user. Something to discuss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions