Tuesday, September 11, 2012

Player Control over Narrative


These are some of my thoughts on procedural narration.

My Game


I'm working on a game. It is still in the design phase. Here are some relevant things about it. It will provide a directed experience for the player within a "free world." It will have a strong narrative center, as grand and involved as the ones in Final Fantasy or The Godfather. It will have many sub-stories spread throughout it. Its player can play through it as many times as he likes, making different choices each time. Hopefully you have realized, if you know anything about the game development community ;), that I've described the vision for many titles, some more ambitious than others.

Here's the part where my game starts to sound original. The player will have the freedom to control his experience, not just in how he plays, but in the way the entire world around him evolves, including plot, characters, and societies: in a nuanced way. He will have the feeling of freedom while playing. His choices will matter, his self-expression will be natural, his interactions will be emergent, and the critical structure that makes the game's narrative interesting will remain. My game will have a non-linear narrative, and retain all the power of having a linear one.

If you believe that this result is an easy thing to accomplish, or that any game that exists has done so, then you do not understand what I am saying =P. But I don't think you believe that. Read on for clarity.

For simplicity, think of the following mash-up as a decent analogy of what I have in mind: 

  • Facade meets
  • Final Fantasy meets
  • Mario meets
  • Half-Life 2 meets
  • Minecraft meets
  • World of Warcraft meets
  • Devil May Cry meets
  • Street Fighter meets
  • Zelda

The game is an action-adventure-RPG, inside a sandbox MMO, with a dynamic co-operative story-line. Oh yeah.


This Series


There will be two posts in this series, of which this is the first. The second post is not yet written. It will focus on how procedurally generated elements of a game can interact with one another. For an example of what I mean by that consider the following in-game scenario: two computer-controlled, important, characters are traversing a generated landscape, while discussing their feelings with each other, in an entirely visual way. So they communicate entirely through a custom body language. That idea is an example of interacting, generated, elements.

The second post will also focus on how the player might introduce new base (primitive construct) concepts into the system, and have them be embedded in the construction process of all generated elements. This post will introduce the fundamental concepts needed for the second. These concepts include how to weave a dynamic, player-controlled, story in and around a static structure. 

The example I will be using to help illustrate these concepts, and the one you should think about the whole way through, is one in which I take a successful, and well known, RPG, Final Fantasy 7, then introduce the idea of a player-controlled narrative within it, without losing any of the game's original narrative power.

I will not cover how to design gameplay mechanics (such as combat), so that they have natural, and obvious, narrative interpretations. For an example of what I mean consider this task: creating a platforming character who's nuances in jumping communicate abstract ideas, to other characters, and the player. The other characters then react in a believable way. The platforming character expresses both his baked personality, defined by the game, and the opinion of the player controlling him: some merging of the two. That's what I won't cover, at least not in detail; though maybe I will a little.

Let me tell a story to help illustrate the previous concept even further. Us thinking about it will be helpful. In Super Mario RPG (a game for the SNES) there is a segment in which a key character is asking Mario (the player) to prove that he is, "the famousMario. At that point in the game the player is told nothing, explicitly, about what to do, and is expected to realize what he needs to do on his own... then do so by pressing the jump button - duh. That moment for the player, like as I experienced it as a child, is very peculiar and interesting. It had a lasting effect on me. I had to realize what was asked of me, frustratingly try incorrect options, then on my own connect the story concept of jumping with the gameplay concept of jumping, then jump. 

That example is one of narrative-and-mechanics synchronicity, and is a key concept in this post. By the way, when Mario jumps in the segment I described, he does so in a much more awesome way than he usually does: yeah. Even though he does so in a contrived way, the player of Super Mario RPG advances the story in that segment, by interacting with the game in the way he normally interacts with it: the way he does when he is actually playing.

A lot of procedural work with stories involves creating mechanics that can serve a dual purpose: to serve an important function in the mechanics, and an important function in the story... in comparable ways; "comparable" is the key word here. Also note, that it is my opinion, that creating mechanics that serve such a dual purpose is incredibly difficult to do, and well beyond the depth of design most game development processes go through. But, doing so, like anything else, becomes easy with practice, especially so when someone else has paved the way in front of you. I have not done this, but have done something significant, and intend to show you some of what I know.

The next potential step in our short-term imaginary process, that we're talking about directly for the first time here, is to take our Super Mario RPG gameplay segment, and turn it into a dynamic event i.e. a player-controlled narrative thing. We do this by adding choices for the player to, well, choose from. 

What if the player could platform in a way that expresses his personality? Have you ever seen various Mario players play through the same level (have you)? How different do their play-styles look? How colossally different do they look? Can you see in their play the following qualities: aggression, frustration, elegance, patience, bursts of enthusiasm, and sloppiness, each expressed in particular patterns? You can see these things, or you should be able to, along with much more, if you look for them. If Mario, the game, wasn't personal then it wouldn't be a game, at least not a good one. 

What if the characters in Mario's world could react to his behaviour, with the same degree of nuance an experienced player could react to Mario's behaviour - implying the player's mental state? What if the knowledge an experienced professional-Starcraft-II-league spectator gleaned from a game, was understood by the computer-controlled characters in the game? Now you understand, maybe - no you don't - the concept, and power - sort-of - of procedural/dynamic narratives.

We want synchronicity, so the player can do story things, with mechanics things, but have freedom. We want the jumping synchronicity between story and mechanics in the Super Mario RPG example, and the freedom of control in a typical platforming Mario level.

By the way, from now on - well at least usually - I will refer to the concept of matching the narrative and mechanical meanings of a player-controlled action as mirroring: narrative and mechanical mirroring. Think of the Super Mario RPG jump sequence I described earlier... or say, shooting actual characters dead with a gun, in something like Deus Ex. Yes Deus Ex, yes! "Those characters had real purpose, and now they are gone!"

Let's take a look at Mass Effect (ME) for a moment, the modern, classic, example of a game with dynamic story lines. In Mass Effect combat has nothing to do with the story. The choices you make in the story have no effect on the combat, or barely do, and the choices you make in the combat have no effect on the story, or barely do. There are a few exceptions. In the game sometimes making a story "decision" can consequentially mean doing a side-quest, and that can mean getting/losing a character/ability/item. But those situations are limited in number, scale and impact. For the most part the mechanical decisions a player makes (i.e. the gameplay decisions he makes) and the narrative decisions he makes, are both kept in their respectively separate worlds.

In Mass Effect the grace you have in taking down a boss at a particular point doesn't impress your AI companions, or earn you any favor, or altered social position with them. Often the biggest mistake designers make, as those of Mass Effect made, when gunning for "procedural narratives," is thinking of the way their players interact with their game's story, and the way they interact with their game's mechanics, as being separate things. You must see these two kinds of interactions as the same thing, to get true procedural generated narrative (proc-gen). 

I'm sad to say that the one thing I won't cover, yet, is making massive changes in NPC behaviour: like having the story completely change, into something totally different, based on player decisions. 

Fable is a good example of a game that attempts to cover this, and execute on it. Fable has the "Good/Evil system." If in Fable you kill some dude, then maybe the main story will be significantly different somewhere else in the game. The idea is that you can be radically good, or radically evil, and have the world respond "believably." Making a plot/world for a game, like the one in Fable, that retains its strengths, without having to write many, many, versions of it, while letting the player mess with it, is a hard thing to do. The problem is solvable, and I will show you the solution, but not in this post. For now I will give you the beginning of a solution. 

Intrepid AI designers will be able to extrapolate pieces of a full solution. Really, a perfect Fable is just an extension of the ideas presented here. If you want the "true," Peter Molyneux-hyped, Fable, with its one great story, and a player-controlled path of evolution through it, allowing for, and here is the key, massive changes in both, then you need to wait until I have more time to explain the theory that could provide such a thing.

I call the theory that delivers the above concept, the one with total player-control over the story, dynamic manipulation of narrative structures. Again this post will discuss slight alterations to the story, but still ones that provide massive amounts of freedom. I will be solving the root problem. Everything else is just an extension.

Do you believe that small choices cannot provide great freedom? Many game designers do, and they are wrong to think that way. We do not need to let the player make any choice for him to feel free. In fact the relationship between the sense of freedom, and the number of choices a person has, is far less co-dependent than one might think, maybe... depending on how you think. 

As food-for-thought consider the following: Mario only runs and jumps. How much freedom do you feel when you play as him, in one of his better games? The correct answer is this: "a lot." That idea points to one of the key reason's behind Mario's success, and to its elegance. Why such a constrained character can feel so freeing, is inside the nuance of Mario's control, the careful design of the situations he is put it in, and the interrelationships of everything he can do.

Scroll down.





























Player Freedom in a Directed Narrative


The Setup


In my planned game there is a free-form character inside a directed experience. How is this accomplished?

The question is an interesting one. It is fundamental to what I want to talk about. It hints at the following deeper, and more general, question: how can a designer give a player freedom, while ensuring that that player's experience is managed, and kept engaging?

Games are a medium for consumption, so they exist to provide engagement. They are also interactive, so they exist to provide a player choice. Correctly balancing the content a game provides, with the choices a player would like to make within it, is at the heart of many design problems.

