Showing posts with label npc. Show all posts
Showing posts with label npc. Show all posts

Wednesday, September 05, 2018

A Sense of Place

So, I really like games with a sense of place. Some days, I think it's the most important part of a game, more important than how the game actually plays.

But only some days: the vast majority of games don't give me any immersive sense of place.

I asked around on Twitter, and nobody chose the same places I did. They all had very different priorities. And it's clear that game devs share their priorities - especially clear, given half the respondents were game devs.

What they mostly liked was a sense of scale. Mostly cities with epic vistas and large scales.

I sure do like pretty cities, but that's not what keeps me coming back to a game year after year. I'd like to talk about what I like in cities and towns, try to nail it down so that I can build it myself.

So, let's start: one video game city that keeps luring me back is in Bloodlines.

It's not big. It's not beautiful. The design is blunt and uninspired. It has no redeeming qualities as a city or a piece of art.

But... I keep replaying the damn game, and a big part of that is how much I enjoy being in the city. There's a little fizz beneath the city that instantly smashes me into the game and keeps me there.

I think that's a good hint. Since there's not much distracting epicness, I can focus on the one thing I want to see more of, even though it's just a fizz.

Pace in Place

In most games with cities, the cities are subordinate to the wider gameplay. The city might host missions or objectives, but living in the city is not an objective.

There are games where the city is the main gameplay. For example, in Crackdown. Surprisingly, this seems to be even worse for my little fizz: it reduces the city to a mechanic.

The experience of being in the hubs in Bloodlines is different.

You are living in the city. Or... unliving, I guess.

You're existing in the city.

Your struggles in the game are simply struggles to continue living in the city. You end up fighting dangerous battles against ridiculously overpowered enemies, but the point is that, at the end, you'll get to go home and take a nap and then tomorrow you can maybe visit your friend downtown. Even the end boss is literally chosen by you deciding what kind of city you want to live in!

Over the course of your adventure, you establish a life in the city, with friends and coworkers and maybe someone to date.

You also get to know the city a bit better. Although exploring the city isn't really the point, you do explore it while you roam around trying to make a life for yourself. There are plenty of things to find - a few topological secrets, like the back entrance to the the pub. A few new people with new missions, such as Ash in the cemetery or the truck vendor that wants you to clear out a parking lot. A few areas that are locked and you'll have to remember later.

The pace of discovery feels right to me. In many video game cities, you explore to find random treasure baubles scattered around. But in Bloodline's cities, you search to find new people with fun new missions, new shortcuts, new locked doors you'll unlock later. You never feel like you came here just to get a mechanical reward: if you go into the back alley, you won't find $5 in a treasure chest. You will find a skeevy guy that wants you to clear out a parking lot.

In a theoretical modern remake, you might feel compelled generate these missions on the fly. But you'd have to be careful: the point is to make a life for yourself. When I clean out the parking lot, the skeevy guy not only gives me a reward, but becomes a better vendor. If you were randomly generating missions, you'd still have to make sure the rewards are about better living... and I don't need more than one skeevy guy selling me stuff.

If you look at the missions in these cities, nearly all of them are about living in the city. Either getting you established, or making the city safer for you, or making friends and allies.

Even though all the NPCs are barely functional weirdo jerks, they somehow become your barely functional weirdo jerks. Mission after mission, day after day.

Counterexample

The most obvious counterexample is Stardew Valley, or any similar game. They are about building a life, but in the most mechanical way possible. You literally build your life: more farmhouses, more crops, more ore, more machines. But the town is not really part of that.

The NPCs are rigid and inflexibly forced into your life. You cannot be allowed to alienate the shopkeep because there are no other shopkeeps. You cannot work for or against the mayor, because there are no other factions. There are few NPCs, and they largely exist to fill specific roles in the gameplay. Dating is the exception, but usually you can only date NPCs with no critical role, and therefore they have no actual place in the town. Moreover, you can typically only date one of them.

Although you can make friends, there's no particular change in the way the game feels, or your lifestyle.

This doesn't mean the games are bad. It means those games aren't what I'm talking about right now.

Extending That

If I were to imagine a game where this little fizz was turned into a torrential waterfall, we would need to punch the Bloodlines up without Stardewing it.

A big part of it is that the city is largely not interested in you. They don't like you, but they don't dislike you, either. If you want to make a place for yourself, that starts with proving yourself to them in their own personal corner of the city.

This is in stark contrast to most game cities, where the inhabitants are intended to pull the player into the game world and narrative. The NPCs in a normal game might welcome the player, or be hostile until a plot point, or they might just talk incessantly about whatever the main plot element in the area is.

These are all the wrong choice if you want to feel like you are making a life for yourself.

This doesn't mean they can't do those things. But the main purpose is make the player figure out how this person fits into their life in the city. Maybe the player decides they're a threat and sabotages them. Maybe the player needs their friendship... for now. Maybe they want to date this person, or just want them around as business partners or something.

And, along the way, the NPCs can be welcoming or hostile or exposit endlessly. But regardless of that, the player knows this is a person that will impact their life in the city, and they have to decide what kind of impact that should be.

Easy example from Bloodlines: when you meet the two-faced bar owner, she's friendly... but you know she can't be trusted, because you haven't earned a life here. Similarly, although the anarchists are unfriendly, you know they can be turned around and made friends if you can earn a life here.

If you're considering how to structure your missions, this is a good thing to keep in mind. Not only in terms of how the initial encounter goes, but in terms of the final outcomes: the player's goal is to be friendlier, sabotage, charm, alienate - therefore, those should be the possible outcomes of the mission, rather than choosing something like a "renegade" or "paragon" ending.



The design of the city itself is also important, because living a life means being in a place.

This doesn't mean the city needs to be beautiful or epic, but rather that these NPCs need to have lifestyles and locales. They have their life in the city, just as you want to have. By choosing who to rely on in what ways, you get an echo of these lifestyles.

This was one thing that really, really worked in Bloodlines: all the NPCs were vampires, meaning they literally don't have day jobs. Whenever you meet them, they're doing whatever they've decided to dedicate their life to, and that includes the lifestyle they've chosen. From the poolhall relaxation of the anarchists to the overly formal, excessively expensive meetings with the town boss, none of the vampires are ever portrayed as simply filling time with sleeping or working a day job. They are always living their life. Unliving their death. Whatever.

Contrast this to games like Fallout 4, where the only thing that defines your settlers is their day job.

Establishing a lifestyle is not something which has to be scripted. It would be relatively easy to randomly generate NPCs with specific lifestyles and specific methods of fitting into your life. But it would be difficult to randomly generate them in the right variety: NPCs come in packs, and often a pack of NPCs will have similar lifestyles and offerings, but subtly different ones.

If you do generate randomly, you'd need to think in terms of generating teams of NPCs rather than individuals that happen to be in the same place. There are a lot of fun scaffolds for this, such as the five-person hero team, but they'd all need to be adapted in order to make sure that the player has something interesting to gain from each one, and perhaps a reason to prefer specific members of the team over others.

All of this would need to be reflected in the construction of the city.

That in mind, the team should probably have a good time hanging out together in places that suit them. If their lifestyle together doesn't seem fun, that would poison the well: the player wouldn't be interested in fitting into their life. There's a lot of different kinds of fun: an annoying overlord can still provide a good lifestyle if the player thinks being rich and powerful looks like fun.

Near Misses

There are a number of cities that make me allllmost feel the fizz, but it fizzes out.

One set is the Citadel and your hub ships in the Mass Effect series. The first impression is very good, but it doesn't end up panning out because you aren't trying to establish a lifestyle. It's about already having a lifestyle, and getting to live it.

That's not bad! I loved hanging out with my buddies. But I never got to choose how people fit into my life. They were written in or out of my life at the scriptwriter's convenience, and that left me unable to get that fizzy feeling.

Most such modern RPGs give that same "alllllmost" feel, like Dragon Age.

Another example is The Sims. While I can choose which characters fit into "my" lifestyles, I can't get a feel for the city. Their lifestyles are encapsulated in their individual homes, and nobody is really integrated into the city.

Even if I go into the city and people are around, I know it's not really an integration. Their existence or lack of existence wouldn't change the feel of the city any.

