This is the first in an occasional series of articles about thoughts I’ve been having on procedural storytelling over the last five or six years. Most of the things I’ll rant about / speculate about are things that I’ve been thinking about for a while now, but haven’t as yet had a chance to put into practice due to a packed real life. Hopefully setting them down here will either get me off my backside to do something about them or will inspire someone else!
A quick background: I’m a console and PC games developer who’s also worked in interactive TV and film. I’m also a published author of fiction — kid’s books and pulp novellas — and a screenwriter, and have spent around 20 years creating and playing live events and tabletop roleplaying games. Mostly, I’m a storyteller and world-builder. A lot of these thoughts are the result of mashing together the things I’m interested in.
The purpose of these articles is to explore ideas about changing the experience of the player procedurally; both in the story and narrative, and in the experience that the player gets out of the game.
There are obvious procedural things you can do, such as generate quests for an RPG (but so few of those are satisfying — one of my followup articles will go into some ideas about how to improve this). There are perhaps less obvious targets; things which can be procedurally tweaked to heighten the drama of a scene or to direct the flow of the game.
This stuff is already being done (and has been done for years), in various games, in various ways, with varying levels of success. I’m not claiming to have invented anything here; I just think there’s a lot left to explore, and it all sounds fun to do.
Before we get going, I suppose there’s the age-old question “Why?”. Here’s a few thoughts, by no means exhaustive:
- The more content that can be created procedurally, the fewer tailored content items the team have to create.
- The more of the game content that can react procedurally to given variables, the fewer items that need to be re-authored when the design of portions of the game change during development.
- The more of the game content that can react procedurally to given variables, the less data about the game that needs to be stored, so the smaller the game file size.
- The more content that can be created procedurally, the longer the potential playing time of the game.
Note that I don’t think procedural storytelling or narrative is the be-all and end-all. To me, a good storyteller beats anything currently done by a computer. These are just incremental experiments I’ve been thinking about.
The Experience Director
So to the first topic, which I’m calling the Experience Director. By ‘experience’, here, I’m referring to what a player experiences as they play through a game; the overall flow of the game. This isn’t about creating procedural quests — that’s for a later article. This is about procedural tricks you can play to enhance the player’s experience of a game. Adding drama, tension, pacing, and controlling the flow of the narrative. These are all the sorts of things that a good film director thinks about, or a good level designer — or perhaps a better analogy is that of a tabletop GM.
Has the player been fighting hard for the last few minutes? Find some way to give them a break. Are they hanging around in an area seemingly unable to progress? Throw signals of some sort to them to direct them on their way. Or spawn creatures right behind them to chase them along. Want to cut them off as they’re about to reach freedom? Drop a pile of rocks in the next tunnel…
These are all things that game designers and level designers put into their levels all the time. But those are static set pieces which will unfold the same way each time. Can we make these things much more dynamic, reacting to how the player is playing or to how a procedural world is formed?
When I propose an Experience Director, I mean a bit of software that constantly monitors the player’s state in the game; state being a flexible thing that might cover health, status, what they’re looking at, what speed they’re running away from something at, what items are in their inventory, what type of armour they’re wearing, how frantically they’re mashing the fire button, whether they’re nice to a particular NPC… whatever’s necessary to track, and which then alters the game based on that state. A set of feedback loops targeted specifically at heightening the game experience and making it more entertaining and dramatic.
Left4Dead 1&2 are some of the best examples I’ve seen of this so far. Left4Dead 1 has something called the AI Director:
“Instead of set spawn points for enemies, the Director places enemies in varying positions and numbers based upon each player’s current situation, status, skill, and location, creating a new experience for each playthrough. The Director also creates mood and tension with emotional cues such as visual effects, dynamic music and character communication. Moreover, the Director is responsible for spawning additional health, ammo, weapons, and Special Infected, like the Witch or the Tank.” (from Wikipedia)
Left4Dead 2’s AI Director can also block or open pathways to funnel the players into specific areas, and can turn on or off clues to point the player at specific points.
This is nothing really new — listening to state and responding is what games are all about — but it’s a great starting point for the sort of suggestions I’m making. It takes the focus away from ‘simulate a world’ (which feels so prevalent in many open world games) and puts the focus right back on ‘simulate the player’s experience of the world’. Which is all that really matters.
This sort of manipulation could be used for all sorts of things in all sorts of game genres. Running the enemy encounters for an FPS to support an authored high-level story, for example. Controlling a lot of an open-world sandbox, guiding the player to or from encounters and secrets. Controlling game dramatic flow — have we had 3 fights? Let’s generate a quieter encounter now.
How Do We Build One?
So, now we want to write an Experience Director. What’s our best tactic for achieving this? How do we know what we should control with an Experience Director, what state to track, and what to do as a result?
My suggestion is to build the rudimentary mechanics of your game and start playing it. Then get someone who’s good at game design to sit down next to you, to watch a play through and make the sort of suggestions that they would if it were a static level. Listen to what they have to say, then code up behaviour to measure the current game state until it hits the same conditions that your designer has noticed and make your game respond appropriately.
Here’s a simple example. If your designer is watching a play through of a level and says ‘well, he’s really low on health at this part of the level — we shouldn’t place any more monster encounters.’ Fine; instead of not placing spawn points on that part of the level, instead write code that monitors the player’s health and decides to withhold spawning at runtime if the health is low.
That gives you massive flexibility — if the player has carefully stored up health when he gets to that section, then the game will automatically give him a challenge; if he is really badly beaten up, monsters just won’t appear. If you like, you could change the response — instead of withholding monsters, you could spawn extra health packs. Oh, hang on — this system doesn’t just apply to that section of the game, it applies to the whole of it! Well then, you could parameterise it — on some levels you could make it deadlier by having a lower health threshold… and so on, and so on.
Throw in a few of those systems, all co-operating, and I think you’ll see you could have the makings of something really interesting.
It’s also worthwhile watching lots of play throughs — or even recording them — and starting to watch for patterns. Does the player always go for the collectables in a level first, before talking to characters and moving on? How can we disrupt that pattern or make it more interesting with some reactive behaviours? It’s all about feedback loops, basically. :)
Here are some thoughts about the sorts of things an Experience Director could be programmed to handle:
The obvious one. Measure how well the player is doing at any given point, and tailor their encounters to suit. This can simply be ‘don’t put in so many attackers’, or could include throwing in extra health packs to help them out, scaling the attackers’ damage dealt or hit points and so on. The next article will go into this a bit deeper.
AI Spawning and Enemy Control
Where shall we spawn enemies? What type? How aggressive are they? What are their goals? Tailor them to their current environment and the player’s current situation.
Ebb and flow of tension through the game. Been fighting for ages? Give the player a break. Got a big encounter to build up to? Ramp up the difficulty level slowly; maybe pull everything back at the last minute to shock them. You can apply this to the whole game, or to individual combats: ‘have they had enough yet? no — throw another wave at them’.
Procedurally control the camera to suit the mood and the state the character is currently in. Consider borrowing from cinema — is the player currently winning? He should be looking down on his puny foe. Is the player losing? Drag the camera down, have the bad guys tower over him. Is there a particular boss coming in to a fight? Make sure it’s in the player’s eyeline. Want the player to feel lonely and isolated? Pull out until he’s in the middle of the screen.
The game says the player should be nervous right now. Spawn some creatures over there in the woods; have them make noises. Switch the music to ‘tense’. Apply a light wind to the trees. Knock out some colour saturation. Borrow cheap tricks from soap opera. 🙂
The Carrot and the Stick
The game wants the player to go to a specific place. How can we make that happen? Lead them on by signals to draw them in that direction, or give them a character to chase. Or stick bad guys behind them to push them forward. Or rearrange a maze, or put roadblocks on a street. Or even move the encounter closer to the player, if it’s a fully procedural world, so that they definitely stumble over your set piece.
There’s nothing revolutionary about any of this, but in the days of indie game development, procedural ideas are starting to bubble up again — mostly due to budgets, if nothing else. 🙂 I hope this sparks off a few ideas for you; in the second article I’ll go deeper into reacting to the current stress level of the player.