Some designers go as far to say that narrative freedom should be disallowed completely, to create the most compelling narrative experience for the player. I remember an argument about this idea from a long time ago, between a key designer behind Half-Life, and another one behind Deus Ex. Both of these games I mentioned are story-heavy, wildly successful, first-person shooters. The Half-Life guy was adamant about controlled story, the Deus Ex guy about dynamic story. They were both very passionate about their positions. Their argument is just something to think about if you know those games. Clearly both positions have merit. If you want to read their arguments, go play their games.

I'll move on to two analogies. Here is the first: imagine an adult sitting at a desk, with a blank page in front of him, and a pencil in his hand. The man has little to no writing experience. He is told by an authority to write a complete story. He has to do it. What is the most likely reaction for him to have? How do we all react to the blank page? There is a good chance he will feel a little paralyzed. I've felt this. I'm sure we all have. What's the reason for his fear? 

The man has too many choices. His doubt prevents the exploration of his ideas. He doesn't consider any given idea long enough, for it to mature into something worth writing about. He possibly creates a cycle of repression, losing confidence, by continuously rejecting possible avenues of progress, by second guessing the dead ends that they will lead to. We all know that writing takes a lot of experimentation. It takes a lot of failure. At least anyone who has written a lot will know this. Writers have to put themselves out there, and be willing to get burned, learn from their mistakes, and improve their ideas. Writing is a process, not the expression of a solution.

The man's endless scrapping of infant ideas becomes a fast-forming habit, creating a palpable series of negative feelings in him, like uncertainty, anxiety, and possibly even terror. The man has incredible freedom over what he could write, yet he feels trapped. He can't visualize the options available to him, so they appear not to exist. He feels constrained in a world that offers no choice at all. Though the number of choices he has is clearly almost infinite.... Cool, right?

Now you might not have felt paralyzed in front of a blank page before, but we have all had that feeling, of being in a situation where we want to accomplish something, but have too much freedom to reach our goals with, and thus stagnate, controlled by fear. This phenomenon appears throughout society, all over the place.

Okay, so here's the second analogy: there's a kid at a candy store with $40 in his hands. There are hundreds of choices for him to make. He can spend all $40. He has to spend all 40. He is being forced to. Yes, for him! He feels overwhelmed by choice, in a very positive way. Many combinations of what he can buy, whir through his head, all of which are appealing, viable, and intoxicating. The kid has fewer choices than the adult, far fewer, but feels like he has many more, way more. What is the difference between these two situations, the man and child? Here's a hint: which situation makes the pursuit of the correct choice deeper, and more compelling? Are the number of choices directly related to the feeling of choice? 

We have blank page paralysis, and a kid in a candy store. The relationship between freedom and the number of choices is an inverse. Choices do not create freedom. Interesting choices create freedom. 3 interesting choices is much more valuable than 100 boring ones, or confusing ones. 

Freedom is perceptual. It depends on how the chooser sees the options around her. The mind is a dynamic thing. It can occupy itself under any constraint, and constrain itself when there are no constraints enforced from outside it. 

To help illustrate this consider meditation. You may know a little about it or nothing. Your knowledge on the subject doesn't matter. Meditation is the practice of engagement in nothingness. Masters of meditation say this: that the greatest fulfillment can be found in "nothing," if that nothing can be perceived correctly. By "fulfillment" they also mean freedom. By, "in nothing" they mean in the pure perception, of the spontaneous behaviour of one's mind, and the world around her.

What's required by the meditator is to achieve proper discipline of her mind, in order to improve. Obviously this is a very difficult thing for her to do. Meditation is just one more way to tackle hard problems. It is not a shortcut. But it illustrates something important, if you at least trust in what its practitioners say: freedom is a state of mind, not a strict reflection of your reality. 

We can become free by obtaining options in the world around us. This is the Western way, as a stereotype. We can also become free by controlling our desires within us. This is the Eastern way, as a stereotype. Notice which culture focuses more on self-expression, and which focuses more on group harmony. 

Also note the way choice is offered in Western games, compared to Japanese games. Our games give options. Japanese games make you want the options they already give. Ours have more room for player-character (PC) definition. Japanese games have more richly written PCs. Neither approach is obviously correct. Which approach is the best depends on the player. What matters is that both are valuable. Very often it's by understanding a situation in your game that will allow you to choose which approach to use. With both approaches you can do far more than you could with one.

Rounding out my stuff on meditation: focusing on nothing is meant as an exercise to identify which constraints come from you, as opposed to from the world. When we are not focused on "nothing" we normally have to deal with both things, the world and mind, so it's more confusing to tell the difference between the two. Meditation tries to simplify that issue by separating those competing forces, so that you can tackle them one at a time. You learn to see what constrains you from the inside, so that when you re-enter the world, you know when to change yourself and when to change your situation. 

Let's recap what we have so far. The mind's inherent flexibility defines it. "The only constant is change," especially with people etc. Our minds can feel free when they are constrained, and feel constrained when they are free. What defines our sense of freedom is how we perceive the world around us, not what it actually is, though reality can be very suggestive. By understanding and controlling both types of elements, in and around our player, we can give him the freedom that he desires.

If a person feels that he can make any choice, that he could possibly want to make, at least that he is aware of, he will experience the sensation of unlimited freedom, at least as long as the original feeling lasts. If the same person feels desires inside of him, but can't perceive how to satiate them, given his options (as the adult with writer's block did), then he will feel like he has no choice, and will enter into some kind of despair. Luckily, we rarely find ourselves in the latter position, at least not entirely. Most of the time we feel like we have at least some control, even if it is limited.

Giving freedom to a player comes down to managing the relationship between what that player wants and what he can get. It also includes showing a player why he would want any of the things offered to him in the first place, if he doesn't already know why.

