Wednesday, April 9, 2008

Narrative Structures in Games: With Pictures!


Alright, this is part of the below post, but with handy-dandy pictures for explanation:

To the left is a picture of a linear narrative in a game. The circles represent plot points, and the lines show the flow from one plot point to the other. Depending on the game, a plot point might be any number of things - in this case, its usually a level. The player plays through a level, gets some exposition, set-up, or something similar, and then plays another level. This continues until the end of the game. Nothing the player does can actually effect the outcome of the game - if he fails to do something necessary to the plot, the game will either tell him that he loses, or fail to progress. Its usually better for the player to outright lose if its not possible for the game to progress, because otherwise the player will wander around trying to figure out what went wrong.

Games that use this structure: the Halo series, the Half-life series, the Sonic the Hedgehog series, the Mario series, and generally speaking, the majority of games which rely on gameplay to entertain rather than narrative.

Results: This style of gameplay requires moral thought on the part of the player, is cheap to produce compared to other methods, and makes games more modular. It can be unsatisfying to players who want their choices to matter, and it offers low replay value.

Single linear games are closely related to "hub world" style narratives, where there are things A, B, and C to do before thing D can happen. A, B, and C can be done in any order, and the order they're done in does not effect the narrative. D is inevitable. In this way, "hub world" narratives offer the same level of interactivity as a strictly linear game, but with even less narrative.

To the left is a picture of a branching narrative. You can see that the gameplay offers different possibilities, some of which are mutually exclusive. Something that the player does effects what happens next. You might see that some of the branches lead into other branches - this is beneficial to players who have reconsidered the choices they have made. It's not fun for a player to be stuck on one track for the rest of the game because of a choice they made at the beginning. Some games combine linear and branching so that while choice A and B might lead somewhere else, they both eventually converge at E (with no way to avoid it). This reduces the costs of production.

Games that use this structure: the Elder Scrolls series, the Final Fantasy series, the Neverwinter Nights series, and the Baulder's Gate series.

Consequences: This type of game is expensive to produce, because each branch needs to have its own artwork, dialog, etc. Furthermore, branching is exponential unless the branches lead to inevitable things (like in linear stories). If this narrative "tree" can be automated, much of the work can be taken away from the designers and put into the hands of algorithms. This often produces repetitive narrative though.

There's another type of narrative that's closely related to branching, and which has come up as a cheap way of simulating moral choices. It's what I call the "duality" model. Essentially, the player is given two choices for each plot point. Both choices have different outcomes, but they both lead into the same plot point. The game usually keeps track of these choices on a continuum - usually good and evil. So a player can play through the game "good" by only choosing the "good choices", or a player can play through the game "evil" by only choosing the "evil" choices. The player can also mix and match for neutral choices. This requires far less work than real branching, because you only really need to prepare branching plot points for thresholds instead of choices. Game that use this style include Knights of the Old Republic, Jade Empire, Bioshock, and Fable.

Tuesday, April 8, 2008

Problems in Gaming Narratives

I had a meeting today with the English department at my college. We talked about narratives in games (which wasn't the focus of the meeting, but that's fine), and my blog is obviously a place for me to be eloquent after the fact, so here goes.

Take the example of the narrative story in chess: it doesn't exist. The pieces do have a framing image to them, which is of two kingdoms at war. The names of the pieces bear the brunt of the work here - knight, king, queen, pawn, bishop, and rook (roughly translates to "chariot"). The mechanics are only somewhat appropriate to their pieces:

  • The pawn is small and weak, and can only move one square at a time. They usually represent infantry.
  • The queen rules over the land, being the most powerful.
  • The king is powerful, but must be protected at all costs - he is not allowed to ride out into battle.
  • Why does the bishop move diagonal and the rook move vertical/horizontal? Is there a flavor reason for this to be the case? Why does the knight have his L-maneuver?
The point here is that most of the rules assignments are arbitrary, and furthermore, don't matter to the enjoyment of the game. Some of them hold different names in different languages (the bishop is called the "fool" in French), but this doesn't change the game. Why does the game take place on a grid? There isn't a logical narrative reason for this.

So we can say from these observations that chess is both "abstract" in its ruleset, and that the ruleset is "narrative independent". Basically, the ruleset doesn't map onto reality, and the game doesn't require a narrative - the flavor is only there to give people something more natural to call them other than Piece 1, Piece 2, etc.

Compare this to a game like Call of Duty (a first person shooter, for those not familiar). The game takes place in World War 2, following a campaign across Europe. The basic mechanics of the game are shooting, moving, and avoiding being shot at. Some of it contains what we call "emergent gameplay" (which chess also has) - mechanics that arise out of the interaction of other mechanics and parts of the rules.

