Game Visions: A Roleplay-Inspired Procedural Narrative System

Edit: This is now part of a series of posts exclusively about the development of a procedural narrative system.
Part 1: Game Visions: A Roleplay-Inspired Procedural Narrative System
Part 2: Game Visions: Modeling Human Behavior and Awareness

The game industry has come a long way exploring narrative systems in recent decades. The crown jewel however, procedural narrative, has not yet been fully attained. Procedural narratives are generated on-the-spot by advanced algorithms, allowing for a level of content ordinarily impossible to produce. Several conversations are now taking place discussing how one might go about designing these narrative systems. After reviewing their contributions, I will present my own suggestion for an implementable solution.

Previous Contributors: Research

Ruth Aylett, Sandy Louchart, and Allan Weallans published an essay in 2011 called “Research in Interactive Drama Environments, Role-play, and Story-telling“. It summarizes attempts thus far at simulating procedural narrative and the problems therein:

  • Procedural narrative requires a structured, dramatic sequence of behaviors to render entertaining experiences whilst simultaneously requiring autonomous AI characters that act believably human, but without regard to whether they make dramatic, “story-relevant” decisions.
  • Procedural narrative requires an abundance of hard assets to present generated content to users (written or recorded lines of dialogue, art, animations, etc.)
  • Creating these experimental systems requires an interdisciplinary team of people to build the AI logic, compose the narrative, design art and animations, etc. These combinations are typically found in large companies that can’t afford to risk investments on risky products.
  • Current suggestions for content creation include…
    • Building tools for users to create limited content for a given game.
    • Relying on machine learning to derive structured content from analysis of existing works.

Nathanael Chambers and Dan Jurafsky have demonstrated machine learning’s effectiveness at narrative induction (identifying a narrative’s protagonist, narrative history, & possible holes or extensions to the narrative) in their essay Unsupervised Learning of Narrative Event Chains.

Previous Contributors: Games

Ken Levine (@IGLevine on Twitter), writer for Bioshock and Bioshock Infinite, suggested the idea of “Narrative Legos” in his talk at the Game Developer Conference of 2014 (full video below). In it, he discussed his ideas for how to implement autonomous actors in a simulated narrative:

  • Characters are defined by an owned number of “Passions”, which…
    • represent character desires that determine AI behavior.
    • can be known, hidden, and/or discoverable.
    • pulled from a procedural pool of potential Passions.
    • each consist of a linear spectrum of support or criticism of the player character’s actions.
    • includes reward/punishment tiers at given levels of support/criticism.
  • The passion system is meant to generate zero-sum environments where the player must lose support (gain criticism) from one character to gain support from another.
  • In-game quests are either…
    • scripted to result from character passions (“You’ve pissed me off for the last time. Let’s fight!”). Quest = Fight
    • introduced via scripted narrative, but then impact a set of characters’ passions (“Zombies are invading. You’ve killed them, so I’d like to offer you my services.”). Quest = Zombies
  • Different characters will represent different factions.
    • Character A vs. Character B (Individual)
    • Elves vs. Dwarves vs. Orcs (Civilization | Group)
    • Servant of Chaos vs. Servant of Order (Ideology)
  • Passions are highly modular and integrated; therefore, DLC can be added “into” the game rather than “onto” the end of it.

In response to this, Krystian Majewski (@krystman on Twitter) wrote an article on his blog Game Design Scrapbook called “Stepped on a Narrative Lego“. In it, he noted things he saw to be problems with Levine’s design:

  • Modeling characters’ behavior on a linear spectrum renders human memory nonexistent. Lost favor can be regained through positive actions, regardless of the crime committed.
  • The reward-tier emphasis of the Passion system and its zero-sum game concept encourages a dynamic in which players “game” the narrative system purely to acquire in-game benefits. This trivializes narrative relationships and renders human emotion nonexistent.
  • Ones actions shouldn’t automatically generate favor in others: a player’s existing social relationship (or lack thereof) with a character should influence the effect of the player’s actions. “Buying doughnuts and coffee for your colleagues at the office is a way to live out that relationship [while doing so] for the anonymous cashier at the supermarket is weird, creepy, and inappropriate.”
  • Information simulation would be an important component of such a system: leveraging / manipulating misinformation, deception, and limited knowledge to determine actionable character options.
  • It isn’t interesting for characters to only react based on player actions. Characters should develop alongside the actions of other NPCs, reacting to and developing them in turn. This is far more interesting than the player’s interactions with the same characters.
  • Rather than attempting to tackle an interactive system right off the bat, developers should first prioritize developing a solitary environment to simplify the testing of the narrative system.
  • Any narrative system that functions will need to rely on…
    • functional human emotion (they exhibit and elicit emotional reactions and are relatable / believable).
    • simulation of social relationships and social histories (do/do not recognize you or your previous actions associated with them)

Russian Developer Twisted Tree Games (@atwistedtree on Twitter) is hard at work on an indie game called Forest of Sleep that relies on pure imagery to communicate a procedurally generated story to players. It does not require explicit lines of dialogue and instead relies on “emergent narrative” where players craft the narrative using their own imaginations.

My Own Thoughts

Just as Majewski believes our primary focus should first be on crafting a non-interactive system, I believe it would be to the advantage of the game development community at large to focus first on designing a robust, free and open-source middle-ware application that could be integrated into a variety of games to supply narrative content and manage character data.