There is one other example I wanted to talk about: Skyrim (or the modern Fallouts). These have lots of cities of varying size and shape, all stuffed full of NPCs that have opinions and lifestyles.

These cities create an itch I cannot scratch. Their characters have lifestyles and want me to help them, but doing so doesn't lead anywhere or provide me with a life in the city, because there's no reason to have a life in the city. If I decide to track down and kill the weird cultist... nothing changes.

While I do replay these games frequently, I typically spend less and less time being social in cities, more and more time doing other things. Being social doesn't really lead anywhere.

It does in Bloodlines. It always leads to a new life in the city.


... anyway, I wonder whether anyone else feels like this.

It might just be me.

Tuesday, January 10, 2017

Humanizing an Empire

As you may know, I really love games where you build things. And what is the biggest thing you can build?

An empire.

When I was younger, I was obsessed with 4X games like Civilization, Masters of Orion, and so on. As time wore on, their shine wore off. These days, I still play those kinds of games on occasion, but I prefer games where I build smaller things.

The reason is simple: those smaller things are more people-centric.

Recently, games about building empires have tried to become more people-centric. Civ animates their iconic rulers with loving care. Stellaris gives you a bunch of people with personal traits and names and asks you to assign them to colonies, star ships, factions. Everywhere, people are becoming more common.

The problem is that these games aren't about people. They never were, and they can't be: the structure of the game is oriented around nation-building, not personal dramas. This means interactions are all about bowing to the will of the empire.

Games like Crusader Kings II push this as far as can be reasonably expected, tracking hundreds of distinct individuals throughout lifetimes, letting you push them into service, crush them, or exploit them. This appeals to a certain kind of fantasy, I'm sure, but it's not really very good at letting me build something that means something.

This actively interferes with my enjoyment of these games. Civilization VI isn't about building a nation, it's about beating Alexander the Great as he weirdly and obsessively declares war against you every decade for a thousand years. It's humanized to the point where I don't think of that territory as another nation - I think of it as Queen Victoria's house. Vickie's front yard.

We've been humanizing these games for eons. Everyone remembers Gandhi's words backed by nuclear weapons. Everyone remembers the personality-filled cockpit views in Star Control. But these were very shallow, passive efforts - the difference between anthropomorphic tags and being a person.

Basically, when something is tagged, you can easily slip a personality onto it and ascribe a mood or emotion behind its actions. The Ur-Quan dreadnaught fighting the Spathi? It becomes the grumpy, remorseless Ur-Quan hunting down a hilarious, cowardly Spathi.

When something is portrayed as a person, things are different. The easiest example is Stellaris: a few minutes into the game, you meet a pirate faction made up of your own species in order to inject some kind of military action into the early game. You choose an admiral for your fleet. Do you pick Sara? She has a bonus to attack and a neat haircut. Doug? He learns fast and is wearing a space baseball jersey. Veronica? She can move the fleet faster and looks appropriately grumpy.

Whichever you choose, it's a person, not just a vague indicator. Instantly, you start thinking of your fleet ops as part of their career, part of their personal story. So you go to fight the enemy.

... and they have a fleet commander, too. A person. With a unique name, unique appearance, unique powers.

You kill them. You never learn anything about them. Ironically, you never even have enough info to give them a personality. They are the same species as you, so there's nothing distinctive enough to make you assign them the personalities you give to the other aliens you might meet.

This is distracting. Players naturally gravitate towards densely simulated things. You've taught the player that individual people matter, each one is simulated and tracked independently. Then you show them a person, as dense and complex and promising as the one they chose... and just kill them. Wordlessly, effortlessly, pointlessly.

Worse, the alien species cultures are largely randomized. When you do meet an alien, the anthropomorphic tags they bear don't correlate to their actual characteristics. This turns the emotional responses into mud. You've trained the player to respond to individuals, but then refuse to let them interact with individuals. You train the player to not care about species, because their appearance is unrelated to their traits, but then force them to interact with species.

Civ VI doesn't do as many things wrong. It has very, very strongly personified nations, but they have the correct personalities and feel reasonable. Unfortunately, you can't really interact with those people. You can only interact with their nations. Even that is in a vague, impersonal way.

On the other hand...

Let's say I make a game about building cars. There's a bunch of NPCs, they want cars that suit their personalities and needs. I build them a car. They go "whoaaaa! NICE!" They go drive it. They come back. "It was great, did X really well, thanks a ton!"

The scale is small enough that it feels like a personal interaction even when I don't do social things. The response is personal, about something concrete and part of their life. The choices I make are much more centered around facets of their personality, because each NPC can have wildly different taste in cars without becoming unbelievable.

It is already much more deeply personal than Civ VI, even if the NPCs are just a doodled pixel portrait.

Honestly, even if there were no NPCs, building the car is still more personal than building an empire in Civ VI, because I can easily imagine how someone would use and enjoy the car. That's a big part of why Space Engineers is fun! There's no NPCs, no personalities, but imagining how people would live in space, use my ships - that's fun!

In my mind, 4X games can't survive in this awkward place. They will naturally have to become either more humanized... or less.

"More" seems to be the trend, so how would that go?

The two basic paths are the Civ VI path and the Stellaris path, which is why I used them as examples.

The Civ VI path focuses on a few, highly detailed, carefully designed NPCs. Further down this path lies a game where you can interact with those NPCs in more detailed, complex ways. Expanding your empire probably matters less than establishing a good relationship with your neighbors. This will generally take the focus off the militaristic side of things and play up more complex interactions.

The easiest way to do it would be to make the lands of the empire play the role of the home and body of the other ruler. Rather than negotiate with the ruler as a lump sum, you interact with specific cities or lands in a wider variety of ways.

There's not really any way around this. We can't continue having a bleak, war-focused set of interactions if we keep humanizing the other side. I already have no interest in going to war, even with the relatively weak personalities in these games today.

The other direction is to track an impressive number of people. Rather than the ruler of each nation, you track everyone. Politics constantly evolves and changes who is in what positions. The rulers of each nation come and go.

I have a suspicion this is definitely going to spawn a genre, but I don't think I'll like it much. That many people means that each person will be disposable, temporary. That's not going to scratch my itch.

At the very least, I hope all these people have personality tags, so I can easily assign them a mood and emotion as they do things. At the moment it's all undifferentiated mush, and it's very hard to establish any deep connection to the various NPCs. It'd be interesting to try to improve that connection while still having a large number of randomly-generated NPCs. Maybe use some techniques to inject personalities into the flow of the game.

But right this instant, I have a car-building prototype to create.

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.

Tuesday, August 25, 2015

Time Compression Minus Space Compression

I love base-building games. You may have noticed.

But I have a big problem with them: every base-building game reduces characters to a cog. They exist to do a job. The individuals are played down, the base played up. I want a game where the characters are more important.

A core feature of base-building games is time compression. This allows the base to progress faster than life, which is obviously something you want. There are three ways of time compression.

One way is lifestyle compression, AKA space-time compression. This is like The Sims: each character in the base has things they do over the course of the day. They wander to and from various rooms or facilities, use them for a specific amount of time, then move on according to a compressed schedule.

Lifestyle compression normally exaggerates the cost of space. It takes 10 minutes to walk 10 feet in the Sims, so you're strongly rewarded for literally compressing your space. An ideal room in that game might be a large, many-cornered room where all the furniture is right by the door, so nobody ever has to actually walk across any of that space. It's not uncommon to mix rooms together to try and put functional furniture close to each other even though it would be a disaster in real life.

You can blunt this effect by having the characters teleport rather than cross space as the timer ticks, but this is rare and largely considered immersion-breaking. Keep this in mind, because it's related to my solution.

Another method is lifestyle trimming, AKA schedule compression. This became common in Flash and mobile games, and can be clearly seen in games like the mobile Fallout game about managing a vault. This compresses time by simply trimming away all the other things people might do. They are always at work, always in the classroom, whatever you have assigned them to do, they are always doing it. They don't need rest, they don't need food breaks, they don't have a personal life. They are cogs.