The rules in Call of Duty map closely to reality ... unless it would make the game less fun. When a player gets shot, they aren't taken out of the action immediately, and the bullet doesn't cause location specific injuries which affect gameplay. Getting shot doesn't really affect gameplay at all, unless your health drops below zero. There are a number of reasons for this - it would make getting shot frustrating for the player, it would make recklessness, a less viable option, and it would overall make the game less fun. The soldiers also don't have to worry about supply lines, eating, fresh water, infection, sleep, or any of the other major considerations of staging a war, because they would all make the game less fun.

So using the same criteria we applied to chess, we would say that Call of Duty is mostly "concrete" in its ruleset, and that its ruleset maps heavily onto its narrative. Though we could reskin Call of Duty with science fiction / fantasty, it best mapping is the one that the game is designed around. One thing we've seen though is that a certain level of abstraction and cheating reality is needed for a fun game. This is one of the problems with narrative in games.

The other big ones are a lack of sophistication in artificial intelligence (AI) and the branching problem.

The AI problem is that computers are still fairly dumb, even when they're smart. A single instance of AI doing something idiotic can shatter suspension of disbelief. The branching problem is that when they player is given high levels of interactivity, they expect to be able to do unexpected things. These problems are related.

In games like Call of Duty, the player's character (PC) might have one of four modes of speech.
  1. The PC says nothing, and is merely talked to. This option is used because players don't like having words put in their mouth, especially when they're otherwise in control of the PC.
  2. The PC says completely prescripted things. This option is used when a story needs to be told that involves the PCs discussion - not ideal for the above reason.
  3. The PC says something chosen from a list provided to the player. It gives interaction, but can sometimes feel restricting. It also allows the player to make a variety of moral choices.
  4. The PC directly uses the players voice. This option isn't used because there's no AI on the planet that can respond to the variety of things a player might say. Yet.
These four modes also show how our interactive story might work.
  1. One inevitable thing happens. Then another inevitable thing happens. This continues until the game is over.
  2. Same as above.
  3. One things happens. Then the player makes a choice of two or three other things to happen. Then the player makes another choice of two of three things to happen. This continues until the game is over.
  4. The player does things until he meets his goal (if there is one) by any means he chooses. Usually not possible.
Option 4 is usually impossible because the game can't be ready for anything the player can do. At best, it can be ready for all of the things it was designed around. That means that in Call of Duty I can't lay down my gun, find a typewriter, and write my war memoirs. I can't learn German and convince the Nazis to give up. I can't steal civilian clothes and practice guerrilla warfare. I can't booby trap anything - unless the game is scripted to let me do so.

This is one of the other reasons for abstracting the rules - programming all those things would not only make the game less fun, it would also be incredibly difficult and not offer a good return on programming dollar investment. There are very few people who would like to write letters to their sweetheart back home in a war game, so programming it in would be a waste of time. The only way to allow things like that is to make the game engine generalizable - which costs less money per fringe case, but still takes a lot of money and runtime computing power to do.

Because only a few options are available to players, games usually don't have much of a narrative. The narrative serves only as flavor, and to give instructions. The real value of most games is in the gameplay, not in the story behind the game.

Monday, April 7, 2008

The Industrial Society and its Future

The opening words of the Unabomer manifesto are these:

"The Industrial Revolution and its consequences have been a disaster for the human race."

In by moments of techno-pessimism, I wonder how true this is. There are a couple of things to consider when looking at the veracity of this statement, and most of them are nebulous and difficult to define. The three factors that I use are 1) freedom, 2) prosperity, and 3) humanity.

1) Freedom: Does technology make us more free? In a nutshell, this is the argument against: technology makes us more dependent on other people. A computer is not something that I can make on my own. Even when I can make things on my own, it's grossly inefficient to do so compared with what can be done by mass manufacturing. Additionally, technology is like an adaptation. The person who owns a cell phone is better able to communicate with the world than the person who doesn't own one. Technology also brings social pressure with it - the pressure to own a television, an iPod, a computer, and various other items whose purposes are mostly cultural. On top of that, technology shapes the societies it touches. Even if I don't drive a car, I have to obey pedestrian laws which are put in place to protect me from cars - laws which wouldn't exist if not for cars.

Counterargument: Though technology does come at the cost of ever-increasing reliance on "the system", reliance on the system is not incompatible with freedom. We need to give up certain freedoms to gain access to certain others. The freedoms that we gain far outweigh the freedoms which we lose. For example, I give up the right to walk freely in the streets in return for the right to travel quickly from one place to another via car. In the distant future, all children might be genetically engineered to be optimal - in that case, we would be giving up the freedom to have natural children in return for the right to have children who don't get sick, who don't grow old, etc. This might not be the best example, because some people might consider that horrific.

The other claim - that those who don't use technology are less adapted to the world, and thus are forced to change or be marginalized - is not actually a criticism of technology. It's a criticism of the free market economy. Since the free market economy is simply "survival of the fittest" applied to economic choices, the criticism is really about how the world works. It might be nice if the fittest didn't always have the upper hand, if things were equal between people so that one man could always evenly match another. It would lead to less violence, fewer wars, etc. We could all get along. But this is a world, a universe, of finite resources, and acquiring them is a struggle. To deny the struggle is to impose even more restrictions on the basic freedoms of men.

Points 2) and 3) to be addressed later.

Friday, April 4, 2008

An Open Letter to Andrew Keen

Mr. Keen, I was recently reading your book The Cult of the Amateur when I came across this passage:

"Kelly argues that in the future, instead of making money on the sale of books, authors can 'sell performances, access to the creator, personalization, add-on information, sponsorship, periodic subscriptions - in short, all the many values that cannot be copied.' It's the old razor blade business model. The book is but a giveaway, and the writer will supposedly make money from consulting gigs, book signings, and public lectures.

But books aren't razors, and reading has nothing in common with shaving."

Having finished your book, I can say with authority that it's a load of sensationalist drivel not fit to see print. However, the above quote seems to be the most egregious misuse of rhetoric among the many that you've committed. You see, when we say that something follows the razors and blades business model, we mean that their business model shares something in common with it. In literary terms, this is called a simile. It's razors and blades, by the way - the whole idea is that those two things were sold separately and at different levels of profit. In business terms, this is called cross-subsidy. You give no compelling reason why this should not apply to books. I'll help you out; use the same tactic that people have used to argue against cross-subsidies when large companies do it. The cross-subsidy is an internalized cost which can only be used by large players in a given market, producing an unfair advantage for established competitors. That, at least, is an argument that has some ground.

Even then, you offer no solution to the dilemma of the artist. You say that an artist shouldn't give their work away, but you also say that rampant piracy makes it impossible for an artist to make any money. Kelly is offering a way for piracy to become irrelevant to the artist - for the free spread of art to be a good thing. What you offer is resistance to change. Since you'll never encourage enough people to stay off the net, the only option is government interference.

Government interference is not a solution to the extensive copyright problems faced in this country. If there were a massive database against which you could check copyright claims ... maybe you could make it work. The people wouldn't like it, but you might be able to make it work. No database like that exists though, and it never will, because that isn't how copyright works. Copyright doesn't require that a person register or even inform the government. The instant that I write something, it's covered by copyright law. Secondly, there's such a thing as "fair use doctrine", which means that sometimes when I use copyrighted work it's okay (parody, education, criticism, commentary, etc.). That's why I won't get in trouble for quoting from your book. So not only would this database have to constantly update and search through copyrighted works, but it would also have to make judgments on what is and isn't fair use. I don't think I need to tell you what a gross loss of freedom that sort of system would impose.

If you're going to write idiotic garbage like that, at least propose a solution - so that I can ridicule that too.

Thursday, April 3, 2008

The accomplishments of small-scale societies

Let's say you have a village of 150 people (Dunbar's number). What sorts of technologies would they have? The basic human needs are shelter, food, and water. Shelter means houses, food means hunting/agriculture/domestication, and water means either a way to catch and hold rainwater or settling close to a river or stream. So the starting point of our hypothetical village is one near a river with some hand planted crops. At the start of our simulation (powered by the imagination), our people live in the crudest form of houses. They know nothing of agriculture, only that if they throw their left over food at a certain spot that more of it will grow.

For the sake of argument, we'll say that these people are as smart as we are. This wouldn't actually be the case, because nutrition is highly correlated with intelligence, but making this simulation more complex than it needs to be isn't really the point. We'll also suppose that they have no cultural inhibitions about experimentation; if a member of the village decides that he wants to put a few of the seeds under the ground instead of just dropping them in the dirt, no one will stop him. The only caveat is that no one will do anything which risks destroying the village. Their reproduction will hit almost exactly replacement numbers (though pregnancy will be common, because infant mortality will be horrifically high). Finally, we'll suppose that there are no other villages, and that none of the villagers are predisposed to defecting and forming a new village anytime soon.

