Wednesday, November 25, 2015

The Resurgence of the Civil War

So, apparently the new superhero megamovies are going to be about the civil war arc. HAHAHAHAHAHA HAH HAHAHAHAH HA-

sorry, lemme 'splain.

I last dived into superhero comics just when that arc came out, because it was sort of a concrete arc with a definite beginning. Before, after, and during that phase, I was pretty much done with superheroes. However, it was entertaining to read what I did, because it was so amazingly bad. Then the video game about it came out, and it was so amazingly bad.

If you are a comic nerd, you probably know all about the civil war arc. For everyone else, here's the basic idea:

A terrorist attack convinces the government that people with superpowers cannot be allowed to run rampant, and they decide it's time to register them. The heroes split down the middle, half of them siding with the government's programs, and half against. Hence the title.

Now, this is a concept with an incredible amount of potential. Especially nowadays, with our hilariously racist and ineffectual "anti-terrorism" activities. Since it's a fictional universe, it could be played either way, with either side being "correct", or with both sides having merits, etc, etc.

But it's important to remember that fictional universes don't exist in a vacuum.

First, this is a non-mutant thing. Captain America and Iron Man and all those people. But Marvel and mutants are the progenitor of the "mutant registration" storylines. In fact, Marvel's universe is stained bloody red with the concept of registration from the start: Magneto is a concentration camp survivor.

Mutants not only have the chops to tell these stories, they did tell these stories. They started off with these stories and kept bringing them up. The entire nature of mutants gives credence to these stories, anchors them in believability.

On the other hand, with non-mutants, the universe is set up to tell stories of individuals proving their personal merit. Each hero chooses on their own to fight evil with whatever power they have personally managed to obtain.

So as you might expect, it quickly went awry. It felt like the "civil war" was between the writers, with half staunchly backing the registration as the right move, and the other half staunchly against it. Each writer obviously believed his side was right and the other side was bullshit, but since writers constantly rotated in and out of view as each new issue was released, the result was a chaotic mishmash.

In the end, the storyline went off the rails with cybernetic villains and corrupt prisons and so on. This could have been very interesting... But it was very rushed and was obviously just a way to get all the heroes to drop the issue and work together for the climax.

So... what do you think this movie will be about?

I bet it will be carefully washed out. We wouldn't want to draw any parallels to modern society, to our treatment of Muslims and anyone that looks vaguely Muslim. We wouldn't want to have any meat in our popcorn movies, or accidentally make anyone think!

Water it down, water it down.

From watching the trailer, it looks like they've watered it down to the extent where all they've kept is the nonsense writing, with all the heroes acting out of character for no reason. Without the social commentary, I wonder how well that will go over?

Edit: An earlier version of this essay forgot that DC basically doesn't exist, and that Marvel's responsible for literally everyone.

Monday, November 23, 2015

Open World Epic

So, recently I've been revisiting some of my favorite old sci fi things, and watching some trailers for more recent sci fi things (for example, this Cyberpunk 2077 trailer). I thought I'd talk a bit about making stories, worlds, and scenes with impact.

Now, in linear media, this is pretty well-understood. Books, movies, trailers, songs: all have pretty clear techniques to make things deep, moving, and epic. But games are not really well-understood, typically borrowing from those other media without being able to apply it very well.

If the game is linear, this might not be a huge issue. Linear RPGs and FPS games are quite comfortable dropping into movie-trailer-style cutscenes whenever they need to, and this works to some extent.

But this falls apart when a game is nonlinear. A good example is the proliferance of "open world" games like GTA, Minecraft, Witcher, Fallout, etc.

Most of these games have a linear storyline that progresses in fits and spurts as the player reaches for the next plot element. Right now, the key is to ask permission to take control. You let the player know what they have to do to progress the plot, and when they do that thing they are prepared for the long, noninteractive cutscenes. This works reasonably well, but has some very serious flaws.

Chief among those flaws: bad mood control.

The world has its own feel. In a linear game, the world changes as you progress, so the feel can change. But in an open-world game, the world is largely unchanging - or, at least, the mood of the world rarely changes. In fact, the mood is typically super-bland so that the player never feels alienated by the world.

This means that even if a player is willing to do the next plot event, there's absolutely no guarantee that they are in the right mood. If you want to something moving and epic, you have to spend several minutes prepping the player, pulling them into the right mood, and that's just the worst way to design an experience. This is even nastier if the player dies and has to redo the mission: they either skip the prep and are in the wrong mood, or they sit through it all again and get annoyed.

The good news is that I think there's a pretty easy way around it: work with the player during their open play experience.

One way to do this is very similar to adaptive difficulty. Detect which of the basic gameplay modes the player is in, and expose missions based on that. If they're in an epic fight, have a big boss show up. If they're hiding from the cops, have the hunter squad come in. If they're cruising down the highway, have companions start chattering or a new road show up, or whatever. If they're walking through the streets feeling mellow, pop up quests based on that - a companion shows them their favorite place. A villain invites them to sit at a cafe and have lunch. A street vendor tries to sell them a weird old talisman that he swears is magical.

This basic system relies on a pretty clever system which detects the player's activities and can create or surface good responses without stepping on anyone's toes. This would require a bit of work, and there's no industry standard method of doing it.

There's an easier way, though, one that leverages the open-world nature of the game: have your open world have different places in it.

This sounds obvious, but open-world games typically do not focus on the places in their game, instead only focusing on the "content" in those places. You go to Elvisburg because it has the next mission in it, not because it's a cool place to be. If we can change that, we can make each neighborhood have their own mood, and have missions in each neighborhood reflect that mood.

For example, if you wanted a plot event where a good friend was murdered, you'd make it happen on Murder Row, the brutal neighborhood. In Murder Row, the mood is always suitable for a moving death scene, so the player would be entering the right mood before they even reached the quest marker. Whether they are drawn into the neighborhood seeking the quest marker or whether they just wanted to explore, they'll be in a suitable mood.

It's not quiiiiite that simple, though. There are a few more things required.

1) A reason to stick around. If each neighborhood is just a place to store quest markers, nobody will stay in a neighborhood long enough to absorb the mood. This can be collectibles, hacking passerby, scaling buildings for burgling opportunities, hunting missions, managing local resources (expanding shops, furnishing buildings, harvesting crops, etc). It can also be more passive things, like only regenerating mana while you're standing still, or being able to spend time with a date literally anywhere, or having to talk to locals to level up in various ways.

2) Less permeable neighborhoods. Restrict fast travel (both in terms of high-speed vehicles and in terms of clicking on a place and teleporting there). If you have fast cars, encourage the player to put a beacon on their map in the place they are trying to go, and then use that beacon's location to establish music, palette, and other things, so they are drawn into the mood as they are underway. A big problem with establishing mood is that the player tends to go straight to their destination without spending any time on the intervening space, so we need to fix that.

3) Progressive music. It takes less than a minute for good music to pull a player into the right mood, so have regional ambiance that pulls the player into the proper mood. Musical progression will automatically make the player want to hang around, which will automatically make them discover the various things to do in any given place.

All of these things are fundamentally about wasting the player's time, but the point is to waste small amounts of their time to make your world feel real and your events feel epic, rather than wasting their time on a cut scene to do the same thing.

It has limits, of course. It's hard to set up any epic murders on the beach, because the mood is always wrong. Well, you could change the beach's mood if the next plot event is on the beach and dark.

Either way, in the end this is opportunistic events. When you know what the player will feel, you can place events that suit that mood and are epic. Whether you monitor how the player feels, or whether you draw them into feeling the right thing, it is still a solid approach.

But... it's not very well-suited to a linear plot line. The linear plot line of most open world games is a chain of specific events, one after the other, while allowing the player to run around as they see fit between. This system works better if you have many chains of events with many different moods, so that no matter what the player is feeling, something cool and suitable will happen.

Character-driven stories are a good fit, here. If you have a dozen important companions, you can have each have their own linear story. Paced properly, there will always be an event for each mood. Just be careful: if a player really hates a particular mood, they could push all the character plots forward until everyone's next event is in that mood, then get stuck trudging through ten missions in a mood they hate. It's probably better to have two mood variants for ever character's next step, so that doesn't happen.

Anyway, that's my idea. It's not complicated, but I like it.

I think it will make open world games feel "right". The weird, clumsy feel they have today is probably just because nobody's really taking advantage of the nature of an open world.

Wednesday, November 18, 2015

Alternatives to Dialog Trees

I was thinking about dialog trees. I made a video about how they're not very good, but I'd like to present some alternatives.

Obviously, one alternative is keywords. Whether typed or added to a list as you discover them, this allows you to steadily uncover new topics in the world and converse with existing NPCs in new ways.

There's a lot of untapped potential in this idea, but it's far from the only idea.

Let's consider the purpose of dialog trees.

In linear, story-driven games, a dialog tree exists to A) tell the player what's going on in the story and B) allow the player to steer the story along predetermined paths. They are limited to predetermined paths because the assets (dialog, visuals, enemies, dungeons) are created custom for each choice.

This is also true of keyword systems. Each keyword is painstakingly scripted with a particular response intended to help draw the player into things. It may not be quite as plot-centric: there's a lot more choices and a lot of them are only tangential to the NPC in question, so often a response will be world-centric or NPC-centric instead of plot-centric. Still, the basic idea is the same: scripted ahead of time.

We do have other options. For example, you can generate topics algorithmically and have different NPCs assigned to know about different aspects of it. NPC 1 might know where the next event node is happening. NPC 2 might know what kinds of enemies you'll face. NPC 3 might know the treasure reward. NPC 4 might have hints for what will happen next.

We can script it in a way where we can substitute in values freely, and allow them to be generated rather than scripted.

This isn't a bad idea, but it doesn't take long before it devolves into dull clue-hunting. Rather than the NPCs being people, they start to feel like cards you just flip over and glance at to see if they're the one you need.

To have us consider the NPCs as people, they need to be more than sources of information. Making NPCs more complex is easy - I can build NPCs that have schedules, like random things, behave differently depending on the weather, whatever. But this complexity only matters if it is "surfaced" to the player. That is, if the player never wants to interact with that complexity, the complexity is just in the way of what the player wants to do.

The complexity we can create depends on the mechanics of the game world. For example, in Rune Factory the calendar plays a big role. So the characters have birthdays and celebrate different festivals in different ways. But this wouldn't work in, say, Fallout 4, because the calendar doesn't matter in that game.

This is an "offloaded" method of interaction. Rather than building a complicated way of interacting with the NPCs, the method is deceptively simple: it's limited to "talk" and "give gift". The complexity comes from managing your timing and the gift you give.

This is "deceptively" simple because it is functionally equivalent to keyword dialog. The only difference is that rather than choosing time and gift from a menu that pops up when you talk to the character, you choose it from the world. You pop up your inventory list and select the item from that. You waste time until it's the right time, and then trigger the event. It's fundamentally the same, we've just offloaded the menu options to world interactions that carry over when you interact with the character.

Of course, this is a bit more "punchy" than an ordinary keyword system, because if you select the wrong options you will suffer a penalty rather than just getting to try again. That's the real difference between this and the keyword system: choices have ramifications.

What kind of interaction system do we have where choices have ramifications?


Shopping is about choosing things you want to buy and sell. The exact things you buy and sell depend on your resources, the kinds of things the NPC sells/buys, and what you are trying to accomplish in the larger scope of the game. It never feels complex, but choosing whether to buy a piece of armor, a potion, or a weapon is a surprisingly complex dance that players can pull off intuitively.

Right now, when we think about choices with ramifications, we tend to think of dating games. Choosing gifts and dates and pandering dialog choices. But I don't think that's a good mechanic. I think we should consider our social interactions more like shops. Rather than a given choice being bad or good, it's about a given choice suiting your needs and tactics.

There's no "bad" options in a shop, because weaker options cost less and stronger options cost more. Even meta options such as buying shares or directing supply runs aren't good or bad, they depend on how much you plan to return to this area and whether it suits your current means.

If we just push the shop metaphor, we can have various events, behaviors, and favors treated as items to buy and sell. As when they were weapons, armor, spells, and ammo, we could also make them things that are equipped or deployed in the field, rather than things which are isolated to you and the NPC.

As an example of this, let's say we're doing a sort of Power-Rangers-Style game, where you play a bottom-rung wannabee hero always struggling to put together a team for any given mission. The NPCs in the game are all Power Rangers themselves, although most have a non-Ranger life such as scientist, vampire hunter, or Teen With 'Tude.

When you interact with them, you can "buy" their participation in your battles to some extent, ranging from helping to keep civilians safe to being on your party proper. You can also get them to loan you their various power crystals, suit enhancements, weapons, cars, etc. You can buy loot - monster drops that they have little use for but would enhance your suit pretty nicely. You can also buy their words and "equip" them: they vouch for you to authorities or other rangers, their encouragement or advice in battle. You can recall their words and lean on them.

They are also the only way to increase your stats: training with them is the only way to spend XP and raise various stats and skills. This includes stats like "heart" and "inspiration", as well as developing new battle cries, suit elements, weapons, cars, giant robots, etc.

That can also benefit them, since the only way they can improve is to train with someone at least their own rank in a stat. That someone might as well be you, right? Unless they already have a good friend that will help them train that skill...

To balance your requests, you can "sell" things. That includes all the things you can "buy", sure. But your participation in their battles and your words of encouragement are probably not very valuable. You might have got some decent loot to sell, but probably not, not unless they're lower level than you. You offering to train them is probably not going to be too much use, since most of them already have a group they train with and no reason to switch.

So instead you bribe them with the dumb B-plot events that Power Rangers is known for. You take them to McBurger. You give them advice on their crush. You go on a double date with them. You help them prepare for their school play. You teach them math. You sub in on the sumo wrestling tournament because they sprained their ankle yesterday...

We've turned the negative into a positive. We've created a way to pull you into the dumb B-plots of this kind of game.

It's just an example, but I think it's a good example of alternatives to dialog trees.

If we throw away the need to push the player into our preferred plot line, we can allow the player to wander through all the little threads and tie them together in a unique, meaningful way.

What do you think?

Tuesday, November 17, 2015

Decay as Mechanic

As I've been playing a lot of Fallout 4, it's reminded me of the same thing it always reminds me of: keeping a vault running for 250 years is an interesting challenge!

Every few months I revisit the concept of a base-building game about that kind of thing. How about designing a castle, then aging it 500 years and seeing how it fares, maybe fill it with monsters at let you storm your own old castle? How about a starship that spends generations between the stars? Or, when a new Fallout game comes out, how about a radiation shelter?

I keep pecking at this idea, but I've never come up with anything compelling. So let's talk about it.

The basic idea is to change the fitness test from "surviving assaults" to "surviving time".

Most base building games challenge you to build a base strong enough to survive the various attackers that will show up. As your base grows, your attackers grow. Even games that are notoriously open, such as Space Engineers, still base nearly all of their fitness tests on combat survivability.

I like the idea of replacing that, if only because it's so overused. I like the idea of replacing it with the weight of time. Whether it's a castle crumbling, a starship breaking down, or a vault collapsing, I like the idea. It's also a very powerful idea because the base never stops being viable for other fitness tests. There's no reason you can't model 1000 years of a castle falling into ruin and being overrun by monsters and cults... then just present that as a level for any given player to challenge with their RPG party.

It has a lot of potential, but making it work out is challenging. I've never managed to get it to be fun. Why?

Because things breaking and running out is basically a spreadsheet.

I've made it a decent statistical balancing act, sure. I've made prototypes where you equip starships for decade-long journeys, and you can easily make the statistics of it compelling. These two options cost a different amount, take up different amounts of space, and wear out at different speeds. Spend the space and cost to bring more repair components, or spend that on a better, longer-lasting module?

Unfortunately, I hate spreadsheet games. I couldn't ever get it to feel like I was properly building a base. It always felt like I was just slotting in modules on a checklist.

I think this is because the weight of time - the wear and tear, the breakdowns - didn't have any connection to the physical layout of the base. It doesn't matter where in the base you put the reactor: it has X chance of breaking down after Y years, and that has a flat result on the base's power supply.

You might try to make the layout matter by, say, introducing wiring and pipes. Having to maintain or replace them matters, right?

Not really, because there's no change, no adaptation. Just a small service fee. Instead, let's consider a different method: degradation rather than collapse.

The reactor doesn't just break. It gets unreliable, and the longer the wire between the reactor and the powered object, the more that object suffers for it. Similarly, the more power the object requires, the more the faulty power matters. A flickering light bulb doesn't matter much, but a server room that continually reboots is a huge problem. Moreover, the reactor can't be repaired to perfect: each repair restores maybe 90% of the lost reliability, but that becomes the new max cap.

The wiring is the same. You can repair or replace each stretch of wire, but it never recovers to full.

Degrading performance is already a pretty good technique, because as long as things are connected in real space, it makes that real space matter. However, there is a way to make this matter even more: allowing the dwellers to make changes. The server room is connected to the reactor, but as the reactor and the wires both degrade, the power supply becomes unreliable and the server room performance drops dramatically.

So the inhabitants run a new, heavy-duty cable through the halls. Not in the cable tunnels you originally ran, those have been degraded: through the habitable area. Similarly, installing a battery bank near the server room will allow that to absorb the unreliability of the power - but the battery bank will be installed in the common space, not into a slot in the wall. By increasing the clutter and squeezing the connections of the structure, you can slowly increase pressure on the base's fundamental design.

Of course, there's more than just how well the various base modules behave: there's also how well the structure behaves. Over time, the earth shifts, walls crack open, ceilings give out. As with the modules, these things shouldn't instantly take a structural element from "fine" to "closed": the wall cracks open bit by bit, dirt and rocks clog the hall slowly more and more. The structure becomes steadily less passable, deals steadily more damage to the things (cables, modules, etc) in the room.

A really clear way to do this is with castles and dungeons, which have a very strong physical feel. A castle's weight feels real, and when some of the walls and floors start to give out, it feels totally legit. Something like a starship or a vault doesn't have the same sense of weight, because the upper floors don't really feel like they press hard on the lower floors.

Still, all of that is not the only kind of thing I want to put into this kind of game.

See, there's another element. A huge, overlooked element. The human element.

A big part of the passage of time is seeing how the context changes. A castle is abandoned by the nobility. A bandit queen moves in, but her great grandson is driven out by a dragon in pursuit of their saved-up wealth... each of these phases involves reinterpreting the various rooms in new ways, ways that steadily change over the course of their reign.

In a vault or a generation ship, there won't be that kind of switchover, so the single reign has to be dense and interesting. Humans change over time, so it makes sense that we should focus on the humans that live in the space you've designed.

While the day-to-day personalities and events might be fun, our real focus is on the slow evolution of the human elements over time. What elements do we introduce? Well, things like children being educated and growing up, culture shifting to have different kinds of relationships, and so on are all kinda interesting. But... that has nothing to do with your base.

In order for your base to influence these things, we need to have each physical area affect the slow evolution of culture. More specifically, each area should embody the slow evolution of a specific element of culture. If you have a classroom, you will see how education is going, and you can see by its decorations and equipment the kind and quality of the education you're delivering.

A very simple rule can make this dense and interesting: the cultural elements spread along the hallways of the structure. Certain rooms develop specific kinds of culture. To prevent those kinds of evolutions, put rooms with opposing cultures nearby, and they'll be in a stalemate. To encourage it, put several of those kinds of rooms near each other so that the culture grows and stabilizes.

This method allows large facilities to grow subcultures by using security gates or just plain range to buffer them. As security doors break down, the areas will begin to mix and clash, and the people inside will mix and clash. As hallways degrade and become steadily less passable, the cultures on each side will grow further apart as they mix less and less.


Well, those are some of my thoughts on using the pressure of time and decay in a base-building game. What do you think?

Monday, November 16, 2015

Base Building Variants

So, there have been a few hints of innovation in base building games. These are barely even shadows in their games, but they have a lot of potential and shine a lot of light on the basic ideas of base building.

The first detail you need to know when you are designing a base building game is the point. Most base building games have the same basic mechanics, but the game changes dramatically based on the elements that are deepest. Usually, these are the unique constraints that pressure you as you build your base.

For example, in Sim City the supply/radius systems are the deep elements, leading to a game focused on roads, pipes, and pollution. On the other hand, in Evil Genius the focus is on congested space, so the focus is on cramming as much functionality as you can into a limited amount of space while balancing security risks.

Sim City rarely has any concern about security, and there's usually plenty of space. Evil Genius has no interest in supply lines. They have the same basic mechanics, but have different constraints.

Certain games have introduced unusually nuanced techniques. First, let's talk about Fallout 4.

The base building in Fallout 4 is mechanically perfunctory, with little to no complexity or nuance. However, the back end is heavy-hitting, with a combination of modular and freeform components that can be mixed as you see fit. The detail worth considering is hiding in that mess: the power lines.

Things which require power in Fallout 4 mostly need to be wired up directly, so you'll end up stringing physical wires between the generators and everything you need to power. These wires follow some basic rules: the droop realistically as you string them up, and there's a max length, and they can't drag on the ground or pass through walls.

Probably your first instinct was to find this annoying. Hopefully, after a little while you began to see that there is a shadow of something interesting hiding in that idea. Providing power to building interiors is an interesting challenge, involving abusing the droop of the wires to pass them through windows, up stairwells, and so on. The droopy wires interact with the rigid, modular structural elements in a way that is just awkward enough to need careful attention and just flexible enough to allow you to come up with clever ways to do it.

The concept of having multiple kinds of construction that work alongside each other, rubbing elbows awkwardly, is interesting. In the past, you might have to wire up buildings like with SimCity's road, power, and water infrastructure, but the two didn't really clash at all. Later we had the concept of modular structures plus free-placement furniture, but the placement of the furniture didn't really matter much, so it was quite shallow.

This "droopy wiring" system is one that clashes. It means building your structures specifically to allow for wiring, but it doesn't have a simple option to do that. You have to decide the best way to do it, it's a gentle pressure pushing at each design decision. Every time you think you've thought of an optimal solution, you'll see a base someone else built that uses a different technique that seems really neat as well.

Now, the implementation in Fallout 4 is pretty primitive. Space is overcompressed and nobody cares about things like lights and TVs, so there's really no reason to wire things up at all. It also makes no sense that you can't run wires along the walls or floors and have to let them hang.

The underlying idea is interesting. We can use this idea of different construction types butting shoulders freely. We can create interesting new games like this. If we start from the base concept of "modular structural elements", what can we add in that bumps awkwardly against it?

The easiest thing to do is add in multiple kinds of connectivity that have very different requirements and side effects. The basic "modular structure" approach is about creating walking paths - doors, halls, etc. What other kinds of connectivity can you add? Water, power, and air are easy examples.

But you need to make sure their connectivity doesn't follow the same rules as the doors-and-halls structure. They need to rub awkwardly. For example, maybe the wires that can fit through interior walls are limited to only a small voltage, but the heavy cables can't pass through walls and are vulnerable to accidents, fires, and damage from invaders. Maybe the air systems work reasonably straightforwardly in theory, but resonate with the structural chambers to create awful winds and chills, propagate toxins, etc.

Those examples involve integrating into the same construction space as the modular structural elements, slotted into them. However, it can also be in a different construction space, as with Fallout 4. To make this fun, your structural elements have to be permeable in complex ways. For physical objects such as power cables, that means physical holes in the modular elements - windows, doors, or arbitrary gaps. However, you could also have nonphysical things permeate the walls: light, sound, joy, heat, data, whatever. The walls also need to vary to allow those things to break through in different amounts.

An easy way to expand your design space is to focus on things besides power and water. For example, building a "digital base", or a dungeon, or a monastic enclave where natural elements need to flow in order for the monks to achieve enlightenment, or a theme park.

But you don't have to think in terms of connectivity. Another easy thing you can do is think in terms of asynchronous build systems.

For example, instead of power lines, what if it was plants? A fantasy elf village, where you have to grow plants alongside, inside, and as the walls of houses. It would be interesting to try and build your structures to interact with the slowly growing trees you plant. The underground roots intertwine beneath your homes, and the branches crash through poorly-placed roofing to reach for the sky.

Or how about having to build a facility that will wear down over time, and have to build it with the understanding that things will fail and need to be replaced... but have the replacement/repair system take up a different amount of space/resources than the original system.

There are so many other possibilities, and I look forward to thinking about them more.