This method is great for not compressing space, allowing you to build your base more freely. But it has the side effect of destroying any semblance of personality: the people in your base are simply mechanisms to make the rooms function. You can try to assign them personalities in your head, but once you have more than about 7 of them, that tends to fall aside.

The last method is lifestyle chunking, AKA turn-based/phased scheduling. This is pretty rare, but the basic idea is that time progresses in chunks. This has the uncompressed space of lifestyle trimming, but leaves people's personal lives intact enough that they can have personalities and be remembered as unique individuals by the player.

This method is pretty rare because it's normally done using a turn-based approach, and that's fallen out of favor in recent years.

I'd like to describe a variant of this method which uses a real-time approach. I've designed and paper-prototyped a game, and it might be a fun illustration of how these three approaches are far from tapped out.

****

You are in control of freighter space ships, traveling vast distances. Each mission lasts months, years, or even decades - although you can have several ships running missions concurrently if you want.

This is the statistical heart of the game. How long is your trip? How many supplies did you bring? How fast/efficiently can you reuse or regenerate supplies? Food, water, clothes, 3D-printer goo, multipurpose electronics, entertainment supplies, luxury goods - all are worth considering as missions get longer.

This foundation drives the rest of the game, giving the player an easily understood baseline to work from. If you want to save mass, put in a water purifier that recycles most of your water. In the beginning, a 90%-efficient recycler works great. But as your mission length stretches to years or decades, you're willing to pay out the nose for a 95%, 98%, 99% efficient recycler. Maybe even have a crew member that is especially good with them to wring out every last possible percentage.

This is a natural growth. Simple, foundational limitations that urge the player to design a base to more efficiently push back against them. Each pushback is a little more complexity on the base building and management side of things. This is a "slow-cycle" gameplay, and is perfect for putting on some medium- or fast-cycle play on top. IE, managing the crew.

But a little more about the slow-cycle gameplay:

Each ship can be designed at least partially by you. This is a base-building game, after all. The ship chassis is set in stone: all you can do is choose what rooms go where. And, in many ship designs, some of those rooms are also set in stone.

The key trick in this Newtonian (no-light-speed-limit) universe is that the space ships are all designed around the same concept: accelerating for half the journey, then flipping and decelerating for half the journey. This produces an almost constant "gravity" towards the engine of the ship, and to minimize damage from interstellar particles, the ships are all classic 70s cigar shapes.

This is not just flavor. The interior of the ships reflect this approach, and every ship has the same three "decks". At the very top of the ship, where nose is narrowest, are the living quarters. Below that, the ship begins to widen, and you have the communal space/off-duty area. Below that the ship gets wider yet, and you have the on-duty areas like engineering, 3d-printing facilities, laboratories, bridge, etc.

That's just the nose of the ship: below that is a huge space for cargo and engines and whatever. But that space just exists statistically: you only care about those top three floors. On-duty, off-duty, and downtime.

And there's the secret. Rather than chunking our lifestyles by time, we're chunking them by floor.

When you look at the on-duty floor, you see your whole crew busy at work at their stations. No matter how many days pass, they work work work work work.

But if you pop up to the off-duty floor, you see your whole crew busy with their secondary tasks. Cooking, cleaning, eating, playing games, drinking together, going to lessons, exercising, etc. While they may move between these stations sometimes, they never leave this floor. You can watch them have their off-duty life continuously. Of course, this is just a view: they are also still working, there's no work penalty for watching them hang around off-duty.

If you pop up to the downtime floor, you see them sleeping and getting up and going to bed and trying to eat breakfast and stuff. Again, you can just watch this forever. They are also working and off-duty at the same time.

This three-view split allows you to easily handle whichever floor you want whenever you want.

The on-duty floor has a minimum of personality. Your characters are basically cogs, keeping the ship running. This floor has the most rooms in it since it's the widest area: in the starter ship, there would be a circle of 8 wedge-shaped rooms with stairs running up the middle. Later ships might have multiple circles, or half-circles, or other interesting configurations, but it's always circle-based with the same wedge-shaped rooms.

The off-duty floor has a narrower circle that continues up from the on-duty circle, with 6 rooms per full circle. This area is about tending to crew needs, starting with food and cleaning, then up to recreation, training, etc. Where people are assigned here is a strong indicator of their personality and interests, along with creating a coherent shape to push the crew to higher levels. You may need to tweak this to keep the crew happy, as most people aren't going to want to be assigned to KP for ten years straight.

The downtime floor is the narrowest circle, with only four wedge-shaped rooms per circle. These are bedrooms, bathrooms, and lounges - places you would hang out quietly, sleep, or get ready for the day. This isn't just flavor, either, because the way these rooms are allocated changes what people have what pull in what groups.

For example, the starter ship (a single circle, classic cigar shape) has 4 downtime rooms. One is hardwired as a lounge. Another needs to be a bathroom. The other two are bedrooms, but since there's a crew of three, there's a two-person bunkroom and a one-person private room.

The captain gets the private room. By that I mean: whoever is in the private room is probably the captain, because social rank is determined by who has the better or worse accommodations. This is reflected in the interpersonal events which can happen, and in the flavor interactions that happens as you watch.

Later on you'll get ships with multiple cores. For example, a two-pronged ship might have two cores, which means 8 downtime rooms. But the two circle cores are important because each is a different social circle. People in circle A tend to hang out with people in circle A, and B sticks with B.

This is a natural and easy way to "cluster" your inhabitants. Even if you have 30 crew, you can "chunk" them in your mind by who they hang out with and what their social standing is in their group. Each player can choose to chunk them in any method they please - one player might prefer to have "A" be for the greasemonkeys that keep the ship going and "B" for command staff and pencilnecks. Another player might have "A" be for women and "B" for men. Another might choose to cram everyone into "A" and have "B" entirely reserved for lounges and bathrooms. Since you choose your crew, you can choose to have only a few people in palatial suites, or cram dozens of people into coffin bunks.

These clusters propagate to the off-duty area. When not actively assigned to a specific duty, people will choose to hang out with others in their group. You can use this to gently guide the crew - force-assign one person from group A to a classroom, and the rest of the people in group A will automatically try to go to class with them... but they will take breaks when they want to, keeping themselves from overstressing. So assign that bookworm that never gets tired of studying to the classroom, and just let the whole group slowly rank up.

This kind of base management feels pretty easy in the paper prototype, and it seems easy to keep track of even ~30 characters.

The last piece of the puzzle is interpersonal events.

I don't think these events should be simulated, at least not past a very basic level. Instead, my approach is that when an opportunity for an interpersonal event arises (random chance), you can click on it and it displays a variety of possible outcomes. No explanation as to what happened to get them to that result. You choose whatever result you want, and imagine whatever interaction you want to justify it.

The potential results will vary depending on what floor you were on when you clicked the event, the established basic relationship of the two, and how they are socially related. IE, a married couple might have different potential results than two people that have never met.

In the paper prototype, I simulated this by drawing random outcomes, but having "upgrade" notes - if a specific relationship existed, the outcome was morphed. IE "start dating" morphs into "get married" if they are dating, morphs into "have kid" if they are married, etc. With this in mind, I can choose from several potential outcomes that reflect their basic relationship, and the game doesn't have to simulate anything or know personalities or anything.

This means A) the player gets to imagine events and personalities, B) we don't have to simulate them and C) we rarely, if ever, conflict with the player's vision.

Anyway, that's my design. If you got this far, let me know what you think. If I get some free time, maybe I'll try programming it.

Thursday, August 06, 2015

Generating Episodes with Outrage

Well, I thought about it a lot, and I came up with a new kind of game. It's a base building game - let's say it's about a space station. You build the station, manage the various pieces much like any other construction game.

But it has a second kind of play: you can drop into episodic stories similar to what you might get on a TV show set on your station. Say, Babylon 5.

The secret sauce is outrage.

Instead of health, we track how angry characters are. An episodic story starts quite simply: someone is angry about something. We have a heuristic for setting up the whole situation - plonking in a bunch of characters with simple relationships, some resources, some places. For example, maybe a genocidal ex-warlord is visiting the station in secret, in order to get surgery to change his genetic fingerprint from a gray-market surgeon.

The player created a number of characters as the "named crew" - each with stats, skills, and personality. This time, the linchpin character is the station's official doctor. He realizes who the visitor is and becomes outraged that this warlord is still floating around free, and will escape forever if the surgery is successful.

The situation can be made as simple or complex as our engine and patience allow. We can add in constraints like "in this sector, there is no warrant for his arrest and no charges have been made against him" or "there is an assassin aiming for his life" or "he has young children" or "he has a shipment of slaves" or whatever. We can add as many or as few details as we would like.

The core driving force is the doctor's outrage. It's very high - over the maximum limit. The doctor is on an in-game timer: if he doesn't act within a few hours, the player will lose control and the doctor will act as an NPC for the rest of this episode. Of course, anyone can be enraged and act out because of it, the doctor is simply today's starter.

In order to keep control of the doctor, we have to act. Actions related to the outrage's source will reset the timer, so we can keep control if we do something related to the warlord. Ideally, we would like to reduce the outrage, but that's significantly harder to do since the source is something outside of our control.

Here starts the gameplay proper. What does the player do during these episodes?

The key is to not make the player do anything. The player is allowed to take any action they want (well, that we modeled). We don't insist that the player bring the warlord to justice, or protect him from the assassin, or whatever. The only thing we do is set up a situation where if the player doesn't act, he'll probably lose a character (the doctor will go rogue due to high outrage).

ANY action related to the source of the outrage will delay the doctor going rogue, and the player can take more or less any action. This is a simple-asset 2D game, so you control the doctor mostly via menus rather than any kind of walking around, and that means you can select actions from lists in menus.

There are a large number of unique and interesting skills in this world, and each character you create has some of them. The doctor might have "contagion management" and "medicine" as two high-rated skills. These skills come bundled with generic actions: "quarantine" is one from contagion management, while "sedate" is one from medicine. In addition, the doctor's position as head doctor also gives him some authority over other doctors on the station, including the gray-market surgeon. The doctor also has a huge number of other generic actions such as moving around, calling friends, carrying stuff, whatever.

The key to all of this is that every action causes outrage dependent on how much it annoys the people affected by it. You can avoid outrage if your action is in regards to something that is already causing them outrage, but that's definitely not the case here. If the doctor decides to quarantine the warlord, he can. But it will outrage the warlord and his crew. Moreover, they will all know who they are outraged at: the doctor. This might be good, it might be bad, that's up to the player to decide.

Instead, the doctor could choose to sedate the warlord and sneak him away to some secret place. This causes substantially more outrage, but since it was done in secret, the crew don't know who to be angry at and are instead just angry in general.

The player can continue to take any action they please, targeting any character or place they please. Maybe it's time to activate the cop character: otherwise, those angry crew are going to cause a lot of trouble for the space station. But the cop doesn't know the doctor is the kidnapper, and the doctor is still boiling over with fury: he'll go rogue soon, since he's done taking actions against the source of his outrage.

Fortunately, the cop can use her 'investigate' action and look deeply into the visiting ship. If this had been done right at the start, it would have caused a lot of outrage, but in this case there is an excuse. The crew members don't get outraged - the cop is acting in regards to the source of their anger. They don't get any less outraged, either, but at least their angry actions are delayed while the cop acts on their behalf.

The doctor is also assuaged by the cop's investigation, since the source of the doctor's outrage is the kidnapping victim, and the cop's investigations naturally bring that up. So the result is that the cop gets to investigate while simultaneously pacifying everyone on both sides of the fence. A good way to have the situation unfold.

Complexities, secrets, hidden agendas, and time limits can all be deployed to screw the player up. That part is straightforward.

What's not straightforward is creating and modeling all the various actions that the various characters can take.

Well, it is straightforward, but it needs explaining.

Actions fall into a few basic categories. These categories can be expanded on later if needed, but the idea is the same: variations on a theme.

For example, "lockdown" is one generic action type. This includes arrests, drugging, kidnapping, quarantining, stabbing, delaying, identity chip canceling - the intent is to keep the target from performing specific kinds of actions. For example, kidnapping someone removes almost every kind of action they could take, while locking down their bank account just prevents them from taking actions that cost money. Of course, locking down someone's bank account generates a lot less outrage than kidnapping them.

Each lockdown action filters out various actions and has various acceptable excuses to prevent outrage.

Another action category is "travel". This would include walking, sneaking, driving, taking a taxi, flying a spacecar, flying a battleship, etc. Each of these kinds of travel has a different price and annoys people in different ways, as well as covering different distances with different minimum ranges and with different up-front delays. Travel can be aimed at people as well as places, so our doctor could tail the warlord by using any of these actions with a lower minimum range than his current range.

Another action category is "communicate". This is the action of sharing outrage between people in various ways, and includes gossip, complain, compliment, reassure, etc. One of the biggest issues for the player is that outraged characters will tend to gossip and complain, spreading that outrage to everyone.

Another action category is "investigate". This could include stakeouts, interviews, sensor analysis, hacking into databases, etc. Each specific action has different parameters and different targets, but the fundamental result - coming out of it with more data to act on - is the same. Having additional data can mean knowing more targets (people or places) for other actions, but it can also mean being able to "inoculate" people.

This is when you cause someone to get outraged at something specifically so you can take an action and not outrage them. For example, if you arrest someone without cause, they'll complain and spread their outrage to everyone they can talk to. But if you have evidence that they are a murderer, those people will be inoculated against it, and only people who aren't upset by a murderer will be upset by the arrest. This can even inoculate the murderer in some situations, creating wonderfully complex characters!

Another action category is "instigate". This includes blackmail, allying, fast-talking, seducing, programming, etc. The various kinds of targets that you are trying to convince, the method used to convince them, and the kinds of actions you can make them take might all vary, but the fundamental act of instigating is easy to model.

All of this results in a system where we understand the basic parameters in play and how each category of action affects them. It's up to the player whether they prefer to use stakeouts or interviews to do their investigation. Or perhaps they prefer to instigate instead of investigate. The machine is just as happy to chew on that action and alter the scenario to fit the result.

The difficulty is not the actions, but creating an interesting response to the action. If the player can stakeout or interview, what makes one better than the other? Aside from having one point more skill in one or the other, why would a character prefer one or the other?

That's where the situation needs to be complex and multi-faced. Outrage is a big help here: in trying to minimize outrage, you'll often find one or another action does best. Stakeouts and interviews create or assuage outrage at different times. Stakeouts tend to be secret, creating and assuaging outrage only with other people on the team. Interviews might create some outrage depending on the willingness of the target, but they are also more obvious, and therefore can be used to delay outrage onset by convincing people that you are acting to resolve some outrageous situation.

Combine this with the tactical situation, and you have plenty of beautiful variables. Stakeouts take time - but sometimes that's exactly what you want, if you want to be available to act the moment they do something suspicious. Interviews are fast - but how likely is it that they know something? Are you going to give away more about what you're after than they'll give away to you?

Each character you build has different specialties, but unlike an ordinary RPG, you don't travel in packs most of the time. Each character you bring into a scenario reduces the reward, so there's a lot of pressure to act independently. In addition, outrage can build up between characters and you can lose control over someone if you're not careful.

Functionally, this means you can't always choose your cop. You won't always have high skills in stakeouts and interviews. Maybe it's your systems engineer today, and you need to investigate by hacking databases or deploying sensors. Different parameters, different tradeoffs.

Now, regarding NPCs.

Outraged NPCs are active NPCs. Even mild amounts of outrage make people more difficult to deal with, but the more outraged someone is, the faster and more aggressively they'll take action. The question is: what kinds of action?

The good news is that it's easy to determine what kind of action they'll take. Just pick an action associated with a high skill. "Move" or "complain" if that turns out to be inapplicable.

The really good news is that you can make this have dramatic irony very easily. Whereas the player chooses targets carefully to try and resolve the situation, the NPCs choose whoever will gain the largest percentage of outrage.

For example, the warlord's crew is running around the station causing trouble. They consider troubling everyone, including both the cop and the doctor. The doctor is already hugely outraged, has been since the beginning. Five more points of outrage isn't even a dent. So we hear about it from the cop, who goes from 0 to 5 outrage. This pulls the cop into the story a bit more solidly - she now has a "reason" to get involved.

This basic system means that any person or place that is explicitly introduced will be cycled into the plot opportunistically. It also means that "B" plots are easy - just activate two plots at once, and they'll naturally tangle as NPC actions target the least upset people on both sides and raise the temperature to boiling. It might not even be a player character: the warlord's crew might piss off a visiting trade delegation or your captain's mom.

This is a pretty simple, straightforward system built explicitly for a low-representation game. That is, these actions don't play out in detail, it's more visual-novel-style graphics and focuses more on the results rather than the processes. In a game where 3D models have to act out every detail of staking out or kidnapping or flying space ships, this would be prohibitively expensive. But if we restrain ourselves, it's easy to model them statistically instead of physically.

That's the outrage engine I invented, and this is the shortest essay on it I could write. First time it's been less than ten pages long.

Tuesday, April 07, 2015

Pacing via Characters

Recently I watched this video. It's not even five minutes long, maybe go watch it first if you've never seen it.

Now, I'm not a huge fan of saying that comics and video games need to draw on cinema, but I don't think this is a cinema-only trait. It shows up in comics and games as well, we just don't have any good discussions of it.

We're talking about ways to move and maintain a story. In this case, the two ideas in specific are the way we connect story beats, and the idea of having several story threads running so we can switch between them. These are rather different concepts, although they tie together pretty well once you understand them.

Let's examine how they might work in a video game.

Story Threads

This is a common tactic in comics, often briefly switching over to show the villainous side of things whenever the heroic thread starts to flounder. Some comics switch between different sets of good guys. And nearly all of these comics have an omnipotent camera: we can see the thoughts of characters, the secret actions, it all plays out in front of us.

In video games, this technique is a bit rarer. Final Fantasy games tend to use this. Especially FF6, which had you play out each of the three main character arcs separately. However, even in FF6 the technique wasn't used to keep pacing sharp - you didn't switch between the branches, just played them in sequence. Instead of keeping the pace strong, this method was used to put spotlights on different groups and different parts of the world, allowing the player to have empathy with more people and places. Similar play elements such as the Laguna sequence are used in much the same way.

If a game wants to keep the pace up, they will use cutscenes - perhaps showing the enemy's board meetings or whatever. But this is not popular, perhaps because it's seen as a breech of point of view: most games have a definite main character, and seeing things they could absolutely never have even heard about is maybe a bit wobbly.

Some games get around this using inline second threads. A good example of this is System Shock 2's audio logs, where you would hear snippets of another thread that happened in the same place, but in the past. These audio logs served three purposes: pacing control, player investment, and exposition.

Exposition is obvious: you hear someone's audio log about toxic plants taking over the area, so you know what's going on and aren't totally confused.

Player investment is also pretty straightforward: you get attached to some of the characters as they continue to show up. Some of them are alive at the same time as you, and you can even seemingly interact with them in small ways, their later messages referencing things you did, or even talking about you directly. This leverage is not really used in the game except for once, but it's still there.

Pacing control is the most complex way it is used, because pacing control can be employed in a lot of ways. The audio logs are limited because they operate in tandem with the player's in-game actions. So the audio logs need to be placed in locations where the player won't immediately find themselves in a firefight, so the player can listen to the audio log in peace.

Well, with a few exceptions.

This means that all the audio logs are found during 'slow' moments. In movies, you generally switch to the second thread just when the first thread is beginning to slow, but in this case you interject the second thread to try and support the flagging pace of the first. Even if it contains no pacing elements in itself, its existence is a pacing element.

It can contain pacing elements as well. For example, hearing someone complain about psychic monkeys will put the player on edge, on the lookout for psychic monkeys.

Variant: Rashomon Rush

One interesting variant on this idea is closer to home. This is commonly found in sports manga. Instead of having multiple threads of story, you can really only have one thread: there is one contest, one race, one tournament, and you have to keep the audience interested throughout. Rather than cutting away to some other story thread, you simply show the tournament from the eyes of many characters.

For example, in Yowamushi Pedal, many of the chapters are entirely focused on a team bike race. From an absolute perspective, bike racing is just about the least interesting sport to focus on. It's not interesting to look at, it doesn't change very rapidly, it rarely has any unexpected interruptions. You can force some in - a crash here, a rainstorm there - but they are not really enough to make the comic feel dynamic.

What Yowamushi Pedal does instead is switch between the characters in the race. As the comic goes on the artist becomes more adept at this, often showing the viewpoints of two or three characters in quick sequence.

It's a bit like the "Dragonball Gasp" - the characteristic page full of reaction shots - except that each character has their own distinct thoughts and concerns rather than just contributing a dumbfounded expression.

This tool can be used both slowly and quickly. For example, in the Interhigh arc, there are three important teams. The "primary" team with the main character on it, a secondary team that they lost to last year, and a new team with a clear villain leading it. In this portion of the chapter, the primary team is out of position. Rather than focus on that, the comic takes half a chapter and focuses on a seemingly irrelevant contest between the villain and a sprinter from the secondary team who we've only seen in the background of a few shots.

Over a dozen or so pages, this fight unfolds. It involves flashbacks, half a dozen characters discussing the sprint without being able to see it, and, of course, the sprint itself. None of these characters are the main character. None of them is even a direct supporting character. It's a complex ballet happening without any of the most significant characters.

I guess how you feel about it might vary, but in the end we have created a solid new character (the sprinter), made the evil side look more evil, made both the rival teams look more virtuous, and also given the main team the time to enter back into the main story thread (front of the race) without needing to dedicate an entire chapter to it. Later on, the villain's villainry shines brighter and that particular sprinter gets to play a moving minor role near the end of the race.

It's a pretty good technique. It keeps the pace high without losing focus too much, it develops the main villain, and it develops a secondary character well enough to make us care about his performance later. Nevermind that his traits are dull and he could never take center stage for any extended period of time - he comes in just long enough to establish that the villain is truly bad and that the good guys are truly good.

Putting aside the flashbacks, we never "leave" the race. The race never skips forward or backwards. It's a contiguous event that continues happening throughout the chapter. Effectively, we're focusing on the elements of the race that are the most interesting, while also stockpiling reserves of good and ill will.

In a video game, game state is often quite complex. It's easy to lose track of the details between play sessions, or if you switch play modes. The ability to focus on a specific unfolding scenario while still changing out pacing and emotional investment systems is quite valuable.

It might be a little difficult to imagine what this would mean in a traditional computer game, but that's because traditional computer games are built to not use this system. Instead, imagine something like an MMORPG, where each player belongs to a faction and the power of the faction depends on their performance. The faction is part of a complex, unfolding scenario. The elves and the klingons are enemies, and war is slowly breaking out - planet by planet, treefort by treefort.

Some players log in for hours each day, and every detail of the conflict is always crystal-clear to them. But others only log in for an hour or two a week, maybe just casually, to hang out with friends. It's easy for the conflict to race ahead and leave them behind!

In the past, the question was how you could allow dedicated players to influence and enjoy the complex situation, while still making sure the casual players could enjoy themselves and not feel completely lost. So far, the only two approaches have been "screw the casuals" and "nothing ever changes".

This offers us a third option. Using "Rashomon Rush", we can

A) Slow down the fast players by introducing them to interesting side characters and quests with different views on the same unfolding situation.

B) Speed up the slow players by hitting the high points of their roster of characters stories without slogging through every moment of it.

But and Therefore

The other aspect of that video is "but" and "therefore". Basically, we want to tie things together in a way where every step in the chain moves us.

In computer games, it is common to have an underlying theme and core plot progression bogged down in endless repetition. To avoid this, devs carefully write a progression - level by level they plot out an interesting story. This can certainly work, but it is also quite limiting. Every time a player plays, the levels are the same. A player cannot go off the rails - the closest they can get is going down a different set of rails that the devs also thought of.

Let's consider a different option. If we free ourselves from the idea that a player must absolutely play the same avatar the whole time, a world of possibilities opens up. Instead of switching from Snake to Raiden at a predetermined plot moment, imagine if we switch when the player has reached "peak Snake".

So a clumsy player gets Snake caught. Instead of "Snake? Snake! SNAAAAAAAAAAKE!" we just get a camera pan out and then pan in on Raiden. Same scenario, but now we're playing Raiden. What's Raiden doing?

Rescuing Snake, obviously. Snake was captured, therefore Raiden will rescue him.

Oh, did Raiden get captured, too? You really suck at this game! But it's okay. Pan back to Snake. He's halfway done escaping! Take over!

Functionally, Raiden and Snake will get tiresome because they have the same basic powers and play style. To use this method, we really need to have characters that have very different viewpoints and failure conditions.

Again, we can look to sports manga for an easy solution. Although the whole team is playing in the big game, each character is portrayed as having a different role and being interested in a different tiny piece of the game. While we are focused on one person, the other team members continue to operate in the background. We only give the lead to them when they have something to add to our story - something to react to.

Imagine something like Grand Theft Auto, except that you play three characters that aren't boring thugs. Each of your characters has very different and conflicting goals. As you try to accomplish those goals through a combination of open-world play and open quest lines, you will change the world around you. Whether it's blowing up a gas station or preventing a bank heist, these events can easily become a plot point for another character with a tangential set of interests.

You blow up the gas station? A minute later, you're playing a fireman getting harangued for not being able to put out the fire. You thwart a bank robbery? A minute later you're playing the robber, trying to escape from the police car.

This is pretty basic stuff from a script writing perspective.

In fact, it's so basic that you can automate it.

Theme Chain

There are a lot of things we want to automate. Let's discuss them.

1) Cut Away
We want to cut away from a player experience when they're about to go through pointless downtime. This is not as complex as it sounds: after a big battle or cataclysmic event, there is a rapid decline. We want to cut away while we're on that decline. Any point on that decline is fine.

We need to be aware that not every event is big enough to do this. In GTA, blowing up a gas station probably isn't significant enough. But there is one thing that is extremely clear: death. The simplest algorithm for this is to cut away when you die, and then 'therefore' using the largest thing that happened during your life (which may have been your death).

If you build from the ground up with intent to create rising-falling action curves, it's not hard to create the proper shapes in a more fluid, explicit way. But it can be crammed into standard game designs as well.

2) Thereforing with Themes
When we switch from character to character, it's not just a matter of choosing when to cut away. It's also choosing when and where to cut back in. We need to cut back in on a "therefore". If you burned down a warehouse, we need to cut back in on someone dealing with the fallout from that. We need a way to have logical connections between significant events such as major property damage and other characters that have to deal with them. It's not hard, but it has to be programmed in.

But here's the trick: character themes and gameplay are more important than strict continuity.

Gameplay should be obvious. You can't cut to a firefighter putting out the fire if there's no gameplay about putting out fires.

Character themes are a gateway into cutting properly as well as having a very strong, cohesive game.

If the overall theme of the game is "searching for sparks of hope in the ashes", each character would have a specific theme related to that. For example, our firefighter might be all about finding hope in the survivors of disaster - IE, rescuing people from burning buildings. This is an explicit theme. It's programmed into the game in an explicit way. The algorithm which determines what happens after significant events includes hooks for this exact theme.

If we burn down a building, the algorithm understands it needs to talk about survivors. So it spawns a "survivors" hook. There would be a variety of them - one where you are talking to someone you rescued, one where you are held back from rescuing people because it's too dangerous, one where your boss calls you in to berate you for not rescuing anyone, one where your boss berates you for letting things get out of control and you yell that at least you saved some people, etc.

Every character contains a batch of "flexible hooks" like these. When a significant event needs to be "therefored", you simply thumb through all the available characters and check for who has the strongest hooks available in response to that event. The specific hook will tell you when and where to cut back in, and the strong theming will naturally flow into the overall experience of the game.

3) Exposition
By skipping around, we are missing out on pieces of the puzzle. Moreover, we're always creating new pieces of the puzzle. In our effort to move from the person who blew up the warehouse to the fireman who failed to put it out, we have to make it clear what happened. If we're using a Rashomon Rush, we have to explain to slow players what has unfolded when they weren't watching. Etc.

There are three big ways to do exposition, and you may want to consider all three.

Cut Scene: when we cut from one character to another, we can start the new character's section on a cut scene or similar interaction. That can contain the data we need. Getting chewed out by your boss for failing to put out the warehouse fire clearly establishes when this is, who we are, and what happened. This exposition should be built into the hooks that allow us to cut in.

Background Chatter: audio logs, people talking, posters - we can say a lot by changing the ambient background stuff. If the elves and klingons are gearing up for war, put war propaganda posters on all the walls. People who have been logged out for a month can log in and immediately see the posters, immediately understand where society is at.

Job Change: if your avatar's role, priorities, or side missions have changed, it clearly indicates a changing situation. For example, you played a cop for a while but then were someone else for a few weeks. When you jump back into the cop, she's gearing up in black body armor and carrying an assault rifle - you know something has changed.

4) Emotional Investment
Normally, in order to get a player emotionally invested in a character, you have to have that character directly affect the player. For example, the villain has to stop by to kick your ass personally, or a heroic secondary character has to do something helpful for you.

By allowing ourselves the freedom to switch between characters, we can develop emotional investment without needing to tie it directly to the primary avatar. We can switch to the villain and be evil. We can switch to some arbitrary character that the villain is screwing over. Etc, etc.

Emotional investment is extra touchy when it comes to randomly generated characters. If all your characters are handcrafted, your hooks and scripted plot events will probably create plenty of emotional investment. But if your characters are arbitrary or random, there's nothing to grab ahold of.

Well, you can use random characters to generate extra emotional investment by having them struggle against another, more important character. One-off random characters can have relatively dull traits and, as long as they are constantly under pressure, it'll work out: it'll generate a lot of emotional investment for more important characters nearby, and also generate some investment in the dull random character themself. Later on, you can bring the minor character back for cameos and it'll feel great.

This is also a good way to keep pacing strong without needing to have a huge number of carefully themed main characters. Just occasionally throw in a random side character with a batch of random traits.

Anyway, I hope this was coherent: I'm just trying to say that we might want to explore switching our point of view a lot more often.

Monday, March 30, 2015

RPG Characters: The Obsidian Method

I played some of Obsidian's new game: Pillars of Eternity. Obviously, I haven't finished it. I only spent about 40 hours on it.

It's good, but I'd like to talk about design a bit. I am vaguely creating an RPG engine, so it's good to think about these things, have tools ready to help people do them.

So let's talk about the Obsidian NPC method, AKA the Bioware NPC method. I first ran into it in KotOR, so it's Obsidian's method to me. It was also used in Dragon Age, Mass Effect, and of course, Pillars of Eternity.

This is a very polished formula, and if you follow it, you'll produce good results. That said, it's not applicable everywhere and has its flaws. Well, let's learn it!

Step 1: Pick stereotypes
Your characters are based on stereotypes. You want to pick a variety, because every player will have different preferences and therefore feel happy with certain stereotypes and annoyed by others.

For example, in Mass Effect, Liara is the sexy nerd stereotype, Ashley is the no-nonsense career woman stereotype, Kaiden is the earnest man, Garrus is the brash man, Tali is young Romani, Wrex is the jaded warrior.

The stereotypes can be quite niche ("young Romani" is a pretty rare one, as is "fast-talking uber-nerd"), but they're still stereotypes.

Step 2: Pick facets
Each character has two things that they explain about the universe. Normally, one of these things is their species or culture, and the other is how their job is related to how the universe works. These should hopefully gel well with their stereotypes.

For example, Liara embodies her species (sexy) and the search for the precursors (nerd). Garrus embodies his species (manly) and the lawlessness of the Spectres (brash). Wrex embodies his species (jaded warrior) and explains the non-earth, non-citadel militaries (jaded warror). Ashley embodies earth military but also the racism endemic to the earth military. Etc.

The characters serve as windows, introducing the player to their concepts and, in turn, the concepts that make the universe tick. As the game progresses, they will continue to weigh in on these topics and offer side quests related to them.

It can be difficult to balance these facets. Liara represents her species, and her species is a constant background hum to the game, popping up frequently. So that's a good facet. But her other facet - investigating the precursors - is not a good choice. The precursors aren't ambient noise and don't pop up a lot in the course of play. Instead, they are critical plot points. That means she has to do a lot of exposition and cannot really express herself as a character.

Tali is a really good combination. Her species aren't as common as Liara's, but she has a lot to say about them and it strongly affects her design, so they are present through her. It also supports her being able to comment on the opulence of your civilization. Her second facet of Geth obsession seems like it'd run its course and stop, but it segues nicely into her having things to say about the Reapers as a whole. It also supports her having things to say about technologies in general. She is rarely required to be exposition, because the things she has to say are rarely required to understand the situation. So she is free to comment from her personal standpoint, which makes her seem alive.

Looking at KotOR characters, you can see the same kinds of designs. The Force-sensitive characters have things to say about the nature of the Force instead of their species, and it works pretty well.

Step 3: Audiovisual Design
Each character needs to have a distinct audiovisual design which makes their character unique and appealing while reinforcing their stereotype. If they are another species, then their species design needs to also support their stereotype.

Visual design is important, of course. Color and costume shouldn't be overlooked, either. Audio is often overlooked, but it shouldn't be: Garrus and Tali were popular largely because of their modulated voices and memorable voice acting.

The problem with the first Mass Effect game was that 99% of the unique design came from the species rather than the characters. This really showed in the human characters, which were so blandly designed that nobody could remember them.

In the later games, the human characters were designed to be a bit more memorable - largely through costume choices. It's tough. You get a stark breadth of possibility when you're using different species. Trying to distinguish within a species is always going to be more difficult.

Step 4: Integration into Game World
In order for the NPC to be memorable, they have to make an impact on the player's mind. The best time to do this is during their intro segment - they will typically join up during a particular mission and you will be more or less forced to use them until the mission is complete. During this time, they need to shine.

After that time, it can be difficult to guarantee that they will be in the player's party. If they are in the player's party, they are going to be able to comment on things - even just simple shouting during combat can make a big impression. But if they aren't in the player's party, they might tend to fade out of the player's mind pretty quick.

Performing "impact in absentia" is therefore very important. The way to do this is to have the facets the character represents keep coming up. The player will remember that the representative character exists, and perhaps switch them in so they can get their ambient opinion on things. You can also have them call in with comments, or even be hanging out in the game world when they aren't in your party.

You can also force or strongly insist the player take specific characters - for example, if you go to Wrex's homeworld, taking Wrex just makes sense.

Ongoing updates/unfolding backstory are also a good way to do this. Chatting in the safe zone, getting quests, unlocking new costumes or powers, pursuing a relationship, etc. Just keep in mind that if a character isn't in the party, the player probably doesn't like them very much, so you have to write with that possibility in mind.

Note: Things Not Included

A lot of typical character design concerns are simply not important in this scaffold.

First off, you don't have to worry about character arcs.

The player is probably going to want to earn the NPC's trust and allegiance. This is normally done through some dialog options and side quests, and while you can make that a character arc, it's not necessary. The character's important change is in how they interact with the player, not what their fundamental personality is. If you do decide to make it a character arc, be careful not to alienate the player with the "before" half of the arc, as with "Ashley the Space Racist".

Second, you don't have to worry about softening or hardening their stereotype.

They are integrated into the world through their facets, so they should feel like they exist already. Their personality should feel like it naturally arises from their situation, so you don't need to go out of your way to alter their personality. The stereotype will soften naturally because of the nature of the structure.

Conversely, don't try to play up their stereotype. Liara and Tali are borderline offensive stereotypes, and if either one had been played up even an inch, it would have been obnoxious. Because their personalities seemed to flow from their situation and didn't feel forced, they were largely accepted.

If a character seems iffy when you don't try to adjust them, their core stereotype is probably bad. Don't use it at all. Don't try to "soften" an offensive or ill-fitting stereotype. Just don't use it.

The Numbers Game
As you might guess, not all characters appeal to everyone. Because of this, there is one last piece of the puzzle: having the right number of characters.

The Obsidian/Bioware approach is to have 5-7 NPCs, but only have a party of three people total. That is, two NPCs. You need to choose two out of the seven.

This percentage is good: there are going to be two stereotypes you can generally get along with. But there are also going to be at least that many that the player can't stand, because they hit sore spots. And then the rest will probably strike them as too bland to bother with.

You need to carefully balance your combat/skills to allow for flexibility. If the player ever feels forced to take a specific NPC due to a skill or combat role requirement, they're going to be annoyed. Being forced to take an NPC because the NPC is actually involved in the situation is a lot less obnoxious.

Fundamentally, playing the numbers game is actually a numbers game: you need to be sure that every given player will feel comfortable and happy with at least two of the characters, and not so offended by any of them that they stop playing immediately.

This shouldn't be considered "weakening your vision". Considering your characters from a variety of diverse viewpoints is pretty reasonable, and the result should feel like your universe is full of people with a lot of different viewpoints.

IE, realistic.

Final Thoughts
This NPC method is not always the best. There are a lot of times this fails. In fact, I think it fails in the new Obsidian game. But it's worth understanding and it's a pretty good formula if you don't know where to start.

Monday, February 23, 2015

Basebuilding With People

So, I played a LOT of RimWorld recently. I think it's a great game, but let's talk about some of the places it could have gone. Some of the tantalizing bits it showed hints of, but never went into.

One of the things I really liked doing in RimWorld was disaster recovery. Like most basebuilding games, the challenges RimWorld introduces are usually "nasty things trying to kill you". This is a really boring kind of challenge because it's very binary: you tend to either win handily or get annihilated, neither of which is very fun.

But RimWorld has a few situations that are a bit unusual. If you're attacked by people, they often survive your gunfire and go into shock. You can then haul them back to your base as prisoners.

The prisoner system in RimWorld is really primitive. There's no work system or deprogramming or any of that. You can do some nasty things - sell them as slaves, harvest their organs - but it's very basic and flat.

The thing I liked doing is repairing them.

Most of the time, they would be pretty screwed up by the firefight. I enjoyed making cybernetic limbs for them, patching them up, and letting them go. There's no bonus for doing this. Your faction score doesn't increase. Even the individual prisoners don't like you any extra for it, so it doesn't help you convert. But it's relatively engaging.

Then I discovered a mod that brings a whole starship crashing down on your head. You tend to pick up half a dozen survivors, all of whom are really ripped up by the crash. Suddenly there's a very specific drive to your opening game: you want to patch up the survivors. And this drive doesn't really stop, because once you've given them peg legs you realize you can give them cybernetic legs, then bionic legs, and so on.

This is all possible because of the ridiculous Dwarf-Fortresslike body simulation. It's quite easy to empathize with someone who has suffered, and seek to ease that suffering through the medical mechanisms of the game.

Even the basic challenge of the ship crashing down around you is fundamentally interesting, because it's something you weather, not something you defeat. If you lose people or resources or whole buildings, you can be assured that you can come out of the other side anyway. It's not like the disaster will hunt you down until you defeat it, unlike goons with guns. For a basebuilding game, this kind of challenge feels fundamentally better: there's no terminal state, so you can see how your base performs and then fix it up.

However, this runs into the weakness of the basebuilding genre: faceless NPCs.

See, all the NPCs in this game have a variety of traits and stats, just like in most modern basebuilding games. There's a complex simulation of their physical state, and a marginal simulation of their mental state. They often have a marginally unique sprite due to combinations of body and hair sprites/colors. But once you hit about six people, you can't remember most of them any more. You can only actively remember a few of these NPCs, even though you can remember dozens of real people with ease. Why?

Because people aren't defined by a list of stats. They are defined in contrast to other people, including you. This forms a social terrain.

Look, it's easy to remember when an NPC is missing limbs, because their physical body is defined in contrast to the physical world. You can see them move slower (or not move). You can see them work slower, more clumsily.

An NPC's "social body" needs to be defined in contrast to the social world. And there isn't one.

Basebuilding games use a massive amount of time compression to keep you focused on building and managing your base, and this makes it very difficult to get a feel for any kind of social situation. The only way an NPC has time to show social inclinations is if you remove them from the brutal pressure to manage their day as efficiently as possible.

You can see this in Dwarf Fortress. There is a basic social structure: children, nobles, enforcers, and so on all feel like they belong to a social structure of some kind. However, this is accomplished by removing them from base management. In order to give them time to be socially distinct, you remove them from the time-compressed burden.

Well, why not drop the time compression?

Time compression is inherited from RTS games, but there's no need to keep these RTS mechanics. Let's get rid of the guys with guns and let's get rid of the time compression.

Instead, we can just use time chunking. When you decide to start the day shift, time moves forward rapidly until the end of the day shift. You have a basically unlimited amount of time in the morning and evening to plan out your base, schedule your people... and more importantly, watch them interact with each other and you.

There would need to be some kind of thing to do during the slow periods, but that's the point: we can start to really rev up our people skills.

We can structure your base personnel in a much more explicit social world. A branching tree of social leadership. A mental simulation as complex as our physical simulation. Tweaking people's mental state in the same way you'd tweak their physical equipment or cyberwear.

This is only possible if we remove the time compression. After all, socializing is what you do when you're not under crushing pressure.

Well, you can socialize while working, or at least have a presence in a social society while working. But only if you're not under time compression. Time compression means you still don't have enough time to express yourself, and even if you did, the player would not be paying attention. They're too busy planning out some other part of the base.

Hm.

Those are my thoughts. I have a lot of prototypes in mind, but I'm so busy.

Playing RimWorld.

Friday, August 15, 2014

Moddable NPCs

I've talked a lot about mods a lot, and I'd like to talk about NPCs.

Even with highly-moddable games, the NPCs are miserably difficult to manage. Skyrim probably has the most moddable NPCs, but the way the NPCs are implemented in the base game really limits their behavioral flexibility.

So, let's talk about a game where modding NPCs is the point.

You play a godling. Not in a gods-eye view, but as an actual person in-world, similar to Skyrim. Your big power is to create people out of clay. They turn into living NPCs, and you can interact with them.

The basic loop is that the NPCs generate resources for you. You can gather some resources on your own - clay, water, grass, and whatever else you can find - but those are very basic and there's no crafting. Instead, you set the NPCs up to generate resources. First you create a farmer, and they make food. Lots of food - enough to feed everyone else nearby and still give you a stack of foodstuffs if you decide you need them. Maybe you create a woodcutter to create lots of wooden planks so you can build wooden houses instead of log cabins. Maybe you create a carpenter to turn wood into furniture, so you can fill those new wood houses with nice furniture. Maybe you put a shrine in the house so they can worship you and give you spirit points. Or a library, so they can generate new ideas...

As time passes, the NPCs will get better at their jobs. This isn't stored as some internal skill variable. Instead, it is evident in the tools they use. Their tool shed becomes more full with higher-quality tools. Their bookshelf is filled out. Their yokes & ploughs upgrade to the next tier. Their skill is represented quite concretely by the objects in their home. Trying to move these items to a new home will lose a lot of the upgrades, so it's kinda-sorta-vaguely NPC-specific.

While there is some challenge to creating a good flow for all the resources you'd like, the real challenge is in keeping your NPCs alive. You can create them easily enough, but if they are put under too much stress, they revert back to clay statues. They're not really dead - you can wake them back up as long as the statue isn't destroyed - but they certainly aren't living.

Unfortunately, these NPCs are very vulnerable to stress. Their default state is "dead of stress", and it gets much worse if they have a job. You have to build their homes to alleviate that stress.

For example, if you're going to start by building a farmer, you'll obviously need to give her all her farm tools and so on... but you'll also need to set up her home so she can survive. A bed, kitchen, and so on are all required to prevent added stress due to exhaustion and hunger. Then you also need to set things up to reduce the stress she is under! A fireplace, candles, some books, a veranda, some company...

There's no need to simulate the NPC's stress in real time - it all derives from the furniture in her house. The NPCs are simulated when you are nearby, but that's for social purposes, not for statistical purposes.

So, you set up a little farmer family. They farm, and they support each other, and stress is kept to a minimum. However, nothing lasts forever. As time passes, all the furniture in the house drifts and/or decays. This won't affect something like a workbench, but things like beds and chairs and bureaus and costumes all migrate and/or degrade. So your carefully balanced house steadily falls out of true, and stress becomes an issue. Eventually things will drift far enough or decay badly enough that the NPCs turn back into clay statues.

This is often a catastrophic spiral, because a lot of the stress relief comes from other NPCs. The farmer parent's bed is a double, with each side assigned to one of them. This creates a romantic relationship between them, and that really reduces stress quite dramatically. But if mom turns to clay, that stress relief stops happening and dad quickly turns to clay. Of course the children are likely to turn to clay as well, since much of their stress relief comes from being taken care of by their parents (indicated by the parents ownership of things like the kitchen, front door, etc).

Now, the moment-to-moment behavior of the NPCs is actually handled the same way. Every object can create a "state" for the character, and that state has certain kinds of behaviors and takes certain kinds of inputs. It's very freely done, and the heart of the modding system. Each state gets to "vote" on what it thinks the action of the NPC should be at any given time.

For example, the parents share a bed, which sets up their romantic relationship. In addition to being stress control, this also creates a behavior state for each - the romantic interaction state. Romantic interaction probably doesn't mean "having sex" - it means the gentle interactions over the course of the day that show they are used to each other and think of each other frequently. The romantic state only votes on situations involving their lover, and it doesn't always win the vote: another piece of furniture might cause the pair to fight, or just do things other than get along gently.

Moreover, the state of the bed can really change the nature of their interaction. Different beds might have different nuances - perhaps certain relationships are more bitter, or more brusque. Each side of the bed can be customized with a pillow, or perhaps have several states such as made/unmade, bedspread, etc. These can all be used as markers for different tones in the relationship.

It might feel stupid to rely on things like a specific color pillow to represent a specific kind of interaction, but the point is that the NPCs can swap out the components randomly over time and their relationship will drift. By controlling how things get swapped out and how likely things are to be swapped in various ways, you can control how relationships grow or degrade. This is still clumsier than having a simple state machine hidden inside the NPCs, but it's much easier for the player to understand and control.

Moreover, the relationship system is bound to the specific bed item type. Use a different bed for a different kind of relationship - not necessarily just a different nuance: it can be a completely unrelated mod with similar functionality. You can have both mods loaded into the game without difficulty: one is tied to beds A&B, the other to bed C. In fact, there's nothing preventing you from having several beds for one pair of people, each with a different relationship attached, resulting in several simultaneous romantic relationships.

That might sound broken, but there is a limiting factor:

The more rooms and furniture you have in a house, the more maintenance stress. This stress is distributed evenly among everyone, unless you have cleaning supplies assigned to specific people, in which case it is dropped on them. In the short run, mom and dad having three beds is quite nice, and stress is really kept very low thanks to the stress-relieving property of beds. However, as the beds decay, their stress relief drops off quickly and the relationships become rocky. The amount of maintenance stress does not drop off, so stress relief drops off three times faster than it would with a single bed.

You can build a wealthy nobleman's house, lots of beds... just assign the maintenance duties to servants. That's how the pampered live their lives. Of course, their position of authority may involve taxing their citizens, in which case the citizens will all gain more stress because of the nobleman lording it over them... but there are advantages to that, with the nobles generating resources ordinary people can't generate. Well, that's one approach, at any rate. Maybe you have a different set of "nobility" mods loaded in.

Anyway, all of this is done through an open API, allowing anyone to compile a plugin using the Unity framework. An integrated mod manager is actually pretty easy using the asset management tools in Unity, so this would be pretty easy to mod. It could also easily support multiplayer shared worlds due to the low amount of simulation required.

There's a lot of other details. For example, the alignment and position of furniture often matters. A chair facing the fire is relaxing; a chair facing a desk will help generate ideas; a chair next to another chair will make the two people assigned to those chairs get along and have lower stress. Another thing to keep in mind is that NPCs might have different "hearts" - while they are all made out of clay, the seed you build around can be any small item. This can allow for NPCs to also be directly modded rather than always relying on furniture.

Well, all in all it's actually not a hugely difficult game to start. At the beginning, it's just a simpler version of The Sims.