Consequently, the software would need to focus less on producing direct game assets and more on identifying concepts, relationships, and actions in the abstract sense; that way, developers would be able to match the character behavioral predictions and world scene-descriptions to whatever type of concrete asset they prefer. Developers from any background could then adapt the software to almost any kind of gameplay system.

Incorporating all of the above research, I propose a number of suggestions regarding design concepts that should bolster the fidelity of any product crafted towards the purpose of narrative generation.

Idea: Role-play

The most powerful form of interactive, narrative-infused, & dynamic content generation is table-top role-playing games. A storyteller describes a world while players collaborate to design creative solutions to the problems presented to them.

  • Players are limited only by their imagination, ingenuity, character abilities, and available technology.
  • The storyteller produces most content in-place: dialogue, scene descriptions, lore-crafting, etc.
  • The storyteller manages story tension behind-the-scenes.
    • Carefully designs suspenseful engagements and problems.
    • Ensures that players are able to survive to be proud of their achievements or review what went wrong in failure.

If we are to develop a procedural system inspired by roleplay, then we should have a similar distribution of responsibilities: a Storyteller fulfilling the role of the world, and the Agents who participate in that world independently of the Storyteller’s influence.

A Storyteller facade would largely be responsible for moving the narrative towards a targeted plot structure.

  • Full power to craft new content that will make progress towards the targeted structure.
  • Limited power to mutate the properties of existing content. In essence, the storyteller should be free to change any element of the story or the characters so long as unmodified characters are unable to perceive a difference in the resulting story-space/timeline (which implies new content is compatible with the relational requirements of the previous content).
    • Example: if it has been indicated to a plot-relevant character that a monarch has an heir, then assuming there is a dramatic reason for doing so, the storyteller can change the heir from being a boy to a girl if the gender of the character has yet to be published.
    • The Storyteller may need to have even more severe limitations over characters that are, in fact, controlled by live players.

An Agent facade would be responsible for…

  • gathering observations in a supplied environment (what can this character perceive as opposed to others?)
  • deriving a list of possible actions to take based on narrative relevance/personality/skillset/perceived technology/etc.
    • The narrative relevance bit would be the manner in which the Storyteller might have some measure of influence over a given character
    • The Storyteller might also indirectly manipulate Agents by manipulating access to technologies/abilities/skills in an environment.
  • making a decision about what to do based on the character motivations and priority of relationships.

Idea: Machine Learning

As suggested by Aylett et. al., machine learning algorithms have the potential to drastically change the way game narrative is produced.

We could design algorithms to help…

  • AI Agents…
    • determine the plot-relevance of a potential action.
    • learn makes decisions that trick players into believing they are making human-like decisions vs. random ones.
  • a Storyteller learn how to…
    • determine what constraints the environment should place on characters.
      • Example of a social constraint: generate an unawares bad guy nearby to limit what the player can visibly do, creating tension.
      • Example of a technological constraint: add the detail that someone has tampered with a needed tool, creating tension. Perhaps accompanied by a perpetrator (a compatible, existing character or a manifested one).
    • determine what types of potential actions make sense in a given environment.
    • determine what new characters/items/places to introduce that are likely to pull characters towards a dramatic sequence.

Any solution we come up with should rely on a computer’s ability to improve itself over time, to make progress towards an ideal narrative portrayal indistinguishable from that of a human being.

Idea: Theatricality, Literature, and Sociology

As software developers begin putting together narrative systems, it is important that they keep writers and sociologists close by as expert consultants during the process.

Writers will be able to provide much-needed insight into…

  • strong forms of plot structure such as nested loops, en media res, and the hero’s journey.
  • various types of narrative patterns, themes, and motifs (which a Storyteller could dynamically draw upon to generate content).

Likewise, sociologists can help to derive the types of variables needed (esp. for ML algorithms) to simulate realistic interactions between characters, including…

  • how to model relationships.
  • the influence different types of relationships have over different people’s decision-making.
  • the ways in which a given type of interaction affects the Agents involved.

Idea: Crowdsourcing

In order for developers to properly accumulate the data for a large-scale procedural narrative system, a public database of associations between concepts, relationships, and interactions will likely be necessary. To build these associations, it is best if we leverage the input of the global community.

We might have a given concept, like a “king”, that requires us to know about what many kings are like and what kinds of actions they are likely to engage in. We can add an interaction with the concept, such as “kill king” which may generate different related events based on how the king was killed, etc. Finally, by adding a relationship such as “vassal kills king”, we can identify what emotions are typically evoked and by whom, helping us determine how agents might respond to a vassal killing a king, etc.

The vast number of possibilities for these logical associations make compiling a database of this sort a futile mission for any single studio. With the public’s involvement, however, its invention is plausible.

A free side-benefit would be the simple localization of the software to other parts of the world. If society is contributing associations for narrative themselves using their local language, then the content produced by a middle-ware application, namely word-based descriptions of characters, items, places, interactions, and events, would be created already in the native tongue as needed.


The gaming community, and the indie community in particular, could benefit greatly from an open-source, large-scale, & robust solution to producing narrative content. To that end, we should pull from a variety of disciplines pertinent to writing realistic narrative in the first place, develop smart algorithms that can simulate narrative non-player agents, and work with our community to build the system.

Comments, criticisms, and suggestions are encouraged of course. As always, I look forward to future conversations with everyone.


One thought on “Game Visions: A Roleplay-Inspired Procedural Narrative System

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s