Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Journey Facade Singleton #6

Open
willnationsdev opened this issue Mar 23, 2019 · 0 comments
Open

Create a Journey Facade Singleton #6

willnationsdev opened this issue Mar 23, 2019 · 0 comments

Comments

@willnationsdev
Copy link
Owner

willnationsdev commented Mar 23, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant