Monday, July 25, 2016

Star Wars 7

Now that a few months have passed and I've rewatched the new Star Wars movie, it's time for a critique! I know this will have a widespread, profound effect on its sales and box office performance, so I had to think about it for a while.

My hatred of JJ Abrams is pretty well-known, and in the end that's going to be a huge shadow across this review. I have no respect for him as anything other than a very limited action director, even when backed up by seriously skilled heavy hitters. But let's talk about the movie.

First off, the movie is pretty decent. Better than the prequels by a long shot. Probably my third favorite Star Wars movie, and that's not bad at all.

It has very charming characters, most of whom are excellent actors. I love the newfound diversity, it makes the universe feel even bigger. I love the artful blend of CG and practical effects. Several of the sets are extremely nice, the props are all top-notch. The music and sound effects, of course, couldn't be much better. And the comedy bits are often in service of the characters, which is rare and very welcome.

Now, let's talk about the crappy parts!

I went with a group of 9 people to see it in theaters, ages 7 - 65. Several of them had seen it before. And we all came out of it confused and dissatisfied by the same elements. Some of us liked it, some of us hated it, but we all went "what the heck was up with that?" about the same things.

A big example was the tie fighter crash - you know, with Poe's coat. All of us were annoyed by that whole sequence.

But upon watching it again on DVD, I found the explanation was clearly written into the script, probably even shot correctly. It was just slapped up for a mere half-second and attention drawn away from it. Upon watching it knowing what to look for, it's clear that Poe takes off his coat, hangs it on his seat. It's clear Finn is ejected, so Poe obviously could have been, too. It's clear Finn finds the coat on the front canopy, not near the rear of the ship where Poe was seated, so it must have shaken free from the seat before it ejected.

The explosion still makes no sense, but let's just let that action schlock slide.

All of those elements are just fine on the written page. You can see the writers saying "THIS is how we'll give Finn that coat". Unfortunately, those elements weren't given to the audience on the screen. Even the parts that were on the screen, such as Poe taking off his coat, were not lingered on or highlighted. Instead, they were background elements in clips where the focus was clearly elsewhere, and even those clips were really tightly clipped.

This is how a magician does things - distract the audience with one hand while doing something with another. Unfortunately, if you do that in a movie, you end up with an audience that never knows you did the second thing and presumes you just have a basket full of continuity errors.

There are several elegantly written arcs in the movie, that one included. But half of the things on the screen are choppy and slapdash, badly paced and unpolished, like someone was in a hurry to slap more action on the screen.

For example, the double-defection of Finn and Rey, where they both have the exact same "I'm scared and gonna run away" arcs separately, within the same minute. This is a very badly paced element, and I can only presume that's not how it was originally written. Perhaps there was more time between them, or perhaps it was written so that Rey felt lost and betrayed by Finn and that was given time to grow on the screen to seed her own fear. Perhaps there were two scripts written, each with one of the characters panicking, and then for some reason both arcs were filmed and smashed together.

Another example: the murder of Han Solo. This is an amazing scene to most RPG players, because that's how a really good dark side arc in a game would go. It's completely legit, very powerful, especially the "thank you". It makes sense narratively and within the rules of the universe, as well as fitting in with every character.

Unfortunately, what we actually got on the screen wasn't so good.

"They're on your father's ship. You know, Han Solo, your dad?" "Yes, my father, Han Solo." "He's your dad." "Oh gosh, Evil McEvil noticed I still have good in me, gramps!" "Our son is up there, Leia!" "Our son, Kylo?" "Our son Kylo, Leia." "Grandpappy, help me, you're my grandpap." "He has good in him!" "Who, our son, Kylo?" "Kylo, yes, our son." "My dad landed on the planet." "Your dad Han?" "Han, my dad." "Oh, that dad." "Gramps, give me strength!" "Hello, Kylo my son. You still have good in you!"

I have a feeling that the writers knew half their scenes wouldn't get to the screen, so they just wrote twice as many and crossed their fingers.

I get that feeling a lot, actually. Because this movie has two plots, and they are both pretty sad.

In one plot, a bigger, badder Death Star sits on its butt in the middle of nowhere waiting to be found. In the other plot, a bigger, badder Luke sits on his butt in the middle of nowhere waiting to be found. Both are full of plot holes and neither is even vaguely compelling or personal.

It's clear the "bigger Death Star" plot exists because Disney wanted to prove they were oldschool Star Wars fans who were going to make oldschool Star Wars movies. But it's also clear that they thought that plot was pretty threadbare, so they stole a plot from a different draft and shoved it alongside.

I think either of these plots could have been made hundreds of times better without much trouble by simply choosing one. If either had more screentime, the glaring holes could have been explained away. Instead, they're pushed past with action sequences in a desperate attempt to gloss over everything.

The third plot - big baddie that runs everything - is established as a next-movie thing, but it also looks extremely uninteresting. I've already covered all the ways they could have made that interesting in an earlier essay. For example, it could be a holocron. That'd be amazing: all the Sith are gone, it's just one dumb kid with delusions and a holocron, but the dark side still manages to be a threat.

Any way you cut it, the movie could have been a lot tighter with different priorities. The inclusion of clips like "whoo, damn that pilot is good!" and the exclusion of clips like explaining why they had the last 2/3 of the map on a galaxy view but still needed the first 1/3 means that the whole thing feels very schlocky, as if the only thing that really matters are the action setpieces and a few pieces of comedy for pacing.

I have to wonder. The editing seems pretty tight, so why are there so many clips and sequences that don't seem like they fit right? Why is there such a laser focus on stuff that would have been great either way, while letting stuff that could have been great lay as unpolished stumbling blocks? Is this because of the director? It sounds like it might be the fault of the editors.

The editors Mary Jo Markey and Maryann Brandon, JJ Abrams' primary editors for almost all his films.

I hate JJ Abrams.

Sunday, July 10, 2016

Games Writing: Thematic Elements and Motifs

So, I've been playing a lot of games that get a lot of press. Most recently, I played Metal Gear Solid Five.

This essay's gonna be full of spoilers for it.

If you've ever taken lessons on writing books or movies, you've probably learned about themes and motifs. These repeating elements bind your work together and make it ring. Done well, they lead the audience straight into your premise and bind them to it before they've even noticed.

In video games, these are even more important. Not only are they more effective, but they are also more easily applied than other writing elements since they can be worked into any part of the game, including both cut scenes and raw gameplay.

Let's talk concrete a bit. Let's do some MGSV spoiling!

One of the motifs of MGSV is the idea of being ripped apart but having to live on. Missing limbs, missing voices, missing pasts, missing futures. This motif is so prevalent it's literally the title of the game: "The Phantom Pain" refers to the main character's missing arm and, through it, all of the other linked elements in the motif.

The motif isn't used as well as it could be. It's really only brought up right at the beginning and then again in Skull Face's final scenes. It could have been a lot stronger by linking it into the many times pain or loss is brought up. The child soldiers lost their families and that pain pushed them into a life of murder and violence... why not frame it as a lingering pain? Why not link it to Big Boss's missing arm with a simple camera pan?

These seem like small things, but they really aren't. Having good motifs and themes will make your story resonate for a lot longer. Like a trumpet, you need to have a funnel of themes for the player to breathe through, and then the note will ring out loud and clear.

I kept playing MGSV in hope that they would pull it together, but they never did. Kojima was, as usual, focused almost entirely on flash and glamour instead of the underlying power of the story. In the end, the plot was a muddled mess.

How could themes have helped? How could motifs have brought it together? What was wrong with the writing in what most people consider a gem of a game?

Well, let's consider the revenge element. This is a theme that rings pretty clear, it's brought up a lot. I don't consider it very convincing, though: there was never really any time I felt "in tune" with the main cast's lust for vengeance.

That could have been helped by some pretty subtle changes to the game itself. For example, instead of the utterly useless chicken hat that they keep trying to force onto you when you fail a mission, they could have marked your murderer and made it very hard for him, in particular, to spot you. And it could stack - if you are killed by 10 different people in this level, 10 people are now a bit blind.

This would be more universally useful than the chicken hat, but it would also push the player towards taking vengeance. Not only are they angry at the jerk that murdered them, they know that person is now weaker and open to retribution... or at least open to being snuck past.

There are a lot of other vengeance-related gameplay things you could have done - for example, causing me to actually lose any of the NPCs I cared about would have worked. But that doesn't happen until the heart of the vengeance arc is complete.

There's no doubt that the vengeance arc is the strongest arc in the game. The intention with this theme is to show that everyone's actions descend from a deep rage, a lust for vengeance. It could have been addressed clearer, but the basic idea is extremely solid.

And it has an extremely powerful ending. Themes and motifs are intense, and can be used to build up a finale that leaves a hell of an impact. If you do it right, people will remember your story for decades. It'll stay in their head.

In MGSV, the vengeance arc comes to a head with the death of Skull Face. Injured and trapped by debris, Skull Face is at the mercy of the two main characters, both of whom have lost limbs to his schemes. Instead of killing him, they blow those limbs off of him, then tell him to kill himself if he wants, and walk away.

It's a hard-to-watch scene and a dark note, but then the stupid engineer nobody likes simply goes over and shoots him. Then goes "yay! I got vengeance!"

This would have been the perfect ending, if it had been paced a little better. Two people obsessed with their deep, decade-long fury set up their brutal plan for vengeance... and then some little shit with a small, recent grudge ruins it to take vengeance himself.

That could have been perfect, turning the whole concept of vengeance into a sour note, a farce. It would have been subtle, understated, and heavy. Like a trumpet, one of the best ways to use a theme in the end is to have it ring hollow.

But that's not what MGSV does. It doesn't pace it right, it doesn't hit it cleanly, and then it immediately sweeps away to a long set of interminable speeches that have almost nothing to do with vengeance. Even if they were about vengeance, they're filling a gap - a hollow, ringing space that needs to remain empty. The trumpet turns into a whimper when you fill the bell with glitter.

You can argue that the "real ending" of MGSV is better and not flubbed, but just as an example, this is how you would have turned the vengeance theme into a powerful ending.

The difficulty is that you really have to trust that empty space. The themes and motifs don't need your help, they need space. The player has to have time to digest it and let it grow. But once it does, it will stay with them forever.

Bioshock Infinite is another example of a badly flubbed ending, but in BI's case it was all done subconsciously. Say what I like about Kojima's lack of depth, he at least uses his themes consciously. Levine does not.

As I was playing BI and getting steadily more annoyed, I started to suspect the themes were used consciously, and the touch was just incredibly subtle. Of course, that wasn't the case, and BI's plot ended up being trash.

What themes?

It's clear that BI was written by dads, and the trashy plot progression seemed to be leading to one hell of a powerful ending: DeWitt had to learn to let his daughter go, let her be her own person, maybe even kill himself to save her from his own endless meddling.

All of the game's muddy and backtracky plot elements - all the racism, all the sexism, all the old friends you have to kill, the other me, the past me, the future me, the alternate daughters that have all suffered at my hands - all of that would suddenly shine and shout if it turns out that the problem is just me. It's all... me fucking it up. Me judging it by my own biases. Me acting to protect and control, only to end up poisoning everything because my grip is too damn tight.

I know some people liked the faux-philosophical ending of BI, and I won't say you're a bad person for it, but it doesn't hook into the themes and motifs set up during the play. And the reason is because Levine didn't realize he was including themes of being an oppressive daddy figure. He just... is one. It bled in naturally, mixed with the natural juices of murderous first-person gameplay, and turned into a truly noxious mix.

It doesn't cost anything to get an ending right. It's actually cheaper, because you don't need another fifteen minutes of pomp and glitter. Just a slow pan across a scene you already built.

But it takes an enormous amount of trust in yourself, in your writing, in your editing. It takes a lot of convincing to tell yourself "the game should just... end here. I don't need to make a long speech. I don't need to set up the next game. I don't need to do anything. I can just... hold here for ten seconds and roll credits."

There are plenty of movies and books that do just that. For example, Fight Club. Fight club's ending is probably still in your head. You probably remember it even now, the self-inflicted gunshot, the burning city.

But in games it's super rare. Games are too nervous to let things sit, to let things ring on their own. Devs want to fill that space, and in the end it just muddies things up and leaves the endings tasting of sawdust.

What's the last game ENDING you remember?

I bet you remember a lot of middles! But the endings?


Anyway, this essay was just written immediately before bed, no editing. I hope you enjoyed it anyway, let me know what you think.

Wednesday, July 06, 2016


Recently, a lot of people have been referencing Richard Fine's video on ScriptableObjects. I'm gonna go ahead and rebut it.

A few details: I loved ScriptableObjects. I made videos about how to use them. I certainly don't dislike Richard Fine, I think he does pretty solid work. But I think his obsession with ScriptableObjects is really muddying waters, and his video is misleading.

Things have changed in the prefab world.

Used to be that if you wanted something shared everywhere, you used ScriptableObjects. No matter the scene, no matter the situation, references to that ScriptableObject would point to the asset in the project, and one change would change it everywhere.

However, in the past few years, prefabs have grown a lot of muscle. It's easy to overlook, because prefabs wear baggy clothes, but now you can (and should) use prefabs for many of the things he recommends using ScriptableObjects for.

(And for the rest, you should use a real database.)

You can reference uninstantiated MonoBehaviours now. You can read their values, call their functions, trigger their events - all without instantiating. What does this mean?

It means that everything ScriptableObjects used to be good for, MonoBehaviours can do... and can unlock much more powerful patterns than ScriptableObjects tend to allow. Unity was built around the concept of prefabs and MonoBehaviours, and now we can merge that power with prefab referencing.

Let me describe the patterns I'm using in The Galactic Line. These are MonoBehaviours-with-muscly-prefabs patterns.

The Magic Mixin
I have a lot of space ship parts. I don't like instantiating them, because they're heavy: they have LODed visuals, sound clips, lights, lots of stuff that I want to leave on the cutting room floor if the ship is too far away to see... but I still want to simulate the ships. Hundreds of ships you can't see, still being simulated as their resources drain away and their mission timers tick up.

Ships are easy enough to simulate, but you need each of their parts to tell you what it does as time passes. What does this reactor do? It drains water and creates power. It drains antimatter and creates power, heat, and radiation. It's pressurized. It's not pressurized. It has these external visuals and collision meshes, these internal visuals and collision meshes. It makes these sounds in these situations. It has beds in it for some reason. Or maybe not.

When I get close, these parts resolve into a GameObject. They have to, because we have to see them and hear them in the scene. I could bend over backwards to avoid making a prefab... but why? It makes sense to make it a prefab, that's what prefabs are for.

The problem is that I want to access all that juicy functional stuff without instantiating the part.

I could make all of them ScriptableObjects, but then we have a staggering number of floating loose ends. A radiation-production ScriptableObject saved off in some other directory, values specific to this reactor. It makes more sense to have a radiation-production MonoBehaviour and stick it onto the part. I can just customize it right there, no need to have dangling assets. That's what the GameObject is for.

And I can access all of that directly, without instantiating anything. If I want to know how much power this reactor creates and how fast it guzzles fuel, I just ask it. If I want to know if it's air-tight, I just ask it if it has an air-tight mixin. If I want to know what its UI thumbnail is, I just ask it. Want to know what sounds it makes? Just ask. I need to simulate ten weeks of warp travel? Just ask it for those values and multiply by ten weeks.

I can load everything I need onto the part prefab. It doesn't matter how complex the part is. It doesn't matter whether it involves nested objects or flat mixins. Modders can clone and alter the part, and it won't screw up the default because the values are per-prefab.

In addition to being super easy to take care of and keep track of, I can then just drop it into the scene. Whether it's in play mode or edit mode, I can drop it into the scene and it will instantly be the thing it is. I can mount in anything I want, visually. LOD? Or not. Lighting or not. Hell, additional cameras displaying to holographic monitors? Sure. Sounds that play differently depending on how much the generator is being taxed? Why not!

In this way, anyone can create ship components, drop on the relevant mixins (such as "Reactor" and "PressurizedSpace"), save it. They know what they'll get, and the game engine automatically optimizes to prevent any bloat. Advanced users can hook UnityEvents up to create nice triggers and visuals, or even create new scripts. Just drop 'em in. No loose ends, no complicated dependencies.

Now, if the thought of a largely undifferentiated ball of objects makes you cringe... this method of creating and saving content is a fundamental in Unity. This is how Unity is engineered to work, and this is how it works most easily.

You can engineer around it, but why? Use the engine in the way it's meant to be used, and you'll have a much easier time of it.

The Meta-Instantiator
My ships have a lot to keep track of, but I don't instantiate any of the parts if I can get away with this. This means I can have a fleet of Star Destroyers, each containing thousands of crew members, and from the perspective of the game it's just a bit of data that gets processed whenever it needs to be.

The ship has a link to the blueprint prefab for the ship class, which in turn contains all the ship parts. If I instantiate that blueprint, I get a nice, shiny ship full of visuals and noises and stuff.

But I don't have to instantiate it. Instead, I crawl through the parts compiling a list of all the resources and potential mission parameters and that jazz. A small algorithm calculates out the next "keyframe" in the ship's future - when the mission completes, when resources get dangerously low, when it reaches its destination, etc.

The universe sim trickles forward at whatever pace the player wants, and when the in-universe time hits that keyframe, we crawl through the ship again to find the new situation and calculate out the next keyframe. This simple method allows us to have thousands of Star Destroyers without any slowdown at all. No per-frame update, we don't even really need an in-scene object to represent them. (And, since they're probably 500 light years away, that's good.)

Well, we get close to a fleet of Star Destroyers, and therefore the ones nearby start getting instantiated into the game world. The player accidentally rams one, breaking one of those big engines. An NPC commander is generated and yells at the player.

Oh no, this is awful! How do we remember things like a specific engine being broken, or a specific commander existing? We're just referencing a blueprint!

... just save the instance as a custom ship.

Since the blueprint contains a reference to its prefab and each component contains a reference to its own prefab, we can do whatever we want. We can easily save this "baked" blueprint, and then compare its stats to the changes in the definitions of things like engines and reactors. We could even just save the one damaged component, and leave the rest as references.

We can also generate a mission to repair the ship, and when the mission completes, we can delete the custom blueprint and restore it to an ordinary blueprint reference. We could also save the commander - either as part of this ship or separately, as we prefer.

Unlike a ScriptableObject, a prefab can easily be cloned, compared, reloaded, partially cloned, merged, instantiated piecemeal...

The Monster's Database
If you're a fan of ScriptableObjects, hopefully by now you're thinking "well for your specific application, sure, but IN GENERAL-"

Most of the uses of ScriptableObjects are as data objects. The big advantage is that there's no extra stuff.

For example, I have a list of various factions and species. If each was a MonoBehaviour, I could drag it onto a property on another class in the same way as I could do with a ScriptableObject - it'd automatically resolve the reference to the prefab as a reference to the specific MonoBehaviour on the prefab. It'd behave exactly like a ScriptableObject, but it'd have a GameObject lurking in the background being... nonoptimal.

I mean, why would you ever instantiate a whole faction, right? Just drag it into the scene? You'd never need that, so it's just junk stapled onto my data class!

I could argue that it allows for mixins, but we already did that. Let's argue for something else.

Before that level of garbage starts to get noticeable, we run into another problem: managing hundreds of ScriptableObjects is just as obnoxious as managing hundreds of prefabs.

There's a reason why GameMaker and RPGMaker use databases for this kind of thing: databases are a really great way to handle it. You could manipulate the editor to create a pseudo-database front end for your ScriptableObjects (or your prefabs), but... JUST MAKE A DATABASE. It's faster, less overhead, and can be easily exported and imported from Excel or an HTML form or whatever.

The big problem with databases is that it's hard to drag a specific entry into a field in the inspector. I don't know the best solution for this, right now I'm using an editor trick to fake it, but it's not very good.

In the end, my thoughts are simple: if you have dozens of entries, you probably need a database. If you have only a few, the extra garbage of having a GameObject attached isn't enough to worry me, and you can usually leverage mixins to add a lot of extra functionality on the cheap.

The Custom Prefab
My argument is simple: the prefab is now more powerful than the ScriptableObject.

In the video above, Richard Fine creates a ScriptableObject to handle playing custom explosion sounds. This is the part of the video that upsets me the most, because it's a magic handwave that hides the fact that it does nothing useful at all.

There's no reason to have a ScriptableObject "ShellExplode" floating around separately from the shell prefab that's going to explode. Just put it on the goddamn shell. Even the "play mode editing" would work the same way, because you're editing the prefab and it gets instantiated every time you hit shoot!

And, of course, now you just have A Shell Object instead of a shell object and some random dangling object in another directory that may or may not be referenced correctly. Moreover, you can easily clone the shell prefab and create your Big Boss Shell and your Tracer Shell and your Rocket Shell, tweak away!

It's not magic, it's the way Unity is built to work best.

The idea that a prefab is somehow "fragile" is not true any more. The classic example of a ScriptableObject is that if you have ten monsters, they can all have the same stats and you'll never "accidentally" edit just one monster to have different values.

If you have a lot of monsters, you'll probably be using a monster spawner that references a prefab, rather than hardcoding every monster. Even if you do hand-place each monster, changes to the prefab automatically update instances, as long as the instance's values haven't been manually altered. This works per property.

So, for example, if I have ten orcs and I want one of them to have extra HP, I can increase the HP. And I change his AI role to "leader". And I add a potion to his inventory. And I put a hat on him. Later, I change the orc prefab's damage from 4 to 6. The orc I modified will have his damage correctly updated, while still keeping his hat and potion and HP and AI role!

Sure, it's possible to accidentally change a value and not realize it, but that seems inconsequential compared to the overhead of needing a new, permanent asset file in your project directories for every slightly tweaked monster.

That's the point of Unity. The point of Unity's entire approach is that you can tweak things in scene view! Using ScriptableObjects to "work around" that is like "working around" the game of basketball by taking out the ball. Yeah, you could probably come up with something, but it's not going to be a very effective use of your basketball pros or your basketball courts!

Use Interfaces and Delegates
I've seen a few other arguments for ScriptableObjects - for example, externalizing coroutines so you can plug them in willy-nilly, or using delegates bound up in ScriptableObjects to do things like flexible AI processing.

Just... uh... just use C#.

Not to sound elitist, but C# has delegates and interfaces already. Use them. Don't find an excuse to wrap them in ScriptableObjects, just mainline the stuff.

Unity's support for these in the inspector view is kinda crappy, which is the big argument against it. Fortunately, you can use UnityEvents instead of delegates, and those do show up in the inspector fine.

Interfaces are similarly inspector-unfriendly, but they're very powerful and useful and don't limit you to either a ScriptableObject or a MonoBehaviour - you can use either, or even a raw C# class, or have instances of all three for different applications that are referenced from a single system!

Personally, I think using MonoBehaviour mixins as implementations of interfaces is really underestimated, but that's another topic entirely.

Use ScriptableObjects
Am I arguing that ScriptableObjects are useless?

No, not at all. They are more optimal than prefabs, so if it occurs to you to use them, you should use them. They're especially nice when it comes to instantiating them outside of the scene, or moving references between clients.

Fundamentally, ScriptableObjects are classes. That is, you've written lines of code. I generally suggest using them when you can write less code by using them, and I tend to find that means situations where I need to create and track arbitrary references and complex data.

I've stored options menu defaults in ScriptableObjects, level code, galaxy definitions...

But, in the end, I've never found them to be much earthshakingly better than either using prefabs or raw data. So I only use them when I'm in the mood to optimize.

ScriptableObjects CAN do a lot of things, but that's because they're a C# class. They're not substantially better at those things than either a MonoBehavior or a C# class. Any optimization you can get by using them is marginal, and they don't offer any particularly astounding new patterns or workflow.

I'm not against using them. I just don't want people to think they can do these amazing things... without ever realizing that simple prefabs can already do those things, and many other things at the same time.

Tuesday, July 05, 2016

Galactic Politics

The 4X genre is incredibly stagnant, and nowhere is that clearer than in the complete failure to offer any kind of political gameplay.

This means that the 4X games are always going to have that fourth X: "Exterminate". If you can't really build a relationship with other nations, you don't have any choice.

There have always been vague, hamhanded concessions to those of us that like "pacifist" gameplay, such as cultural victories or voting for yourself in the galactic senate, but these are very passive experiences that don't feel as strong as the warfare gameplay.

There's no reason for that. Let's do a very easy experiment: let's re-engineer Stellaris so it has political gameplay.

And by "re-engineer" I mean "a mod".

Stellaris is a very flawed game, largely because they tried to extend the midgame but didn't add in much midgame play. We can fix that by adding in politics, and it doesn't require much of a change at all.

Trade Fix
First, let's get rid of the "trade" system. We're replacing that with a new way of gaining favor and benefiting from other nations. Instead of trade agreements, we should instead have outreach activities - they fill the same spot and work in the same way, but there are a few differences.

(This makes more sense to me anyway, since individual diplomats would handle details.)

One is that activities have an in-world color. Rather than donating 200 energy, you spend 200 energy hosting a Glarthian history exhibit on your homeworld for ten years. Or you spend it on Glarthian refugees. Or you spend it on raising patrols on the border, creating a trickle of material input due to seized smuggling goods.

The Glarthians will respond in a way that makes sense to their culture, which means different activities will result in different things from different cultures.

The best thing about this approach is that the activities can adapt to the current relationship. The treaties can still exist: if you close your borders, certain things become impossible and others become possible. If you're in a defensive pact, more things are possible and some of the "getting to know you" ones are scrapped. Even during an outright war, you'll still have political actions you take take: to lay the groundwork for peace, to exploit their weaknesses, to perform spy actions.

It's outside of the realm of a mod, but it'd also be pretty easy to set up N-way activities by simply allowing you to invite people to help you do the activity. Whether it's hosting a Glarthian history month or setting up an economy-shredding blockade, just invite anyone you want.

Since Stellaris has colonies that are very building-centric, let's introduce some political buildings. Museums, market districts, embassies. We can even put them on space stations!

Some of these are multi-purpose. Market districts give a steady flow of materials, while museums decrease cultural drift (already a thing in Stellaris). But they also affect the relationship between your nation and any nation whose border is within N light years of the installation.

Rather than trying to get a +1 trust per month by randomly spraying them with credits, how about we use these buildings? Because colonies have limited space, this produces some wonderful new tradeoffs. Right now, having a colony crammed against a few borders is a panic-inducing state of affairs, but how about if you dedicate that colony to international politics? Now it's establishing good relations between you and them, reducing or even reversing the penalty for having borders touching.

Since the colonies are inhabited by populations with explicit values and traits, we can make those buildings modify the populations on the affected worlds. Xenophilic groups will tend to pop up, and if possible, we could add species-specific xenophilia as the people on the planet learn to love Glarthians specifically.

We can even have the various facilities push different traits. Embassies might create pacifism, while museums might create xenophilia (if near a border) or xenophobia (if not near a border).

This would let us take advantage of the already-existing population engine, and a clever person could seed xenophilia throughout a neighboring nation, then use outreach activities to put those populations in power and change the nature of their empire.

Now imagine if that xenophilia was specific to your species! Or imagine it was pacifism, and you've changed a warlike nation! There's a lot of potential to let the player customize their approach.

While it'd be tough to mod it into Stellaris, it'd be fun to have some control over the pro-you factions in other nations. Right now there is a faction control system in Stellaris, why not have foreign factions that you have some control over in that list?

One thing that's easy to overlook is that the Enterprise was always as much a political vessel as a science vessel. Why don't we add a few new science ship components?

Specifically, political/outreach facilities. You can research and upgrade them just like sensor kits.

Ships with political facilities will automatically improve relationships with whoever they are orbiting. As long as you have open borders, you can use your science ships to wage peace.

We could have the facilities mirror our colony facilities, allowing us to create traits such as xenophilia or a physics specialty or pacifism on the planets we orbit, instead of at random. Moreover, this would mean we could park our science ships over our own planets to mold our own populations in that way.

Although it'd be hard to mod it into Stellaris, it'd be nice to have another category of science mission: political outreach missions. These might pop up at random, or maybe you have to survey worlds again every few years to have a chance of uncovering one. The science ships with outreach modules can perform these outreach missions and things will go better between your people and theirs.

There's also how to counteract these cultural attacks. Even closing your borders doesn't completely prevent them. So why not have some more policies, facilities, or science ship components that specifically negate the effect of museums or science ships, preventing your people from developing traits you don't like.

And, of course, you can take political stances that force them to back off - cultural preservation or something.

There's a lot of potential here, and it's so close to being something we could simply mod into Stellaris.

So... why are 4X games so stagnant? Look at all this stuff we could be doing with it!

Wednesday, June 22, 2016

Technical Stuff

Last essay I posted about how we might think of using the power of a linear RPG in a nonlinear way: we can use predefined arcs to strongly seed random content. I got a fair number of people saying "how?", which is not surprising because my explanation was "It's easy... (There, I just cut twenty pages from this essay.)"

Well, here are those twenty pages.

We need to generate random content as the player explores, but the issue is that we're not really trying to create "a random dungeon". Each content chunk that unfolds is huge and bombastic, in linear-RPG fashion. We don't enter a random level of a dungeon: we go to a whole new star system with a bunch of plot events woven into it.

This is both easier and harder. It's easier because this part is so much easier than generating random dungeons. It's harder because we do, eventually, have to generate random dungeons.

The heuristic for generating content is simple: while it can be largely random, it needs to "make sense" to the player.

One method of doing this is keyword filtering. So all the pieces we use (factions, types of places, scripted NPCs, events) have plus and minus keywords.

For example, a toxic jungle planet might have +colonize, +toxin. This means the planet generates those keywords.

By filtering to keep things matching keywords, we can link the planet to subsequent (or prior) pieces of content. When placing something on the planet, we would choose something that hits at least one of those keywords - for example, a new colony. It has the keywords +colonize, +economy, -monsters, -toxin.

The new colony matches the colonize keyword and conflicts with the toxin keyword, both of which are considered good things from a storytelling perspective. So we know that any quest lines involving the colony can "spread" to the wilderness of the planet either in alliance (+colonize) or conflict (!toxin), which allows us to generate minor sidequests such as "Go find toxin samples" or "go help our scouts look for more colonizable locations".

Creating a big list of such sidequests is pretty straightforward, and can use dangling dialog fragments that get hooked into whatever faction is involved. It doesn't much matter whether the colony is full of humans or elves or quarians - anyone can say "go find toxin samples" and have their combat units seeded into a generic map.

The key to this operation is that now there are more keywords in play. The planet alone only had two: colonize and toxin. Now we have economy and monsters as well, and can place elements that match any of those. This can be used for "large" pieces of content (an orbital trade station that has the +economy tag) or "small" content (a sidequest where a batch of monsters is discovered, but it's just a sidequest).

You can see how this creates a web.

Moreover, we've just been talking about places, but each place has to be inhabited by at least one faction, which grows the keywords even further. If it's a quarian colony, that's radically different from a human colony, and that will be reflected in the keywords in play, which in turn will change the sidequests you'll discover.

The quarian keywords are pretty complex, with tags like "+life-support" and "+scrounge". These keywords are unlikely to match very many big places, but they will generate sidequests such as "the life support is offline!" and "scrounge us up some stuff". They may also generate NPCs involved with those keywords, or sub-maps such as garbage depots and life support facilities.

These submaps and quests would feel random and arbitrary if linked into a human colony, since the humans exist to talk about underdog newcomers struggling to integrate. But those missions are core to the quarian experience, so it'd feel pretty good and suitable no matter the exact situation.

Subquests can involve just one place, but in general we'll want to create threads. We should engineer our subquests to do just that by having keyword-driven subquests that involve multiple places, probably all linked by the same keyword, although often inverted (IE, a +monsters and a -monsters location: monsters flood from one place to the other.)

Simple example: the quarians might have a life support problem at their on-world colony, but if there's also a quarian ship in orbit, they both have that keyword. We can use a two-site variant on the mission, perhaps "we need life support components from the ship" or "both have life support failing for the same reason" or even "the ship's life support is failing and we'll need to bring the crew to the colony as it explodes!"

(There's no reason a sidequest can't alter a location, either by destroying it, changing it to a different location, adding/removing keywords, etc. We just need to mark those quests with suitable dialog tidbits to make the player aware that they're about to Change Things and give them an option to back off for a while.)

By bringing multiple sites into a sidequest, we create a reason for players to move. Backtracking sometimes has a bad connotation, but in this case it's absolutely vital to provide a sense of place, a sense that things exist in the same world. Because of this, our sidequests should often have "feelers" written into them - for example, a human on the trading station above the planet might say "the colonists on the planet have been ordering a lot of toxin filters, but we're totally out..."

These can be opportunistic optional elements. IE, the sidequest is (1 +life-support location) with a bunch of keyword feelers for luring the player in, like (+economy: "Totally out of those toxin filters") and (+cutting-edge: "Our filters aren't compatible with their old junk...") None of the feelers is necessary: you can simply trigger the mission by vising the location. But they link the location to the rest of the universe and make it feel real.

That's the simplest secret: linking the random elements together to make them feel real. Whether that's by having missions that span several locations/factions or having a mission that simply gets mentioned in other places.

When generating content, it's also helpful to generate depth-first instead of breadth-first. That is, rather than generating each planet of the solar system, then generating the things on each planet, you should instead start with the most important planet, generate a location on it, generate sublocations for that location, generate a new location, etc. Then generate the next planet when that planet's filled up, etc.

The reason for that is the keyword density. If you generate all the planets without any subelements, each generated planet is only going to "read" the early planet keywords and the star system's base keywords. IE, things like "radiation" and "inhabitable", but not things like "scrounge" or "economy".

By generating the densest areas first, you allow the outlying locations to support them. By the time we get around to generating the moons of the gas giant, we have a big list of keywords. Populating the moon, we'll be able to filter for matches against existing content, giving us moon bases that support the overall arc of the core content. IE, we'll have a moon base related to economy or life-support or whatever, rather than just a random generic moon base.

Visiting that moon base will show us a small selection of sidequests related to the specifics of the base (+economy: "Get two corporations to play nice together", +economy: "pirate attacks are interfering-->moon base destroyed"), but also a bevy of feelers reaching out to content in other places ("The colonists keep ordering toxin filters, we're out of them!", "I've heard there's monsters on the planet, big things." "Man, did you hear about the derelict they found in the asteroid belt?!")

Well, there are a lot more details involved in actually implementing that system, such as determining what kinds of content can exist within what kinds of content, how to cram actual maps into those spaces, how to convert maps from combat mazes into walkable areas and back, etc. But hopefully you have the basic idea: it's all about keywords and piggybacking those keywords to connect objects.

I hope you get that, because we're going to kick it up a few notches.

One thing worth remembering is that we're fundamentally a linear RPG. The area the player can kick around in is targeted to a specific tactical situation, with specific ideal levels and equipment. The player will kick around that area as long as they want, and only let the game move forward when they want to allow it.

A lot of events and missions have outcomes that matter, at least a little. These things should be clearly marked so that the player doesn't accidentally stomp on their own stomping ground. For example, if the "failing life support" mission will result in the ship being lost, be sure that the mission start trigger gives the player an opportunity to back off.

But more than that, outcomes frequently trigger new missions.

This is important, because we want to present a specific (medium-low) sidequest density. It's possible to generate an infinite number of sidequests, especially when we have three factions in a location and the result is 15 different keywords. So... we lock some of the sidequests to keep the number the player is faced with under control.

The key here is that some sidequests have a notable outcome - for example, exploding the ship, or introducing a new keyword. These are good excuses to scuttle the existing sidequests and introduce the next batch. This can be due to the passage of time... or due to direct causality in the case of introducing a new keyword, even if the "new" keyword already exists.

For example, you go to the quarian colony. You fight monsters (+monsters), settle a zoning dispute (+colonize), and scavenge up mining rig parts (+scrounge). But when you decide to tackle the life support sidequest, you get a subtle warning, since you get the option to back out before you start. When you start, it turns out to also be affecting the ship above and, by the end, the ship has exploded and the crew has joined the colony (--> add +colonize). Scrap the leftover sidequests and introduce the next set.

Although the +colonize keyword already existed, now that it has be re-added, it's relatively easy to mark any new +colonize missions as resulting from that disaster, as described by dialog fragments in the disastrous mission. IE "We've been stranded down here, and it's been tough to keep things together..." then transition over to the new mission's dialog "... my child has gone missing, please find her!" Even if the dialog is a bit disjointed, it creates a sense of continuity.

This sense of forward progress is pretty tangible and fun, but even more important, it allows us to create a core arc for the entire content pack.

As I mentioned in the previous essay, your various main characters will represent core arcs. You may also have other core arcs that aren't character-centric, although you might not need them.

These arcs contain batches of content that get slotted into new content opportunistically. These create keywords before the content is even created to begin with, and that means the content will likely be created with those keywords matched in.

For example, Tali's working her way up her "quarian destiny" arc, and this particular event is about examining a new habitable world and seeing if it's suitable for quarians (and finding out it isn't). In addition to a bunch of specific content (maps, conversations, etc) it comes with keywords: +inhabitable, +toxic.

Well, we create the star system. Those keywords mean nothing to a star. We start to create the first planet.

We automatically filter for existing keywords, and we come up with a list of planets that are either inhabitable, toxic, or both. If we create a planet that is inhabitable and toxic, the quarian arc is confirmed and immediately slotted in, with any locations in the arc being instantly established as if they were randomly generated. This will, in turn, drive the rest of the system to create compatible elements and a web of missions that are properly themed.

If there never is a location with a suitable combination of +inhabitable, +toxic, the arc is left on the back burner and it'll try again later, maybe next content chunk.

We can afford to be laid-back about it because we probably have 4 or 5 arcs vying for our attention, and at least one of them is likely to find a suitable setup. We can even program the arcs to have flexible sub-events that can happen if we don't fill the main event, although the autogenerated events are probably fine.

The big advantage of arc events is when they get really involved and dominate the content. For example, near the end of Tali's arc, we have a dedicated location where we fight across a geth carrier group, and then after that another dedicated location where we go to Tali's homeworld and do all that stuff about hacking the geth and then fending them off, etc. While other random content may be wedged into the cracks, the majority of those locations are set in stone, and the progression should feel very consciously-chosen and solid.

One way to duplicate that feel is to have action setpieces - missions that end in epic encounters.

Many locations can have setpieces designed into them, and the setpieces can have a variety of zesty encounters programmed into them. Quests can opportunistically dump you into these setpieces for the finale, and they can be populated by the proper factions as required.

For example, a mining base might have maps for mines, refineries, corporate barracks, and a cargo dock. Each of those maps have setpieces: an underground rail system, an area full of conveyors and pouring molten stone, endless rows of destructable beds and tables, or a cargo ship desperately trying to take off.

Action finales are programmed into those locations, not into the missions that are climaxing. The underground rails normally feature track-switch puzzles, but in an action finale, it's a race through the dark while fighting off other cars. The refineries normally have the machine area blocked off, but in the action finale it's a battle across the conveyors while molten rocks splashes everywhere. The barracks normally feature a maze of flimsy-walled rooms, but in the finale it's about soldiers (or monsters, whatever) smashing down those thin walls and sending cheap furniture flying into heaps. The cargo area normally has a cargo ship sitting in it, but during the finale its turrets are firing and exhaust ports belching as it strains against the docking clamps...

Because these events are flexible, they can either be graded by impressiveness or have their impressiveness scaled to match the requirements. Every time a mission in a content chunk has a finale, the next finale should try to be one step up.

So if our first significant mission ends up in the cargo dock, the ship might be belching smoke and asking for permission to launch, but not actually doing anything substantial. But if it's the tenth significant mission, it'll be firing turrets, blazing the main engines, belching exhaust, and pulling around the docking clamp arms in dangerous sweeping patterns, maybe even on a timer.

Although there's no fundamental connection between the quests that cause the rising action, the fact that the rising action is rising should be enough to carry the content.

The question is: what's the transition to the next content? What's the final boss?

This would probably have to depend on your game, but my instinct is that there is a bank of generic content arcs, represented by a councilmember's interest in the location. Assuming there's no core character arc, a random councilmember arc is brought into play and serves the same purpose. These arcs are suitably generic, but always culminate in a final battle of some kind - for example, "exterminate the pirates in this region" or "find out if there really is an gene-smuggling going on" or even the innocuous-sounding "lay the foundation for a trade agreement".

Anyway, that's the bulk of the technical stuff I skipped over.

Let's see, the only things I can think of that I skipped are the specifics of the player's experience in each major content chunk.

Remember that this is a linear RPG and that grinding is a thing: make sure there are plenty of permanent enemy maps the player can grind on.

Also remember that missions can only take control away from the player when the player volunteers for it... but that they shouldn't feel shy about doing that once the player does! I gave an example about an exploding ship, but the same holds true for missions that split the party or force the player to crash-land for a while or blow up a world they used to visit or whatever.

The two biggest times the player volunteers are A) when they defeat the end boss and B) when they set course for the new star system. Therefore, the first mission of a content chunk and the last moments of a content chunk should take control away most aggressively, to show the coolest things and make the most important changes.

Monday, June 20, 2016

Nonlinear RPGs

Linear RPGs and open-world RPGs are not the same.

Linear RPGs allow the player to chew on things for as long as they like, then poke the sleepy plot into delivering the next big chunk of content. This has a lot of pros and cons.

From the dev's perspective, the pros are powerful. Since the content is gated and carefully scripted, the dev knows exactly who the player is playing, exactly who is in their party, exactly how strong they are, exactly where the plot is, exactly what they've seen and haven't seen. No matter how long the player spends on the Shining Plains, they can't buy anything better than a cutlass and a fireball spell.

In addition, the player has a very crisp trigger. They know how to poke the plot into action: fight the boss, cross the monster bridge, say "I'm ready" to the queen. This action is always very obvious and voluntary, and the player will trigger it when they are ready to experience the next content chunk.

These two things combined allow the devs to make sweeping content chunks. When you cross the monster bridge or fight the boss, things change. There's cutscenes. You're fighting your way out of a dungeon. One of your party members leaves, another one arrives. The world is blown up and there's no way back to where you started...

It can be precise and moving, because you know exactly what the player is doing and who they have with them. It can be big and bombastic because the player explicitly volunteered to go through it.

Open-world RPGs don't have these advantages, because the majority of the world is already available from the start. A player moving from point A to point C isn't really "volunteering" to experience a big plot event at point B. Hell, you don't even know who they are or who's in their party, not when you're creating the content.

Because of this, open-world RPGs typically have hundreds of tiny threads of content instead of large content drops. They also adapt the combat challenges by level-scaling.

Both of these leave the experience bland and featureless in comparison to a linear RPG with its more nuanced challenge curve and bombastic, personalized plot events.

Linear RPGs have downsides, too. The big, obvious one is that their appeal is limited. If you don't like the shoes you're stuck in or the way the plot is going, well, that's too bad. If you want to start over, you'll have to go back through the same shit again, there's no fast way to move through those chapters aside from being more efficient with grinding.

There have been open-world CRPGs since before "CRPG" was a term, but they only came into their own when computers became strong enough to convincingly render the world and its responses to you. This became a more reliable method of drawing the player in than the limited appeal of a carefully-written linear storyline.

Big, splashy, personalized stories were left on the cutting room floor... but I think it's a mistake to assume they're gone for good. Not only is there power in the stories they tell, there's power in the fundamental pacing of a linear RPG. The way the content unfolds is really strong.

What if we could come up with a new RPG subgenre that keeps that power but adopts the freedoms of an open-world approach?

I call it "nonlinear" RPGs.

Imagine if we were going to write Mass Effect as a nonlinear RPG instead of a linear one. The characters and stories would feel the same, but they would silently adapt to the player's choices. Not just "paragon vs renegade": wildly veering so that even the basic setups could be avoided or inverted. Maybe you play a smooth talker with a good record, and you convince the council to take immediate action against the Reapers and the traitorous Spectre. Maybe you play Han Solo, and just buy a crappy ship on your own and fly off to have carefree space adventures.

If it was an open-world game, these would be viable. You have that level of variability in the recent Fallouts, for example. But Fallout doesn't have the heavy "WHAM chew chew chew WHAM" feel of a linear RPG - it's more like wading through vanilla pudding.

In order to make stories adapt to your choices, you have to write variations for every choice the player can make. If you have one big story (like a linear RPG), the cost spirals out of control very quickly. So open-world RPGs use lots of tiny, independent stories. It gives the player feedback and tells them the game accepts the way they're playing their character, but because they're small and have so little effect on the game world, you can write their variants cheaply.

Fortunately, linear RPGs don't need that responsiveness nearly as much. The linear RPG already knows how you're playing your character: they provided it.

But... that's where we need to go to find the kernel of what comes next.

If we want a linear RPG to let the player play a wide variety of characters in a wide variety of ways, we need to have the game respond to those variations.

A linear RPG's "gateways" are always crystal clear. A boss. A bridge. A queen's speech. The player trips them whenever they decide they want to, and the game moves forward.

It's easy to create random events. It's even easy to chain them and thread them so you have repeating villains or escalating challenges. It's easy to make random maps and random subquests. (There, I just cut twenty pages from this essay.)

But what isn't easy is to make the experiences adapt to the player's choices and hit hard without being annoying.

Killing off a character or blowing up a place or putting you in a long dungeon sequence is really, really annoying if it isn't done well. It's not about build-up or epicness: it's about suitability.

In a linear RPG, the characters and places and factions all exist to tell a story. Each one represents a major arc or a piece of an arc in the fundamental pattern of the game.

In Mass Effect, Tali's character represents the attempt to take back your future from the mistakes of your parents. Garrus represents the failings of The System to deal with things, and the lure to work outside it. Wrex represents the struggle to provide a future for people that actively seem to not want one. And Liara represents blue nerd ladies that want to have sex with you.

OK, not every character is equally interesting, but they all have arcs that thread through the games and give you a gateway into the beating heart of the story line. The planets, too, represent tiny pieces of those arcs, allowing the arcs to exist in the game world concretely, instead of as a talking head. Factions like the Spectres and the Council also push the plot arcs along in a powerful, immersive way and create a multi-planet threat to hook things together.

And this is our method.

We aren't generating storylines. We are generating random content, sure, but it's anchored into the characters, factions, and scripted plot events that are the best our universe has to offer. Our random content offers a foundation, a stage for those core ideas to dance on.

One of the issues of open-world games is that the player can choose to be anyone, and it's very hard for the game to figure out what the player's self-image is. Thus the frolicking, daisy-picking assassins in Elder Scrolls games. The game tries to guess which plot arcs will be interesting to you by placing them in places those kinds of characters are likely to go.

But our games have a party, and our party members embody specific plot arcs.

If I'm interested in how the system fails us and what happens when we work outside it, I take Garrus. If I'm interested in the fate of the ancients, I take Liara. If I'm interested in struggling to build a future for people that don't want your help, I take Wrex. Not as a conscious choice, but because I am drawn to their characters right from the start.

Of course, the party structure of existing Mass Effect games wouldn't work, since you basically have everyone all the time and nobody ever leaves or comes back.

It's easy enough to replace that structure with one where the player only has a crew of three or four, and they frequently leave to go on some arc-related personal mission you can't help with. (Of course, you'll meet up with them later when the next piece of the arc comes around...)

This means our arcs have to be written with a bit of flexibility. While the core arc has a specific chain of events (for example, Mordin's plot involves rescuing a research victim, helping her, then distributing a fix), it should also contain a number of background events suitable for A) seeing Mordin repeatedly and getting to know him even if you don't trigger his join event, B) filling out random content with evocative situations (his commenting on the evil bug monsters, for example), and C) Mordin's background work after he's joined and then left and then is kicking around waiting to join again.

With these elements in place, the player would "naturally" be attracted to the local NPCs that seem the most interesting. Which will, of course, be arc characters suitable for adding to the party. Once the party is filled up (with maybe one spare), the others are too busy with their personal situation to join your team right now.

Don't choose to take Liara? Well, Liara will also show up in other space stations or on other planets, chatting about how she's chasing down a new lead on an old ruin. She may even have a small sidequest for you. And, if any of your party members leave for a while, you'll suddenly find she's pretty easy to recruit!

Now that your party is known, the next time you trigger a major content burp (fly to a contested star system, argue with the council, defeat a boss, etc) it'll be laced with the next arc events for your party of characters.

Not tiny drips and drabs, either: the next content batch is a big, bombastic event. A whole new set of planets, characters leaving and arriving, crashing your ship and fighting through a jungle...

This is also easy to mod. You can introduce additional characters with their own arcs pretty easily. Although the character arcs don't really overlap, they do exist in the same space: Mordin's arc introduces a mad science lab where genetic monsters are running amok, but it's inside a planet dedicated to Tali's next big arc element, where she's investigating the whole planet for suitability as a home world. Other elements are also laced in. Some are minor arc elements, some are completely random, but all can be laced together using a simple keyword system and a bunch of NPCs or audio tapes referring to other places. Those can easily be generated randomly.

Right now, we think of RPGs as either a world to play in or as monolithic stories. Instead, we might think of them as a bunch of opportunistic stories that piggyback on characters, factions, and places to assemble their setpieces.

... anyway, I cut about fifteen pages out of this long-ass essay. Hopefully it's not too hard to read.

Thursday, June 09, 2016

A Scaffold That Grinds Away

Last essay I talked about grinding. I did that to set up this essay, in which we talk about "writing" for open world games, especially RPGs.

In classic oldschool RPGs, there's a whirl of four kinds of gameplay, but each kind is very dull. Talking to folks, exploring maps, managing powerups, and fighting: individually, each of these elements is weak. Even combined, they're pretty weak.

A lot of RPGs have tried to become more interesting by changing out one or two of those elements for more interesting variants. That never seems to work. Why?

Look, RPGs are about the grind. There's no way around it. Even when you decide to stop grinding and fight a boss, you're still doing the exact same play, just with a different goal.

And that's the secret.

The power of an RPG isn't in the gameplay, it's in the pacing. You can grind as you like, and then when you're done grinding, you can easily prod the sleepy storyline into feeding you the next bit of content, the new grist for your grinder. New monsters, new target numbers, new setting, new people, new party dynamics.

All our effort has been spent on more realistic characters, lusher settings, better gameplay, adaptive music... but we've never really talked about new ways to feed the player.

We need to talk about grist.

How to make it, how and when to feed it to the player, how to tell how well they're absorbing it.

The term "roguelike" comes to mind. The computer generates the dungeons, and you walk endlessly through them. That is a roguelike's "grist": the neverending parade of dungeons. At first glance, you may think that's a linear RPG's grist, too. Maybe even an open-world RPG's grist. But it's not.

An RPG lives or dies based on the experience of spending time in that world. If we think like that, we can see that our grist isn't dungeons or random quests or generated characters: our grist is experiences in the world.

These are the things the game feeds us as we move forward in linear RPGs. A new town, new people, new plot elements, new character dynamics, new monsters, new world map, new dungeon, new background music, new spells, new equipment, new boss at a new level.

The difficulty is that grist has a flavor. If you deploy this stuff randomly, the player will get a mouthful of garbage. Arranging plots and characters and places and dungeons and monsters and bosses can't be done randomly. It has to be done sensibly.

I think there are three simple ways to choose sensible grist.

One is content packs. If you go to an icy place, you get an icy town, icy people, icy monsters, icy plots... the downside is: the more you do this, the less replayability and variation there is.

Two is arcs. By creating a progression across several grist packs, you can build a sense of permanence. IE, being chased by an imperial task force across three planets will give each planet's grist pack a connection to your experience, even though the planets are individually quite random.

Three is player response grist.

This one is important.

A big part of my enjoyment of old RPGs is having an "understanding" of how the major party members and NPCs "felt" about any given thing. The canon responses were limited, but I would fill in the gaps on my own. Essentially, I could write fan-fiction in my head as I played the game, imagining the characters responding to the random crap the game threw in my way. "Oh man, are you kidding? Another group of ten zombies?" grumps Lucca. "I will handle this group," Robo bleeps.

These stupid internal vignettes were a big part of how I enjoyed these games. My personal response as a player could be mirrored into the game world by the characters, discussed and properly contextualized.

I don't know how many players are like this, but it's important to me, so I'd like to talk about how to let the game help me do those things.

Dragon Age is an example of how to do this explicitly. The characters will frequently comment on random happenings, they banter among themselves, it feels very organic. However, in the end, this actually limits how freely I can shape the story of these characters.

None of the characters can have bad days, because their banter clearly shows them not having a bad day. None of them can have romantic relationships with each other, since their banter shatters that idea, too. None of them can become jealous, angry, happy, sad. None of them can find something interesting, or repellent, or confusing, unless the devs programmed them to.

Back in ye old days, the characters were unchanging, but they were blurry little pixel people who said maybe three lines outside of their personal arc events. You could imagine them doing or feeling anything you like, because they were too small and blurry to prove you wrong.

As our tech improved, we brought the characters into focus, but we left them as unchanging marionettes, simply increasing the number of personal arc events. When I drag Liara and Garrus around a starship for an hour, they never have any opinions or emotions, never feel anything, and I can see it very clearly due to the high quality of their modeling and voice acting.

Sure, games like Dragon Age try to get around this by filling the game with more voice acting and emotions, scripted by the devs. But that works against my enjoyment in many situations. I can't evolve the story as I grind the gameplay, because the devs don't know which direction I'm trying to take it.

There is a way to improve this situation. A surprisingly straightforward way.

We can see it in relatively mainstream games like Fire Emblem. Fire Emblem's devs don't know what sort of people we'll want to hook up with what sort of people, but they give us a mechanic where people that talk to each other in battle will advance their personal arcs. Not everyone has an arc with everyone, but it still allows the game to reflect the player's storytelling impulses.

As an even more mainstream game, we could use the recent Saints' Row or GTA games, where you can always just call people up on your phone to hang out with them. While they don't have programmed emotions while they hang out with you, you can drag them around into pretty diverse situations and they'll react interestingly - both due to their personality and due to their screwy AI that makes them freak out at random moments.

It's not hard to imagine scaling this up by offering more methods to guide the NPCs to behave in specific ways, either long-term or short-term, to reflect the player's personal story.

For example, a version of the GTA framework where the two people you call over will have an event together after they've left, and you'll get notified of the new social situation. A quick text with a picture of the two of them standing on top of a boat, for example. The event can be determined by how much money you made while they were following you around, or how much adrenaline you spawned, or how much damage they took, or where it left off...

Or let them get drunk or high as you pass them various inventory items. Or you can bring up something from their past by showing them a photo or taking them to their old house. Or you could just let the player freaking select how they want the NPCs to feel from a menu.

Wedding this kind of shaping into the grist of an RPG should allow-

Oh, yeah, grist. We're still talking about grist.

The player selects how the characters evolve. That can easily be limited so the characters stay "in character" and/or lined up for their long-term arc. Even with that limitation it's a powerful way to let the player trigger tasty grist.

When the player pushes a character to act in a particular way, why not have that character drag in a bunch of other content based on that? You get the berserker drunk and leave him stumbling around the rooftops, you're going to have a story event where he's caused trouble. It's a good excuse to introduce local law enforcement, a rich person whose roof got broke, people chatting about the weird, shadowy figure which must have been a werewolf stalking through the city at night, and several options as to how to break your buddy out of jail.

This is "piecemeal" content. It can be injected into almost any setting. If the town is big enough to drunkenly jump from roof to roof, it's big enough to support the subplot. It doesn't mean anything in the long run, although the NPCs you introduce here might recur later in other contexts. You can just throw it in and have fun.

Of course, the subplot should have variable long-term results - change the opinion of the town, change your karma rating, etc, who knows.

Fundamentally, this kind of random content is not too hard. Certainly not as hard as generating a good dungeon for a roguelike. The difficulty lies in making sure the actions the player can choose in order to reflect their personal take on the story can spawn these events without seeming overly random.

All of the moments that introduce grist in existing RPGs are already like this. You get new grist when you step on a trigger, and normally you can tell what is a trigger and what isn't. We're talking about the same exact situation, except that the content we introduce is generated instead of scripted.

The challenge is whether we can make that generated content "flow" from the player's situation. That applies for this piecemeal personal response content, but it also applies for arc content and content packs.


Well, in the end, I'd like to talk about how to set up the grist properly.

In my mind, we can radically improve RPG design by spitting grist in based on content pack chunks, arcs through multiple chunks, and introducing grist based on the actions of the player... as measured by actions we allow specifically to let the player choose how they want characters to develop.

What do you think?