As an aside I'll bring up a common mistake designers make. Think about Mass Effect. You can even think about the third installment's (ME3's) ending. If a player expects to be able to do something in a game, it is because the game, and its world, led him to believe that he should be able to do it. The game may have done so directly, or implicitly. That doesn't matter. If a game doesn't set up an expectation in a player then that player will learn to abandon it. Player expectation has to be managed. It is the essential ingredient that we must understand and cater to, and manipulate, in order to create a believable and dynamic story line.

By the way, Mass Effect 3's ending was criticized by the web, loudly, and the game's developers caved-in, and gave some DLC to "fix" the concerns of their customers. Google the event if you're bored. The ME3 players wanted their in-game choices to matter more than they did, so much so that they launched a protest, significant enough to change the game. That's cool.

A Simple Game


I am going to cover a new idea. This idea will give a nice analogy for everything that follows in this post. I am going to take a simple game idea, and fill it out with some procedural ideas, so that you can get a good sense - an overview - of how these things might work. Then we'll get into FF7, and more complicated stuff.

So let's start with Mario. Imagine having a side-kick, like Toad or something. This side-kick (Toad) will follow you around, and work with you. Your goal, as the player, is to cooperate with your partner, so that the two of you can overcome challenges.

There is a neat twist however. Toad is not just a regular AI partner. He is not some chincy stand-in for an actual human co-op partner. He is the real deal. Toad has a personality, that you the player must uncover. He becomes afraid, he becomes bold, he flubs his opportunities. He trips, runs away, sometimes makes bad decisions, and becomes delusional about his abilities. He is like a person in a lot of ways, with an interesting personality.

Toad also has a deep set of interactions through which he manipulates the world, and cooperates with you. Your job is to understand what Toad's patterns are, so that the two of you can do interesting things, bring down the biggest of the bad guys. So far I hope I haven't confused you. RIght now I am describing a strong co-op experience, but with a computer controlling what would otherwise be a human, in a different game.

Toad's personality shifts. Let's say that we can graph his internal STATE on 3 dimensions: fear, focus, and creativity. Each dimension has 10 states, giving us a 3-dimensional space with 1000 unique points within it. Toad exists at one of those 1000 at any point in time, and he transitions in between them, in response to whatever is happening around him. If a monster attacks, maybe he becomes more afraid. If you do not back him up he becomes even more afraid, and so on.

His state changes can have velocities, and rules. 

Whenever you do something, Toad reacts. If you do something interesting, and that inspires Toad, making him more creative (one of our dimensions), then that's awesome. Toad communicates the state change somehow, showing that he is inspired, with an animation, sound effect, or decision: like in the way he dispatches an enemy.

You have to keep track of how Toad's state is changing, so that you can learn how your decisions affect him. Does Toad like it when you let him take down certain enemies on his own? Which ones? How much leeway should you give him? Where is the line between active support and too controlling?

Maybe you enter a level that especially frightens Toad, and you must be particularly protective of him. A story is told through your interactions with Toad.

As Toad's state changes, you are responsible for interacting with him in a meaningful way. You have to learn when he is playing well, and learn what triggered that. Maybe he becomes more focused when you succeed. But if you succeed too much that distracts him. If you do not let him into the front lines, he becomes distracted (and maybe resentful i.e. afraid). Maybe creativity is thrown in there; Toad is more creative if you are more willing to change-up your strategy. Maybe since you are always creative with a certain enemy, Toad becomes creative with that enemy. Fighting that enemy creatively reduce's Toad's fear.

Hopefully this is enough to get some of your juices flowing. On to FF7.

Modding FF7


Consider Cloud from FF7. We're going to try and redesign FF7 so that the player's decisions while controlling Cloud can do several things:
  1. Determine which PATH the narrative flows down. Sometimes the narrative branches like a tree. Sometimes there are single events that are isolated, like the Golden Saucer date (in which the player's previous actions influence which partner he/she goes out on a date with); these events can play out in different ways, but don't affect the rest of the story.
  2. Affect the STATE of other characters, and his own. 
Characters' states do the following things to the characters that own them:
  1. Change how they behave in the narrative. Maybe the character's dialog changes. Mostly their animations change. Both of these things are what the characters do during story sequences. Characters react dynamically to a situation, to reflect their current personality and state of mind.
  2. Change how they behave in battle. These behaviors give away information about a character's state, similar to the behaviour of characters in story sections. Knowing a character's state is important to the player because of the next point.
  3. Apply modifiers to themselves and others in battle. These modifiers are rich, varied, and change the battle in significant ways. The player must always be uncovering what these modifiers are, in relation to his party's state, to keep his strategy within the best available.
The player can affect his own state and those of other characters by doing the following:
  1. Making dialog decisions. These decisions are few and far between, like how they are in the actual game.
  2. Gesturing during story sequences. Cloud can gesture when anyone is talking, when he is in various locations, when anyone is doing anything, and the meaning of those gestures will be interpreted dynamically.
  3. Making battle decisions. Every battle decision has a narrative interpretation, as well as a functional one. The cure spell cures, but it also can be seen as a social action of support, protection, and so on.
The result is a game that follows the general structure of FF7, but gives the player freedom to explore its meaning in more detail, at all times. I won't cover dialog in too much detail here, such as how to generate it, or manipulate it so story sequences can be generated. My goal is to show how a lot can be done with a little. Also this point is a good starting point for doing more complex things.


Confused?


So this stuff is hard to wrap your head around. I imagine the most difficult part is visualizing an actual solution. Despite all of the theory presented here, and all of the experiences we collectively have, visualizing this problem and its solution, at their simplest level, is non-trivial. In other words we have to work hard to see clearly.

The key is learning to see depth in story and depth in mechanics as a single thing. For a moment I am going to talk about Mario, in his 2D platforming days - days that still continue on strong, even in new games. We are going to look at how depth is achieved, by a designer. Then we are going to see how this depth, and flex, can be translated to a story, say in FF7. I feel happy about that.

So, here's some enlightening stuff about Mario. Imagine chess for a moment. Everyone knows chess is a "deep" game. The complexity is enormous, the variety is huge, the number of pieces, and their complexities, is small, and the rule-set is small. Cool, hunh? Chess is the poster-game for elegant design. But it has the obvious problem of being thorny to learn. It is near unapproachable, to players, in most contexts. But it is still good.

We can graph any game. We consider all of the options the player can take of a certain kind - say moving a certain piece in chess - and call that a dimension. 1 point exists in that dimension for every possible move - of say the pawn - for that one piece. If there are 10 possible pawn moves, then there are 10 points on our line. 

We then graph for other pieces. We repeat for the rook, and the knight, and so on. The resulting space is our play space. If you do not have an easy time visualizing these things, that is okay, for now.

Mario has a large play space. In other words, the number of possible ways to continue a game is enormous, once we consider how each possible move can be combined with all of the others. When two moves have a wide range of combinations, that create a wide range of experiences for the player, when he/she is executing them, then we see that those two moves are "orthogonal."

Orthogonality is a common concept in programming, when we try to make subsystems that work together well. An orthogonal business team is one that has strengths in its individuals that complement each other... giving them the ability to accomplish a lot.

Orthogonality is like team-work among elements: many possible outcomes for only a few small inputs. Chess pieces are orthogonal, and Mario often has orthogonal moves.

We must have orthogonal moves for our story. If the player can influence any decision in only 1 of 3 ways - say anger, curiosity, and fear - then he must be able to influence the story heavily by using only those 3 moves. If every move in battle has some influence on a subsection of the party, and enemies, and other NPCs, on those 3 dimensions, then the player will have a lot of influence over the narrative of the game.

Legitimate story branching is not our key reward here. We can lock-in all of our dialog, and allow the player only to influence the computer's understanding of each character's state. Those states are then reflected in various ways at most times, and influence how battle works.

Continuing On with FF7


The player will be given the ability to control the tone of story sequences, how a few major sequences play out, how his party's relationships develop, and will be given a much richer combat system. The game will feel a lot more free, and it will give the illusion of control, far more so than it already does.

You may not understand how such small changes, in the story, could be so meaningful, so I will try to show you how. Trust me, they can be meaningful. But if you can't understand why, read on, and feel less satisfied at the end. No, wait. This will work out, I'm sure.

The point is to show how freedom can be added with as little added content as possible. So far in our mod we're having to write maybe 20% extra dialog, do some serious work on what character's can express visually, in and out of battle, really identify how every character feels at every point in the story, find narrative meanings for all in-battle actions, and find in-battle modifiers that reflect characters' states. 

Okay, so some of this stuff is pretty hard. Actually, this stuff is already harder than straight-up designing a good battle system, much harder. This is one of the reasons narrative-and-mechanical mirroring is so rare: it is really hard to pull off. Unfortunately it is necessary for giving the player agency over the story. Yuck! Yum.

I am trying to open FF7 up to give designers the chance to make all story events mechanically meaningful. If something happens in the story, states of the NPCs (and PC) change. By understanding these changes the player can interact with the characters in such a way to get what he wants out of them.


Something Practical


How does this work? Let's say there is an underground current of emotion. Tifa in battle has a couple of standard reactions to Cloud behaviour. When Cloud attacks Tifa becomes more resilient. "Resiliency" is one of her state dimensions. Resiliency translates to defense, or maybe when she is attacked with a heavy attack she cannot be stunned - i.e. lose a turn, something FF7 doesn't currently do. 

Or resiliency increases cure power, or the effectiveness of defense spells cast by her. Maybe when Tifa is feeling more resilient her pose becomes more defensive, she visually "blocks" faster when attacked - in animation only.

Let's say a story sequence is coming up, that the player determines is relevant to Tifa. Tifa is going to be hurt emotionally, or surprised, or will feel abandoned, or something. He sees this coming. The player is reflecting on it. He investigates it. What should he do?

The player wants to increase Tifa's resiliency in battle. By doing this he prepares Tifa for what comes next. Tifa's resiliency allows her to not become emotional destabilized by what happens next in the story. We see this in her animation, as the story section in question is played through. The dialog does not change.

An emotionally destabilized Tifa fluctuates in STATE during battle. This makes planning harder, for the player. The player must adapt to Tifa's state on the fly, and has a more difficult time fighting.

All of this stuff seems complicated, but is so only at a conceptual level. Implementation is much simpler, as maybe we will see, I hope.

What are good state dimensions to have? We'll explore this later, maybe.

Dynamic Gameplay Systems


Next thing we'll talk about is how to restrict a player's actions so that he can only make choices that make sense. A lot of games already guide their players very well, offering a wide-range of dynamic constructions for their players to explore. They just happen to always do it with non-narrative elements such as combat and leveling. Whether or not the player feels restricted is entirely up to how restrictions are presented.

First example: World of Warcraft (WoW) talent trees are structured, and give the illusion of freedom. Why is the freedom illusory? Because Damage-Per-Second (DPS), or some other value defining statistic, is all that is needed by a player to be competitive. Most of a talent tree is nullified in value, because whole sections of it represent choices that don't have value: that do not satisfy the core desire the player has: choose a competitive build.

In contrast, Skyrim gives players a lot of freedom in its leveling system. That's what reviews of it say anyway. Maybe the freedom is there only because Skyrim builds do not need to be competitive; the game is more about exploration than combat. 

In Skyrim the player can level his character in a way that is more personal than how he can in WoW. The player isn't chained to one development path, because it is not true that a few select paths are better than others. The player isn't chained to his original decisions, because it is not true that he can't mix and match skills. He can experiment with skills before he makes a long-term decision, and all of the available skills have some kind of interesting use.

The kind of freedom a player feels when using Skyrim's leveling system isn't within the narrative. It is within the style in which he fights. While playing, he often thinks about the development of his combat style, and play style. He experiments, and occasionally makes a permanent decision, and lives with the consequences. Different play-throughs of the game, from different people or not, will likely produce different paths through the skill trees.

The constructs used to create this level of flexibility can be transferred to a different context, like story instead of combat, and be manipulated in similar ways to produce similar effects. The principles that raise elements of Skyrim's character development trees above WoW's, in quality, transfer with it.

Remember though that if Skyrim had a hard focus on challenge, and competitive builds, the freedom its trees provide would become nullified too, just like WoWs. In other words, Skyrim built "freedom trees," suited for its design. WoW built "calculation trees," that pretended to be freedom trees, because frankly, giving freedom in character builds, in a competitive game, is the tougher design challenge. That's why trees were dropped entirely from another of Blizzard's title's: Diablo III.


Anyway, skill trees are the ultimate analogy for controlling player choice in a narrative. Any narrative that has dynamic elements can be represented as a tree. This tree has parts lock down, open up, grow, shrink, and so on, in reflection of what the player can do at any point in the game. 

If you want a character build to make sense, or a story to make sense, you are dealing with the same core problem. You want to control character development, and provide freedom, and not let the player's decisions break the game... say by letting him break narrative pathways, or challenge curves, that were carefully designed.

For now I'm just going to let this analogy just sink in. The difficulties in building a good tree are even harder for stories than it is for character builds, and when you consider that we need such trees to have implications in both the story and the gameplay, to create our synchronicity, the complexity grows even further.

Ultimately all content generation, AI-driven game stuff, comes down to manipulating some tree, somehow. You just need good rules for the tree. :P.


Player Expectation and Choice


What's the parallel between story and combat? And what are the general principles that make Skyrim's skill system feel free?

A character can never "do anything" in a game, ever. That's okay. What matters is that he can do what is reasonable given the world that is shown, and the identity of the character that he is controlling. No one plays Skyrim and laments the inability to wear the best armor at the beginning. The player is "weak" then, so the restrictions placed on him for armor and leveling make sense. The player must gain experience and skills before further options are presented to him.

The Skyrim player is free in a controlled world. He can go anywhere he wants, do anything, and the leveling system will follow him in-toe, restricting his choices, tying him to his past decisions, and linking the development of his play-style, in one continuous game-play narrative, that underlies every experience that he will have.

Let's go back to player expectations. This will be an interlude, to help explain how we can structure a world so that a player's choices are meaningful, and not distracting, and good in other ways.

This first example is extreme, just for fun. I bring it up for clarity; my personal feelings about don't really matter, nor do yours. Think of it as an abstraction.

In Skyrim some players want to kill children. That desire, and expectation, makes sense to me. There is no moral foundation for the main character in Skyrim, so not killing kids doesn't make sense as a general rule. The rule doesn't follow naturally from the rules of the world, as they are presented to the player. 

So someone created a patch that allows the player to kill kids, almost immediately after the game's release. I think the patch is semi-popular, at least enough for people to know about it. The not killing kids rule sticks out of what is defined for the player-character and his situation. To eliminate the desire to kill kids the story would have to be presented differently. 

I never wanted to kill kids when playing FF7, but I certainly had the urge to when playing Skyrim. When I tried to hurt one once, like you can in Deus Ex, I wasn't surprised by the outcome, but I found it immersion breaking. I can nuke a town in Fallout 3 but I can't kill a kid in Skyrim.

I don't find the kid rule a poor one. I think it's fine if incest and racism are blocked as well. The point is that immersion broke because expectation misaligned with reality. If you're going to create a world of death, no repercussions, a character with a weapon and compulsion to slaughter, then confront him with children that have attitude - unless you're trying to create irony - and that could be valid - then don't expect the player to not expect, and want, to behead some little heads.

The reality is that fixing the problem isn't a major priority, and if on the Bethesda team I don't know if I would have recommended any fix without thinking hard about it. Without a serious, though worthwhile, redesign the lack of consistency is a worthy trade-off.

Maybe the developers could have made it so that all of the kids kept their distance from the player because he's scary. If the player could snap at any moment in the game - and he can - then everyone would be wary, especially kids.

No one asks why he/she can't jump in a less joyful way when playing Mario. That's because the player in Mario never feels like he should be able to, nor is his experience obviously diminished from not being able to do so.

The point is that expectation matters. Find a way to give a player a way to do a thing, if he expects to be able to do it. If you cannot find such a way, then remove the player's expectation by redesigning your game. There is always a solution to this problem.


Managing Player Expectation


In a procedural story the linear aspects of the narrative would play tag-team with the player's available options. The linear elements would bring the player to a state of mind, in which he would only want to choose from what is available. If an available option suits the narrative running in his head, then he would have no issue choosing it.

What if the player doesn't want any of the choices presented to him, and feels he deserves another? Such a situation is always a consequence of bad story telling, design, or the player playing at the wrong time. All of these problems are present in linear media, like books, and only the first two can be tackled directly by the creator. Note that "limited freedom" was not one of the items listed.

Players want to be engaged. They don't want to break immersion. Engagement is like a drug. What players do not like is a story that forces them to accept things that go against what they believe, in order to enjoy it. They don't want to be belittled, or bored, or given a story that doesn't make any sense, or requires effort that isn't worth the reward, or demands adopting a position that they feel is unethical or incorrect.

If as a creator you don't do the things to an audience that they don't like, then they won't have any problems: duh. Assume your players expect a choice in your game that they can't make. That expectation exists only because the associated choice makes sense to them within the context of the story that you have created.

If in a novel a character does something that requires the reader to accept something he doesn't want to, then immersion might break for him. If a player in a game can't make a choice that makes sense to him, then immersion might break for him too. The only difference between linear stories and procedural ones is this: when creating procedural stories designers line up players' potential futures with the past, and while creating linear ones creators line up consumers' only future with the past.

A game's designer has to capture the player in the same way an author would capture his readers.

This is a good time for an example. Let's say my player meets an NPC, and the player has these 3 options: ignore the NPC; be patient with the NPC, but carry-on with his business; or give an off-handed compliment to the NPC. The designer's responsibility is to ensure that all 3 choices make sense for the PC to be making, for the resulting reaction of the world to make sense, and for the resulting state in the PC to be one that the game is prepared to handle: so that future choices make just as much sense as the current one. Of course it would be nice if everything is interesting too, as well as making sense.

Note one of the harder parts developers commonly seem to encounter, and mismanage, is the process for ensuring that whatever resulting state the main character gets into, is still one that can be handled well by the system. In other words how can the player be given freedom without letting him branch the story so far off in one direction that we couldn't possibly have considered all the places he might take it? Preventing this isn't impossible, or even that difficult. It just takes design. I'll give some suggestions for how to do this later on.

You can think of the player's choices as branches in a tree. The further the narrative grows from the trunk, the more likely it is to spread out, right? Wrong. Only if you've designed your game a certain way is that true. The endlessly branching tree is a product of the most simple dynamic story design possible. It is not inherent to a dynamic tale. Remember player perception is everything. Give the player choices he wants to make and he won't care that there aren't any others. 

Players only want to make choices that make the narrative more engaging for them. They may laud not having destructive choices, but only until they realize they don't know what they are talking about. A reader of a book often goes through a period of not giving into the book's narrative until they've read enough of it. Players may first engage in the experience of exploring what a game is, in the meta sense, and will then eventually slide into a position of acceptance... as long as the developers don't fuck up. I'll show an example with the game Journey later to illustrate the player's experience with barriers.

If players expect a choice they must be given a choice. If they make many meaningful choices then they will feel free. The secret to dynamic construction is to make only a few meaningful choices available - I mean the minimum needed for the player to feel like he is always making them. Then you have to find ways to give those choices to all players. Is this possible? Yes it is! But that's super advanced theory, for later maybe. For now we're only going to be thinking about a tree whose branches all point inward, like this dense cloud rising up into the sky. Players have lots of choice in our game, but they exercise it in a small space.

Mario gives lots of choices doesn't it? That game is as restrictive as shit. How do you translate that to a dynamic story? I have played 0 games that have done it explicitly. Though many do it in an ethereal kind of way. Castlevania makes you feel like you are making narrative decisions as Mr. Vampire Hunter de jour, even though that's just in your imagination. Sometimes the simplest expressions of freedom are the best. Anyway, onward!


Recap


Procedural designers line up dynamic pieces instead of linear ones. Every possible permutation of their players' choices have to produce another set of reasonable choices, which themselves have to lead back into the linear aspects of the story that they have created.

Now we're getting somewhere. Note all of the likely combinations of skills in Skyrim fit together, sort of, to create a compelling play experience when the player is out in the wild. Even though the creators of the game couldn't play-test every build, they could make general statements about the kinds of builds players would have, and the kinds of experiences those builds would produce.

The Skyrim developers designed encounters that took these varieties of experiences into account. Instead of thinking about maintaining narrative tension and the game's narrative tone, they thought about maintaining game-play tension and game-play tone.

Procedural design is all about understanding what is generally true about any possible situation and how that relates to every other element of the creation.


FF7 and a Dynamic Relationship System


In our FF7 mod the player needs to be able to affect events. Let's focus on a single relationship between characters. In FF7 (the actual game) the player can play a love mini-game that takes place across the first disc. Partway into the game the player attends the Golden Saucer, an amusement park for rich people, and goes on a date, probably with Aeris (the one who dies later). However he can change who he goes on that date with by making various decisions over the course of the game up until that point.

The player can talk to characters in different orders at particular points and affect the outcome. There are also a couple of opportunities for him to "help" one character before another, or do so in varying degrees. The decisions he makes in those situations affect the date too. Sometimes he can make actual conversation decisions. If he does enough stuff right, apparently, he can date Tifa, Yuffie, and even Barret, I think.

Anyway let's try and expand this system so that the player can express a much wider range of emotion and control the way things play out in the future as a result. We want to give the player the ability to develop relationships with all characters, then have the state of those relationships determine things, like where those characters stand during story sequences, what they say, how they gesture, and what they do.

We'll keep the core narrative of the game. The major turning points and set-pieces we'll keep as well. We will focus on dialog and behaviour. Let's also say that Cloud's developing relationships, and his current situation, control what parties the player can form at various points. Let's also say that Cloud's relationships impact how he interacts with others in battle. Maybe the party-characters can make a few varying gestures in and out of battle. In the actual FF7 they already can make a fair number of gestures, and those are very cute in their simple polygon forms.

Let's also say that bonuses and penalties are conferred between the characters that reflect the behaviour and state of mind of each of them. The state of one character can translate into modifiers on himself, changes in his ability to interact with others, and how he is perceived. 

The player can't express himself directly. He can only make decisions that he would normally make. But both his narrative decisions made out of battle, and the game-play ones made within it, affect the development of his relationships.

Say the player heals Tifa with Cloud more responsively to her taking damage, like as a higher priority, relative to other characters. That could mean something. Maybe he always lets her cast the most powerful magic, or puts her in a position to let her Limit Break build and unveil her super attacks. That could mean something too. Maybe he casts particular effect spells with Cloud on her on a regular basis. That could also mean something.

Maybe the whole system comes down to timing. The mood of each character in battle constantly fluctuates. If the story has hit a point where Tifa is in danger, is in a state of love-conflict, then maybe Cloud has to react to that. If every attack and spell has an emotional effect on Tifa, and every emotional change has a visual representation - so the player can read her state - then the player can build patterns that keep Tifa comforted, focused, or whatever else it is that he wants her to be.

Battles are no longer just about defeating enemies, they are about choosing moves in a way that pushes the mental state of each of your party members in the direction that you want. One enemy is particularly irritating to Tifa. What do you do about that?

There's a lot of narrative meanings that we can create for each battle action that would match those actions' non-narrative meanings. As an example "cure" could translate to help, nurturing or protection.

Maybe Tifa likes Moogles and is entertained when the player uses summons that bring them out. Whatever assume we're creative. We can work to come up with many more good parallels between battle behavior and possible relationship-affecting interpretations, but for now I'm going to leave it alone.

No I'm not. Think about how much you can tell from a fighting game opponent from his in-game behaviour? A lot. What if we could program the program to detect those things? Whoa. That would rule.

Back to FF7. No? Yes. No, yes. Cloud's relationships also affect how everything works in battle. If Tifa is feeling really protective of the player maybe her cure spells do bonus health when cast on him. If she's fighting with Aeris over his love, as girls often do, maybe their rivalry, if they're in the party with him, can inspire them to attack more ferociously and stylishly. Maybe if they stay in that state of mind for too long they go berserk, and the player loses partial control over what they can do.

There exists a parallel between every battle action and relationship development, and every aspect of a relationship's state to something in battle. Finding these parallels so that they make sense is a lot of work, but the more you do it the easier it becomes.

A possibly big mistake here, that must be avoided, is to create a narrative meaning for a battle action that is at odds with its meaning within the mechanics. For example if Cloud doing something risky always makes the girls swoon, then that will invariably break immersion at some point. Cloud is risky but not to the point of stupidity. Also the girls aren't self-destructive. They are just isolated, and lack leadership and excitement. All of the characters want to win battles. A situation wouldn't make sense if the girls were to swoon when the player is making a decision that is clearly counter-productive towards the goal of not dying.

Games often draw parallels like these, between mechanics and narrative, creating a mirror. The particular parallels of interest to us are the ones that link together the meaning of a player's choices, as opposed to the actions he is forced to take.

If a decision's two meanings (narrative and functional) don't reflect each other from every angle, for the whole game, then that pairing has the potential to become destructive and is very dangerous. It doesn't have to be removed from the game, but I would remove it.

In a talk I saw Jon Blow talked - *gasp* - about the narrative dissonance between players saving Little Sisters in Bioshock, and the mechanical rewards for doing so. The mechanical rewards are the same whether the player saves the Sisters or not, though they are given out at different times. The Bioshock narrative shouts, "moral question," while the mechanics say, "it's good either way bro." You can see the talk here: http://www.youtube.com/watch?v=mGTV8qLbBWE

Avoiding this kind of conflict is difficult and takes discipline. Let's assume we have such discipline.

Let's go back to the in-battle gestures. Let's make these gestures match the opinions characters have of one another. Some of these opinions are long-standing and some form in response to the decisions other characters are making around them. That makes sense right?

Here is an example: Tifa does something stupid. Barret reacts. Maybe Barret is exhausted, just because. Also, "Tifa's shit about whatever the fuck... <something> Cloud" is on his nerves. He reacts in a way that indicates:
  1. That he's Barret.
  2. That he's black. ... keeping with FF7 form (yes the game is kind of racist).
  3. That's he's sick of Tifa's shit.
  4. That he's exhausted.
  5. That he thinks the thing Tifa just did was stupid.
This reaction also fluctuates according to:
  1. The state changes Barret has gone through already from the previous part of the battle.
  2. The standard fluctuations of being a person.
  3. Cloud's perceptions. 
The last one is tricky, because you want the player's perceptions to be slightly rooted in Cloud, but also kind of omniscient, because that's how the player is in the actual FF7. You can do some cool stuff with "changing the world" stylistically to reflect Cloud's perception, or lack of perception, as it changes, as well as shaping through them how other players react. The player of course is always trying to figure out what Cloud's biases are so that he can interpret his behaviours correctly, further tying him to Cloud's fluctuating emotional state. Whoa *wide eyes*.


STOP!


Have I lost you? 

What has battle become? How do all of these ideas connect? How are we telling a dynamic story? What is going on?

Okay look, the principle idea behind a dynamic story is that the story that is being told is rich and strong, and has branches that are independently meaningful. If our story can be represented as a tree - and all stories can - with every node representing a choice the player makes, or a random event (and every branch is a piece of story being told), then we can walk this tree and ask if each path is uniquely interesting.

If a story has only a single choice, with 3 possible outcomes, that story is most interesting if the 3 outcomes are all interesting, and rely on the player's knowledge of the game/story in order to activate them. In other words if I play for an hour, then make a choice, I want that choice to be borne on the knowledge I spent the whole hour acquiring. Logic! Too many people ignore this observation.

Also of course the 3 outcomes should all be distinct, and should all make sense, and there should be a strong connection between what I expected would happen and what did happen. Surprises are okay, immersion breaks are not.

Think about battle as being a game where the player is trying to change an enemy's health state from X to 0. Well there are some barriers. Characters have magic states (like Magic Power (mp) meters, and health states, and status states (like poisoned, tired, unconscious, and so on). What does the player pay attention to in battle? States! But these states are boring, and have nothing to do with the narrative. Hello synchronicity.

So let us say that all of our moves, spells, special moves, and other in-battle decisions are tools for modifying states of characters. Well shit, just make states based on the story too. Let's say that Toad in our earlier Mario AI-co-op example is tired. He is tired because something just happened in the story. Tifa can get tired too.

The player does not know that Toad is tired, or why he is tired. All we need to do is make the knowledge of Toad's tiredness relevant to play. If a magic spell has a status effect, a regular one like slowing an enemy down, and an emotional effect, like berating the closest party member for a recent mistake, then knowing the state of party members becomes crucial: so that you know which spells to cast.

How do we synchronize?

Carry on....


So we're back to FF7, and battle mods and so on.

We could make it so some characters offer insight into better strategies, or at least into what they think are better strategies, by implying decisions that the player should make, by gesturing in response to decisions that he has made. Maybe the bias present in these suggestions, and the level of effort the offering character puts into communicating them clearly, fluctuates with his/her opinion of Cloud.

Remember opinions of the characters fluctuate with the moment, and also demonstrate general trends of their owners' personalities. I can make any human laugh, even my greatest enemy, but making anyone support me through difficult times requires a strong relationship between the two of us. As people, our behaviour, and speech, and body language, are a reflection of our state of mind, and that is a reflection of our current perceptions and past.

How does a player-controlled Cloud communicate his opinions out of battle? I assumed that he would do so by controlling how much attention he pays to particular areas of the game, and to different characters and what they say, expanding the existing methods of expression used in the un-modded FF7's love mini-game. We can do a lot with the game's un-modded mechanics, but we would be best off adding a lot more.

For example the player could make gestures when other characters are talking to indicate his feelings towards what they are saying. Maybe he can't affect their dialog but he can affect their body language and various animations. Maybe the dialog can be affected if the player strays far enough from whatever his previous path was. We could create as much variability as we want.

Efficiently creating dialog, say to allow variety in the way it can play out, without wasting too many resources on dialog that is rarely used, is a whole other problem. Generating original dialog on-the-fly (from scratch) is actually a very similar problem, but we'll save that for another day: right? 

I can actually solve that problem. The solution is just... long. Character construction and dialog generation are related problems. Character construction and manipulation are related. Manipulation is sort-of, almost, what we are talking about. So there you go....

How does a player's knowledge of any character's state contribute to his success in-battle? Hmmm, we haven't totally answered this one yet. Maybe we will eventually and if we do then you will see the value of it. Our design is not good enough if battle is only a place to learn about characters, and manage their relationships, so that the right modifiers can be collected. Battle must also be a place to constantly indicate how well the player understands the story, and express that understanding fluently.


Our Mod So Far


Our mod's game-play variety comes in all over the place, but the player can't yet affect the story in deep ways. I'm assuming the date choice is now being affected by our characters' states instead of just the mini-game. All of the player's choices in and out of battle affect Cloud's relationships. Those relationships affect their members' behavior out of battle, and both their behavior and the functional meaning of their actions in battle. Battle actions also affect relationships.

By behavior I mean narrative behavior. If a character attacks that is an action. The functional meaning of that action is damage. A change in that meaning could be bonus damage, if the acting character is angry or something. Gestures, sound effects, and dialog are behaviors. These terms I made up. They just happen to be that way in my head.

In our mod the player is given an opportunity to explore the characters' personalities. The story is still structured. Maybe even the dialog is the same. What the player gets control over are a few key aspects of big story pieces, such as the Golden Saucer date, and the development of Cloud's relationships within controlled ranges. I'll talk about how to restrict and manage these choices in the next section.

First note, somehow, that the scope of this design is very powerful. Much of its execution is still an open question, and much of it still will be when we're done, but it's scope is very powerful. Be careful that that doesn't skip you by. If a player can benefit through the mechanics by understanding the story, in proportion to the degree in which he understands the story, and that value is significant, and necessary, and the story segments that he has to understand are as demanding of him as the ideal experience would be, then the mechanics will force him to engage. This is a property in design that is often over-looked, and may be more subtle than I'm implying. We'll see.

I should say that again. If mechanical success in a game is richly dependent on the narrative of that game, as-in the player must understand the narrative deeply, properly, in-order to succeed in the ways that are necessary (mechanically), then those mechanics will synchronize with the story. Several things must be maintained:
  1. The elements of the "story" that must be understood, in-order to gain an advantage in the mechanics, have to have their impact on those mechanics set in proportion to their significance within the story. If an element A is of 15% importance in the story, then it must be of 15% importance in the section of the mechanics that is altered by an understanding of the story.
  2. The mechanics must retain their construction "positives" no matter how much they fluctuate as a result of the player mastering the story. "Positives" are the things that make it good. This may be obvious, but it is difficult to achieve, so it is mentioned.
  3. The mechanical function of an action must reflect its narrative function.
  4. A mechanic can't go without a narrative reflection if like-mechanics have their own.
  5. A narrative element can't go without a mechanical reflection if like-elements have their own.
  6. Rules 4 and 5 can be disobeyed as long as it doesn't break player expectation, as discussed before.

There are some holes here I'll deal with later. Anyway, let's go back to the example. 

I'll assume that each relationship can only develop in a such a way so that both it and its contributing characters stay within what is plausible within the narrative. The player's joy comes in exploring these ranges. Each character goes through emotional (state) transitions throughout the game. They already do implicitly in the un-modded game. The difference is that in ours those transitions are explicitly stated behind the scenes. When the player makes a decision, say in battle, and another character reacts, he is effectively exploring that other character's state through a proxy. 

For example, if Barret is touchy because he's uncertain about his daughter's safety, that fact would ripple throughout all of his behaviors and in-battle modifiers. He would give subtle clues to the player about his state all the time. If would be up to the player to observe these clues, understand his state, then unravel the best battle strategies to take advantage of it.

In conversation, for example, Barret would give out indications of how he feels by gesturing as he talks, and as other characters bring up topics and things happen. Without sounds and only a handful of gestures we can time a character's expressions relative to the situation at hand to give away a wide range of information.

The player would be on the watch for this information the entire game. All of the linear aspects of the story line would point him towards it, and all of the mechanics would point him back. The narrative and mechanics would engage in harmonious synchronicity. 

Battle would become a place of exploring the game's mechanics, as usual, but also a place to explore what is true about the characters' states and relationships, finding the best way to capitalize on them for functional reasons, and managing them so that they develop in the best directions that suit the changing story and whatever desires the player has towards seeing it play out in a particular way, if that option is available to him and he is aware of it.

In other words, battle is a place of fun. The player is exercising as much explorative control of the narrative in battle as he is of the mechanics... or maybe not, and the split is like 30/70. His decisions have narrative and mechanical consequences, and he simultaneously learns something about the mechanics and the narrative with every decision. If he can master both, then he can succeed grandly, both in battle and in the few cases where he can control the story.

Relationships could be developed in anticipation of changes in characters' states that will respond to upcoming narrative sections. For example, strengthening a bond with a particular character before being isolated with him for a long stretch of time, or supporting a different one before a sequence that will be emotionally distressing for her, may benefit the player in large ways when the associated narrative sections plays out, and maybe for some time after.

Unfortunately the transitions the FF7 characters go through aren't strong enough, or interdependent enough, for the anticipation of upcoming changes paying big dividends to be convincingly plausible. Though I can think of many situations in the game where the characters "feel" something unique for the scenario, and independent from each other. If the player could understand what each character is going through at each point in the story then our game could reward him in battle in big ways. 

Cloud's leadership implicitly develops over the course of the game, even though he just sort of hangs around most of the time. The player has little issue with this because he is Cloud and has to go through all of this stuff as him, so the rewards for doing so make sense to him, because he has to do a lot of work. I felt that way when I played through it, all 8 times. It would make more sense if Cloud had to actually relate to the others by being the person he needs to be in-order to give them the inspiration they need to pull through. After-all, all the characters are supposedly going through very challenging times relative to anything they've been through before.

The details for how this stuff works; and how all mirrors can be generated; and how to balance the combat so that the necessary narrative/functional harmony can be achieved without disrupting its depth, variety, and pacing; are all things that still need to be talked about. Some of these things I'll get to and some I won't, at least in these posts. 

Next I'll talk about how to keep the player on the narrative rails.


Controlling Choice


In our mod the player can only ever make choices that make sense, within the context of the character's personality and situation, because we say so. Deciding what choices make sense for the player to be allowed to make, within that context, then restricting those choices accordingly, is interesting, and requires drawing a parallel to Skyrim's skill trees.

We want the character to only be able to do things that make sense within the current point in the narrative in which the choice is being made. We need to know the following at every point in the game:
  1. Character state.
  2. Which options are possible.
  3. Which options retain narrative consistency.

In formal terms:
  1. The character's current state: his "personality" and current state-of-mind.
  2. Which options should be available to the player given the situation's reality. These constraints are about what's obviously possible.*
  3. Which options maintain narrative consistency, such that if chosen the consequential narrative is as plausible and engaging as everything that came before it, hitting the narrative quality standards set for the game.

    * Mario can't throw a fireball if he doesn't have the correct suit. A character can't insult a partner to start a fight with him if that partner isn't present, though he can do so to damage his reputation. A character can't hit another with his hand if it is currently missing

There are a couple of things to think about here. There's an even more challenging question, than the implicitly raised ones above, regarding which options produce a character that sets up future scenarios to be optimally engaging. I'll tackle this one first.

An easy example of it not being answered well is Fable. In Fable the player can be evil and get the story-shaft as a result. The evil guy gets less story. As a designer you do not want to allow the player to make decisions that will circumvent his enjoyment of future gameplay. You also want to control his decisions enough, so that he can't go off the rails and make your planned set pieces irrelevant or contradictory, to everything that came before them.

WoW is another good example of offering self-destructive decisions. So is Diablo II. Like WoW, Diablo II lures the player into spending his points unwisely i.e. early or on the wrong skills. If the player succumbs to that temptation he is competitively fucked forever. We do not want to let the player do that to our story (his story).

Consider gating. Gating is in every game. The player needs the fire arrows in Zelda to light the far away torch. He needs the requisite party level to beat the boss in Final Fantasy. He needs to save the hostages before he can leave the area in... many games.

We can do some stuff with gating so that relationships and characters can't go beyond what's reasonable, as defined by us, and ruin our planned sections. Consider Doom. Doom gives the player freedom within a level but always forces him through a door at some point. The designer knows for sure which doors need to be gone through, and in which order. There is a finite amount/number of monsters, guns, health, and level to explore between doors (gates). We can restrict character development and choice between areas in the same way.

The gates in stories can be environmental, for example. Maybe the main character in our game needs to climb a mountain. Maybe he needs a certain degree of "courage" to climb said mountain, because we've built it specifically to be that way. Maybe that mountain is filled with challenges that suit our narrative in such a way, so that it is obvious to the player that he requires "X" amount of courage to face them. The character would need to get that level of courage before he could climb that mountain.

Thus the player would for-sure have his courage within a particular range, when he reached the top of the mountain. Whatever set piece we have up there could make some decent assumptions about what state the character is in when he arrives.

Our gates could require any definition of the game's state including the characters' personalities, experiences, assets, relationships and so on. We can also gate using characters. Consider this example. The game says to the player implicitly, "Tifa won't come with you until your relationship with her develops to a certain point." It is easy to blend a gate like that into the story. If the story requires Cloud and Tifa's relationship to be in a certain place then the player won't feel constricted in having to obey. He will enjoy taking on the role of the character, if of course the restriction makes narrative sense to him.

This kind of gating is just like the one used in Doom. Instead of key cards there are character state requirements. We can also think about Metroidvania. Metroidvania is more player-driven than Doom, at the macro level: when its timeline is considered from a more zoomed-out perspective. Doom gives mass freedom between controlled points, while Metroidvania gives mass freedom in choosing between mostly linear sections.

To translate Metroidvania to our story game, just replace gates that require power-ups, with gates that require ranges of personality the PC needs to be in.

Maybe a certain gate in our game needs the player to have evolved a certain level of "teamwork," with at least three other party-characters who have complementary skill sets. Maybe the proper development of that teamwork requires at least a certain degree of experience owned by the player, in areas that suit each of the other characters' life stories, in homage to the earn-your-teammate's-favor missions in Mass Effect 2, but better. Maybe those experiences require the player to overcome a range of challenges that are gated themselves, pushing his character's development in a particular direction, and so on.

If we want to build a gate we have to do the following:
  1. Make a gate that requires a character's state to be in a particular range to pass through it.
  2. Fill the area before the gate with gameplay that will allow the player to get what he needs to pass the gate.
  3. Make this area and the process of getting what's needed within it engaging.

In formal language:
  1. Create a narrative element that, within the realm of our created world, reasonably requires a certain "space" for the player character's personality to be in in order for him to pass or meet it.
  2. Give the ability for the player-character to develop in the required direction by filling the area before the gate - the one the player can access, wherever that may be - with stuff that will allow him to do so.
  3. Design the areas accessible before gates in a such a way so that their navigation - say for acquiring the experiences that are necessary for passage through those gates - maintains an at-standards gameplay experience.

I'll create an analogy using standard gameplay systems. Final Fantasy gates narrative with bosses, dungeons and exploration. If the player can't beat a boss he can always level-up near by or buy items at a shop. If he doesn't know who to talk to, or what to do in the narrative, he can always ask around or travel to an old location for hints. When the world opens up in the final act he can go anywhere, allowing him more freedom in the way he prepares for even tougher challenges. All Final Fantasies open up slowly over time. It is a signature aspect of the franchise.

Final Fantasy devs can always make reasonable assumptions about what "state" a player's party will be in at any point. This assessment includes a party's items, experience and possible character developments. FF games sometimes give you narrative choice.

There's a short-coming in Final Fantasy's gating system, however, that I'll explain for fun. In any FF a player can potentially level far too much, say because he's a jerk, and make the boss battles anti-climactic. He is left to control his own level of difficulty. That can lead to more frustrating and/or passive experiences for him than what is ideal.

Generally the time spent grinding is a kind of punishment and acts as motivation to push players to move the narrative forward and only level when needed, but it is far from perfect. The player can technically level up to a bazillion right at the beginning of the game - Lete River hack in FF6 anyone - though it is unlikely. The player's rate of levelling would dimish over time if he fought the same monsters repeatedly, so its unlikely he'd do it for too long. 

To control difficulty more acutely in Final Fantasy its devs could have created larger jumps between the amount of experience different monster give the player's party. By tuning these number they could have easily controlled the likelihood that a player's party was going to be within any level range at any point. They could also have exerted the same degree of control over gold, items and so on.

The increase in experience that monsters give a player over the course of the game in Final Fantasy, and the increase in necessary experience needed by a character to gain a level, is an ancient form of variable gating. It is for controlling a party's strength. 

Imagine such a gating system applied to any aspect of a character's state. We just have to find a way to mirror it effectively. Narrative and functional death is often mirrored well in games, as it is with the constriction of hallways, resting in beds, eating food (sort-of) and so on.

You could say the cops in GTA are just a police force for the player's level of whimsical fun. If he could do whatever he wanted his sense of tension would wither. So the cops come in to keep it fluctuating, making it last. They don't manage the choices of the character, not as it's reflected in the narrative, but the choices of the player. Just imagine similar police forces in our game policing our characters, and blending into the narrative just as well.

One of the best ways to police a character is with other characters, but I'll discuss that later. Actually, it is almost always the best way for policing the dynamic elements of a character. Gates can still be used for static things.


Maintaining Narrative Consistency


How do we determine that a player-controlled character's possible options maintains narrative consistency?

There is a very strong knack for matching the functional meaning of our gates to their narrative meaning. But even if we gate perfectly how do we decide whether or not an individual choice makes sense? How can we be sure that the player understands what is needed for the next gate? How can we be sure that he doesn't get caught in a cycle of choices that lead him nowhere, as-in never to the point that allows him to cross the gate in question?

Dun, dun, dunnnn. Dynamic Difficulty Adjustment (DDA) comes in here.

Some review. We know for sure that we only want to allow choices that make sense in the narrative. There exists a series of relationships between a character, his world, and his choices that we can understand relative to the desired play-experienced for our game. The general case for understanding these relationships is so abstract that I think you'd want to shoot me if I started explaining them, so I'm going to stick to our linear example: FF7.

FF7 already has a very controlled narrative. We want to allow only small modifications within it. We want to set up gates that allow us to guide the player to the right linear pieces, which are everywhere, and we want that guidance to be invisible. We also want to create an experience that feels at least as natural as playing the game already does, and maybe a little bit more since we're adding more player freedom (*wink*).

But first, DDA


DDA and its Narrative Equivalent


DDA (Dynamic Difficulty Adjustment) is all about managing the player's engagement by fluctuating the game's difficulty to ensure that the degree to which he feels challenged cycles in the space between being frustrating, and being boring. Look up "flow," and "challenge curves," for some stuff if you're interested. There's a basic diagram to the right. Google Jenova Chen's (masters?) thesis on flow if you're extra curious. It was the basis for the design behind his game Flow.

Anyway, DDA applies directly to the current problem. Instead of trying to control difficulty to stay within an ever-morphing ideal "challenge space," we want to control the narrative to stay within an ideal "this is an engaging story" space.

We also want for our narrative not to jump around in that space in disrupting ways. We don't want our game to jump difficulties in a way that the player isn't prepared for, so in the exact same way we don't want our game to jump narrative interpretations in a way that the player isn't prepared for. The only difference is that narrative control is a lot more complicated.

Note, most theories on DDA don't focus on maintaining challenge for the player while adhering to a basic structure, like having built-in climaxes and plateaus and things like that. We have to talk about how that would work before we can talk about story, sort-of.


Advanced DDA


Proper DDA requires that a game understands how challenged its player is. Let's assume we can measure how challenged our player is. For the game to still be interesting the DDA system must also adhere to some general structure that paces the game, creating a challenge graph that suits the narrative.

Measuring what kinds of shifts the player can handle is actually an endless topic to think about, because there are an infinite number of things a system can measure to determine what kinds of difficulty shifts a player can handle, and in what kinds of situations.

Going further, proper DDA requires a deconstruction of the different kinds of challenges a game offers, because a player's sense of challenge, and his ability to deal with its shifts, unique to the kind of challenge being presented, is unique to each person.

Beyond that, a player's sense of difficulty is unique to each play session. Sometimes players are tired, drunk, have a headache, are coming down from a fight with a GF, have just done a lot of programming etc. Each state of mind can change what a player finds difficult, how long it takes him to regain his previous skills, how tolerant he is of particular challenges and so on.

But let's forget all that. All those problems shift to narrative and they're scary, so let's pretend they don't exist. Also, narrative regularly shakes the bag up just for fun. We don't need to solve them for our project anyway. The dynamism of a game is a slider. Making our story a little responsive to the player's decisions is enough for now.


Defining a Character


In our FF7 mod Cloud can behave in battle. He can behave out of battle. Those behaviours affect other characters. Those characters' states change. They gesture, move, do, and speak differently accordingly, both in and out of battle.

Battle decisions have narrative and mechanical consequences. Out-of-battle decisions have either narrative consequences, or both narrative and mechanical - say shopping the item store with Tifa, instead of the treasure-trove flower bed with Aeris. Most decisions ripple out to affect the rest of the game.

Assuming we're gated out the ying-yang how do we maintain narrative consistentcy between gates from one decision to the next?

Say we restrict Cloud's behaviour so that he can only influence other characters in 4 dimensions, representing a character's 4 "base emotions." We would probably pick more than 4, but for the sake of a simpler example we'll stick with discussing 4. Let's make our emotions rage, courage, love and introspection. Courage and introspection aren't really emotions, and love is more like a state of being than a feeling, so let's call all 4 emotions dimensions of state, or emotions. A character can be defined using any properties we like.

The player controls Cloud's behavior and that impacts Cloud's state based on the type of behavior, its execution and the situation. It also affects other characters who are around to perceive the behaviour. Sometimes things happen in the world that affect Cloud's emotions. The characters can affect each other.

A character's state fluctuates in response to every event in the game, whether initiated by the player ot not. Also, time spent within any state, relative to the surrounding situation, "bakes" that state into the owning character's personality. A character develops relative to their changing state over the course of the game. If he spends a lot of time feeling courageous then his base level of courage rises naturally.

It all comes down to:
  1. A character's state.
  2. The state of the world around him that is currently affecting his state (i.e. what he perceives).
  3. A player's choices.
We can restrict a player's choices by gating. There is another technique which I will call the "watch dog" that acts as a special kind of gate. It is a persistent gate that travels along with the player. In Final Fantasy party annihilation is a watch dog over the party's health and status. In those games the player can make any battle decision as long as it doesn't kill him. If he does die he is forced to revert to a save. There are more elegant ways to punish a player but let's stick with the simplest methods first.

We could make it so Tifa leaves Cloud if he moves beyond a certain state, ending the game. Or we could just make it so Cloud can't develop beyond a particular barrier. If he's angsty all the time, to an extreme, then maybe the player can't push him to be any more angsty than that. In that situation a decision that would otherwise raise Cloud's angst would no longer do so. He would max out. 

This kind of barrier has a strong chance of being disruptive to the player, depending on how it is used, like a 2-foot high impassable fence. Sometimes the better option is to introduce penalties instead, though fences are unavoidable. Sometimes RPGs block off areas because there are no assets to see in them, or they're containing something for later. Sometimes these barriers seem natural, and sometimes they do not. Blocking off narrative choice is similar. Whether or not it feels natural to the player comes down to what he expects, based on what the game has taught him to.

We can also set up variable watch dogs that adjust punishment relative to how far off the path the player goes. The variable experience rewards in most RPGs, for different monster classes, adjust rewards in proportion to how far above the difficulty curve the player has risen, effectively punishing him for grinding too much without progressing the campaign. It does this by forcing him to waste time in increasing amounts, in proportion to how far he strayed from the ideal challenge path. Tifa, for example, could become less useful in battle, in various ways, if Cloud moved too far from where he needed to be emotionally. The punishments could escalate the further he slides.

There are better ways to do this. Those are just some examples.

What we want to do is define spaces for the player's character to exist in. Imagine we have a graph in 4 dimensions that represent Cloud's 4 dimensions of feeling.  We can graph a typical play experience in this 4-d space. Visualize a 3-d space if it is easier. Over time Cloud's state would move through this graph.

Now compare that graph to the tension curve of a good movie or something. Our graph is the same but with more dimensions and flavour.

Here is a tension graph.




A movie has a single line in its graph. Let's say we wanted to graph not only the audiences tension but every emotion they feel. Let's say there are N emotions a person can feel. Then there would be N dimensions in the graph, with the line still representing the average path of a viewer's state over time.

The graph for our game is similar, except we're mapping a character's state, and instead of a line we have a probability space that represents the likelihood that that character will feel a particular way (at each point in time). I'll call this space a character's state probability-space.

I'll explain that again. The above curve represents an audience member's state of tension over the course of Star Wars. We can control a player's tension in a game by using different kinds of gating mechanisms, like bosses and so on. We can also control any aspect of a character's state in the same way.

Even a game like Battletoads uses gates in deep ways. In Battletoads a player has to beat the challenges in a level, and then the challenges in the next and so on, in a pre-defined order. If the game is too hard it ends. The player would have to try again. As the player improves he has to stretch his lives out, wasting fewer on the lower levels, increasing their difficulty. Whoa.

Imagine a sock that fits around the line in the above graph. It is not a normal sock and gets thinner and wider at various points. At some points it hangs from the line, drooping below it, and at others it sticks out in weird angles, as if poles were spreading it out or someone dropped a bunch of variously shaped objects inside it. No matter what the sock stays around the line.

That sock is our probability space. Manipulating spaces requires the same principles as manipulating a line. We just have to do it in more dimensions, and we have to use a gradient to represent a likelihood instead of a line to represent an average. It's kind of like spreading the line out, as if it were made of thick peanut butter.

The standard challenge graph, shown way above, shows a space without a line. Imagine a line moving through that space (the white part) in some funky way, then imagine adding 10 more dimensions. The ideal number of dimensions is actually N, where N is the biggest number we can implement, but it's always easier to visualize in 3. The sock is the probability space, and the line is the most likely case. Of course the probability space changes densities in interesting ways all over the place.

We can manipulate probability spaces with gates and variable gates (i.e. variable watch dogs). We just have to adjust those mechanisms to set rewards and punishments so that if a player strays too far from what is determined appropriate by us he is gently pushed back on track. These things are declared dynamically i.e. the system says: "A character's state has free roam in these areas under these conditions at these times. If he strays into these other areas, he receives these punishments. If he strays into these other areas, he receives these other punishments. These punishments are set up in proportion to the situation and where the character is in that space." Like that.

As a simple, and maybe lame, example, the game could implicitly say to the player through the narrative, "feeling any more angst than 8/10 in the first 20% of the game is unacceptable and Tifa will leave you if that happens, and your adventure will end." It could also say, "feeling any more angst than 6/10 isn't great, so your character will take some kind of penalty in battle if he goes beyond that in the first 20% of the game." We would just have to blend those gates into the story. If it makes narrative sense that Tifa would respond in the way that she does, then our barriers and the player's interaction with them would actually increase their engagement, and thus sense of freedom, even though it's technically limiting them.

Note, you can also do fancier stuff. You can variably punish the player with Tifa. Maybe the player enters into a "danger zone" of angst where Tifa has a 35% chance of doing something the player doesn't want, through the mechanics. Maybe the boundary between the danger zone and the safe zone is unclear. The randomness of the punishment will make the player more wary, meaning he won't even try to ride the edge of the danger zone. He'll steer far clear of it. Randomized punishments, or rewards, that kick-in at appropriate barriers, are more effective than predictive ones. Also, this is the way people actually are (random, to appearances). You can get super fancy and make Tifa's behaviour totally dependent on her state, and then just have her state fluctuate according to some function you've created that defines her mood. In which case the punishments(/rewards) would still be random, but according to a system that the player is now doubly motivated to uncover. That final solution is the best one.

You can create several different levels of danger zones, and have different types for different things, and have them overlap, and have them shift over the course of the game, and have them shrink when the player performs well in particular ways, and so on. Manipulation heaven.

Back to thinking.

Which child feels more free, the one with a parent who has no rules, or the one with a parent who provides enough structure so that the child spends half of his time doing productive things? Think about it carefully. In the long-term the answer is so clearly the latter that the former is a kind of abuse. The second is normal parenting.

It is really important that we make sure that our gates and watch dogs line up with our narrative. Doing so is easier than it sounds... but I won't explain it much more here. Maybe later on I'll do a big example.

You could imagine Skyrim's leveling system as having a similar probability graph as our game's. The difference with Skyrim's is that players would nullify parts of it by committing themselves to certain builds as their character levels, though that kind of commitment would exist in most procedural stories anyway.

There are a lot of techniques for designing our narrative control mechanisms so that they match the narrative, and so that the player doesn't feel pushed around when interacting with them. Most of these come down to the same principles that allow us to match our mechanics and narrative in a linear story.

We just have to make it so the options available to a player and their corresponding consequences make narrative sense. If the player is called on a journey then it makes sense that the world is set up in such a way so that he can complete that journey.

There's an interesting Extra Credits episode where they compared the game Journey with the universal story structure "The Hero's Journey," covering all the parallels. They said that at first they couldn't find the point in the game where the player, "refused the call," to make the journey asked of them. But when they watched players play they observed that the players spent much of the beginning of the game trying to wander off the set path, "refusing the call." Over a play-session each player would slowly stop doing so, eventually coming to accept the constraints placed on him/her.

Here is the link: http://www.penny-arcade.com/patv/episode/the-heros-journey-part-1

If you don't know what the Hero's Journey is think of Star Wars. An unassuming kid leads a normal life, receives a request to gear up for adventure, refuses, changes his mind, receives guidance from a teacher, gains skills etc. This pattern is a universal one. It appears in Greek plays and everywhere else.

In the above example with Journey the call to action was refused by each player. That element of the experience wasn't forced on the player by the narrative. In fact it wasn't even suggested. Each player did it on their own, invariably. Each player's interaction with the narrative's boundaries actually contributed to the experience. Cool.

The only difference between Journey's barriers and the one's in our FF7 mod is that our barriers are partially determined dynamically, based on the player's choices.


Closing Thoughts


Here are a few questions that I haven't answered yet and are related to this post:
  1. How do we match actions to state changes in the general case?
  2. How do we design a state probability-space to be interesting to travel through?
  3. How can the mechanics retain their delicate balance when they are always fluctuating in response to the story?
  4. How do we make interesting narrative parallels for what happens in battle so that we can get complete, and effective, coverage of both. In other words, how do we blend narrative exploration into battle more fluently? So that:
    1. Every narrative element can be explored in battle?
    2. That any understanding of the narrative can be used for mechanical benefit in battle?
    3. That every battle-action has a reasonable impact on characters' (and the story's) states?
      This is by no means an easy thing to do.
And of course the bigger ones:
  1. How can a player's decisions affect the narrative in deeper ways and more often?
  2. How can these changes produce a wide range of results without sacrificing quality?
Read my next article (not posted yet) to see a deeper look at how a character's state is defined, how it interacts with his world, how players might introduce totally foreign concepts into the system, and the first steps towards answering those two big questions. Later on I'll swing back to answer the first 4.

If anyone wants to hear more about how to apply a particular idea that I've written about, give me your thought process regarding it. I'll answer easy questions directly and the hard ones I'll take into account for when I write another one of these, if I do.

If I can see your thought process that will make it easier for me to understand how to reply.