Weaving Narratives into Procedural Worlds

Nov. 16, 2016
protect

In over three years of dev blogging on my latest roguelike project there's been very little discussion of the story, which belies its informative role and importance throughout the alpha development process. In fact, following the mediocre stock sci-fi back story given to the original 7DRL game jam version on rebooting the project in 2013, the very first stretch of development was actually devoted solely to fleshing out a unique story in great detail. Everything afterward would serve to support that narrative in one way or another.

Now that this part of Cogmind's world has taken shape and nears completion, it's time to venture into new territory and discuss the whys and hows of integrating story elements into a genre traditionally light on story. This article originally spanned a three-part series on my blog, but here I've merged them into one for convenience.

Note that this series is specifically about static narratives in procedurally generated worlds, and not generating the stories themselves! There's quite a distinction between the two :)

(As usual I'll be avoiding spoilers, although in this case it'll mean fewer concrete examples until we get into Part 3.)

Part 1: Value

Why?

Naturally the first question here is why would we want to include a story at all? Roguelikes are not strict RPGs, and rarely put much effort into storytelling. In fact, there is even the danger of story ruining/interfering with what makes roguelikes great in the first place (a point we'll touch on several times).

However, I'd argue that when used carefully there are quite a few ways in which story elements can enhance the roguelike experience, making them a potentially valuable addition. Let's look at some of the benefits, which double as goals when designing a new roguelike.

cogmind_story_integration_graph

Cogmind Story Integration Diagram

The value of story elements in a roguelike, an overview.

World Building

Theme and setting define a roguelike's starting point when it comes to source material, but crafting a story on top of it all (ideally with multiple plot lines) takes it to the next level. A story requires that actors have motives and goals, and the whole world feels much more alive when for the purposes of storytelling actors have goals other than "approach and kill player." Certainly mechanics and basic content like actor/object descriptions can go a long way towards reflecting the nature and state of the world, but a full-on plot reinforces it all in the strongest way possible: through action.

Seeing the game's lore in action really brings it to life, giving it added meaning beyond the words. From the beginning this approach has been important for Cogmind in particular because it strengthens the immersion, a focus of the whole player experience I've been going for. And on the development side that same desire to bring everything to life drives development to dig deeper. As the game world expands I've often asked myself "wouldn't it be neat if the player could actually visit that place? Or meet so-and-so?" And then suddenly there they are, being written into the game :D. As a result the world has gotten increasingly dense over time, with each new piece reinforcing one or more others.

Meaning & Purpose

Roguelikes infused with story elements also gain additional layers of meaning on top of whatever might happen in the world, contributing to a more "epic feel"--the world is definitely bigger than the player character, who can have a greater purpose beyond being a "murderhobo." With the 7DRL version a short back story merely provided the premise, good enough for a straightforward dungeon crawl, while I can't imagine the Cogmind of today without its deep and engaging story. Whole new maps and interactive NPCs were added to allow the player to influence the world in different ways, because it made sense in the context of the greater narrative.

Interactive stories also offer a good source of memorable crafted experiences, which can be even more complex and powerful than standard roguelike encounters because a story is capable of spanning multiple locations and events. For example, in Cogmind the player can visit a certain area where all hell breaks loose, which in turn affects other areas after that, the details of which could depend on other player actions. The story links different locations and actors in numerous ways, supporting a grander scale that few roguelikes attempt to tackle. (Lots of room to innovate here!)

While exploring the resulting web of possibilities, individual steps along the way provide the player with explicit intermediate goals. This means a greater number of "things for the player to do," generally a nice quality to have in a roguelike wherever it makes sense. These can be rewarding experiences in themselves, experiences that extend beyond simply killing things...

But it's worth noting that depending on its execution (covered in Part 3), the presence of a story does not have to completely supplant a player's own narratives, either. I've noticed players coming up with their own little stories all the same, just as they do in other roguelikes, based on the danger, unexpected RNG shenanigans, close saves, and deaths that come out of isolated encounters which may have no bearing on the wider plot. This is important because it's a valuable part of the roguelike experience, and demonstrates that it's possible to include a story without drowning out the emergent mini-stories made possible by procedural generation.

So aside from moment-to-moment survival and long-term progression strategy, story becomes a third potential target for player enthusiasm and purpose. This advantage works on both an individual and community level...

Generating Interest & Discussion

Exploration is a fundamental part of roguelikes, be it of mechanics, new content, or simply unrevealed procedural map areas. Having a story gives players yet more reason to care about (or justify) events in the game world, along with hooks which in turn drive exploration to find answers and/or uncover secrets. Not that the extra incentive is required for the game to be enjoyable, but it's nice to have one more channel through which players may connect with the world.

This feature also works on a wider level, from two people playing alongside one another to the community at large. Story elements become common points of reference, allowing players of an otherwise single-player game to share experiences in the same way they can talk about mechanics and strategy. Lore, locations, NPCs, motives, factions and more all become part of the "common language" that players internalize as they explore the world and what is happening in it. For anyone following along with the latest release, or who isn't spoiling themselves with the wiki, there's plenty of speculation to go around. From my perspective, it's been fun to watch the community puzzling out what's going on :D

cogmind_story_spoiler_talk_discord

Cogmind Discussion (secret plot spoilers)

Players talking about secret plot spoilers in public chat :)

Other aspects that contribute to the overall discussion and level of interest, both with regard to those outside the community looking in, and within the community itself:

  • All the minor actors and events that players talk about, some of them quite memorable like "the annoying derelict" as everyone has come to know a certain NPC with no particular name.

  • Story also adds another dimension to seeded runs, where different players may take the same or different approaches to the same set of story-related encounters.

  • Relatively rare events are especially meaningful, including those which rely on a chain of actions. There are a good number of comments along the lines of "I saw...!" and "Have you ever seen?!" Just last week a major plot event added to the game ten months ago was discovered by a player for the first time :P

In all it appears there's a lot of value in building a roguelike around a good story, assuming it's done right, but we'll get to that below.

Part 2: Characteristics

Having identified several areas where I believe roguelikes can benefit from the inclusion of story elements, then comes the hard part: actually doing it :)

Because there are certainly a number of ways story can worsen a roguelike experience, the next step is to identify the characteristics of a good roguelike narrative, to show that permadeath and a procedurally generated world don't have to be completely incompatible with a rich story.

The Story

Of course, at the foundation here is the need to have a compelling story in the first place! That's kind of the whole point--if it's going to be a boring, generic story, then the game may as well get by on the merits of roguelike gameplay alone. Having that strong focus is good, but it would be really nice to tap into some of that value mentioned before. What type of story can achieve those goals?

As in all things game design, consistency is key. A story that makes sense due to its consistent internal logic reinforces the whole world building aspect (Part 1). With only partial familiarity, an observant player begins to intuit things, like where to find some object or actor, what impact a particular course of action may have, etc. by filling gaps in their knowledge with what seems reasonable. They may not always be right, but at least that path is available, and it's an enjoyable process for some. Plus being wrong is fun, too. Because surprises :)

So the most useful story in this regard will be one which makes heavy use of cross-references between the game's different forms of content and NPC dialogue, attitudes, behavior, everything... to strengthen player intuition and general understanding. Just like solid mechanics anchor the gameplay, so can a solid story anchor the content.

Cross-referencing also makes it easier to avoid one of the bigger pitfalls that can detract from the value of story: linearity. Unless it's somehow part of an intentional underlying theme for the game, a linear story is almost certainly bad for a roguelike. It works against the freshness of each playthrough intended by the use of procedural generation (not to mention the annoyance of having to repeatedly face the exact same story content on each death!). Instead, make sure the story is easily split up into smaller chunks that can just as well be experienced independently of one another and still be interesting and meaningful (more on that below).

A complex plot with multiple interconnected threads will also naturally be a lot more replayable.

cogmind_major_NPC_encounter_visualization

Cogmind Major NPC Visualization

Abstract visualization of Cogmind's potential plot-related encounters with major NPCs, colored by faction. The beginning of the game is at the left, and it progresses to completion at the far side. Many of these encounters have implications for later encounters, for the player, or for the world in general.

Notice that the story plays a lesser role in the early game, which as the most commonly replayed segment could grate on the player if there were too heavy an emphasis on static elements. This especially makes sense for Cogmind because there is no initial character generation phase, though other games could even attempt to use the very beginning to introduce a wider array of story-related options.

Story-Gameplay Integration

Story encounters shouldn't simply be meaningful in a lore sense, but have real implications for the rest of the game, basically giving the player's actions consequences on a higher level. Most roguelikes have a relatively short feedback loop--fight a battle, rest up, maybe raise a level, then explore until the next battle. Story elements large and small can be integrated into the gameplay itself, adding a unique kind of replay value by being elements the player can choose to engage with as part of a long-term strategy. Depending on what the player decides to do, the plot might affect later events in a significant way, have no impact at all, something in between, or maybe just cause some immediate effect. As the player becomes aware of static elements within the plot, on future runs they may or may not want to trigger certain events depending on their plans, condition, and where they happen to be.

So the story is not there simply for story's sake, serving as the basis for additional long-term feedback loops. For this reason I try to ensure many aspects of Cogmind's story have useful (or at least interesting) consequences for the player. This extra dimension to the world creates gameplay deeper than the average pure dungeon crawler, and despite the static elements the approach has proven resilient in the face of many replays. Plus there's always room to expand the number of options! Even a modest number of interactive elements can lead to a large variety of combinations and outcomes.

cogmind_major_NPC_encounter_visualization_longterm_impact

Cogmind Major NPC Visualization (w/long-term impact)

The same major NPC encounter visualization from earlier, showing those with a direct effect on some later encounter (arrows), as well as those with a relatively significant long-term impact on gameplay (bracketed length).

It's Optional!

Despite everything said so far in this series, one of the most important characteristics of Cogmind's story is that it is completely optional.

The game should be enjoyable without requiring that the player make sense of the story to progress, or pay any attention to it at all. Players new to the game can go from beginning to end on no more than the idea that "okay, I'm a robot and there are robots out to kill me... dakka dakka boom.

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>