Initially, there are a limited number of jobs that a person can hold in the village. The plants grow without interference, so there are no farmers. Since this method of agriculture doesn't provide much food, the men hunt. Their weapons are crude; nothing more than sharp sticks and heavy stones. The women stay in the village and care for the children. Meat is eaten raw, supplemented with fruits and vegetables that have been grown or foraged.

When there are storms, lightning occasionally strikes, and when the villagers go to investigate - in this manner, fire becomes known to them. Since there is a lot of free time, especially at night, a few of the men set out to see if they can make fire. For all they know, fire might only be a product of lightning, but they've seen that fire can be made from fire, and they're naturally inquisitive, so they try. Eventually someone manages to make fire by rubbing two sticks together, and from there fire is cultivated until nearly anyone in the village with enough patience can produce it. Fire keeps them warm, makes them able to work in the night, and they find that putting the meat over the fire makes it taste better - with the added effect of making them less prone to sickness.

At the same time, agriculture is forming. An enterprising villager puts the seeds below the ground and finds that they grow much more readily than when they're left on the surface. He also finds that the plants thrive on constant water, so on days when it doesn't rain, he scoops up handfuls of water and runs them over to the plants. Since this is a laborious task, the villager looks for some way to carry water more efficiently - a number of other people need containers too, for excess food and so they don't have to go down to the river for water. This possibly means the creation of pottery, which at its most basic is simply some mud formed into something and left to dry.

So by now the villagers have figured out that they can make their lives better through research and development. Enough experimentation eventually leads to the scientific method, though most of these primitive technologies can also be reached through chance. At any rate, our enterprising farmer has made crop production into something that's no longer passive, and since this is a more productive method of food gathering than foraging, we now have excess labor. Some of this goes to the fledgling production of pottery, some goes to art, or possibly religion, and some is simply wasted on having fun.

Meanwhile, our hunters keep bringing back animals, and our villagers eventually learn which parts are good to eat, which parts are not, and which can be used for other things. Splintered bones can be used for weapons, or for shaping pottery, and some of the inedible stuff can be used for fertilizer. The animal fur, once the flesh has been removed, can keep a person warm at night. Because these villagers are about as smart as us, they figure out that animals must reproduce in roughly the same way as humans do - they learn this from watching the animals, and form extrapolation. One particular hunter, who is getting older and not as fit, realizes that they might be able to capture some animals and slaughter them when the meat was needed, instead of going through the hunt and possibly bringing them close to starvation if they have an unlucky streak. It is later figured out that these animals can simply be raised by the village instead of hunting them. This frees up more labor.

Now we have to make some assumptions about the resources available to these people. For the sake of the simulation, they will have access to pretty much any metal they want, as well as stone and trees. We also have to make some assumptions about how they spend their excess labor; some of it has to be going to improving their condition instead of leisure.

They find copper, shining in their river. They first use it for art, but upon realizing that it can be banged into any shape by using a stone, and that it is lighter and just as sharp as their bone weapons, they start using it to hunt. If they can get enough of it, they start finding other uses, like in farming. One day someone drops some copper into the fire, and they find that this makes it more malleable. If they can get it hot enough, it melts, unlike their stones. They find that they are able to do this with some other metals that they find in the river, and from there are able to understand the elemental nature of the world.

Meanwhile, someone has discovered that fire is better for making pottery than the sun is, and with some experimentation they discover the right temperatures to bake things at for the best hardness/brittleness ratio. They also work on developing a kiln, which comes out of their attempts to make a very hot fire by building walls around a normal fire. It is also in this way that they discover fire needs air, and they make the first bellows, which is nothing more than a fan in push air into the fire.

The villagers look around them, and see what they've made. They have fairly advanced farming, with crop rotation, fertilizers, pest control, and irrigation. They have a number of domesticated animals, whose jobs range from food to pack animal to ratter to hunter. They have the pottery wheel and the kiln. They have a doctor, who is not very good because of the limited experience that a population of their size offers. Hunting is done much less now, but they have nets, spears, and various other instruments to kill animals. Their huts are much cleaner and more structurally sound than they were before, and are reinforced with wood.

There are a number of things that these people will never invent, simply because they have no need for them. They will never invent a building more than two stories tall. They will never invent internal combustion. They will never invent the computer. They will never invent the lightbulb. They will never perfect medicine, because most of the more rare diseases will occur only once, if that, in a doctor's lifetime. Because all knowledge is passed down from master to apprentice, and because all communication is done within the village, they will never invent writing.