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...
- Provide a getter for its internal StoryGraph.
- Provide a means of registering global properties.
- 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.
- It should be able to bind property names to any arbitrary StoryItem in the graph.
- 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.
Make a Journey singleton class. This means that you'll really create a
_JourneyC++ singleton and then you'll make an exposedJourneyclass with static functions that interface with the non-exposed_Journeysingleton.Journey will...
HashMap<StringName, Variant>that stores properties like "chapter1/found_doctor" => true, using a 1-to-1 mapping. And then, it will also store anotherHashMap<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.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.