Overview
StoryEngine is a narrative engine. Much like physics engines simulate a physical model of the game world, StoryEngine simulates the narrative model of a game world. It scales to large, multiplayer experiences, where each character has its own emergent storyline that is narratively consistent with all other participants.
StoryEngine accomplishes this by giving narrative designers a set of building blocks, called entities, to describe the narrative world. StoryEngine provides many entities, but the primary entities are actors, items, locations, and goals. Actors represent playable and NPC characters in the world, while items and locations represent the world itself. Goals describe actor’s motivations and what they are trying to do. As actors interact with the world, they can complete goals, which in turn, modify the narrative world.
Narrative Progression
Games generate events that represent in-game actions and send them to StoryEngine. StoryEngine then uses these events to advance the narrative and render output back to the game for it to use.
StoryEngine operates in short “ticks” of time. All events generated by a game during a single tick are gathered and then StoryEngine identifies all entities that could potentially be affected by each event within that tick.
Once gathered, StoryEngine evaluates the goals for every actor to determine if they are completable based on the current narrative state of the world, including the new events.
For any completable goal, mutations are generated that describe how the world changes as the result of the goal’s completion. Output is also generated by StoryEngine that describes the changes that just occurred.
Finally, all the changes are applied to the world and the output is sent back to the game, leaving the world in its new state.
Mutations
Mutations describe how the world changes when a goal completes. Developers are free to create mutations that can modify anything in the narrative world. For example, they could give characters new memories, change their location in the world, or add or remove items. Every entity and its properties can be changed, giving designers complete flexibility to shape how the world changes in response to player’s actions.
Rendered Output
StoryEngine outputs text, but text can be optionally structured and also sent to additional systems for further work, such as converting it to audio or video.
Games define specific message structures they understand, and instruct StoryEngine to output messages in that format. These messages represent anything the game requires to reflect the narrative progression. For example, StoryEngine could output lines of dialogue, game engine instructions on where to move the camera, or narrative overviews of a new scene. Ultimately, game developers can use StoryEngine however they’d like to integrate content into their games.