Monday 28 January 2008

The Death of the Level Designer: Procedural Content Generation in Games (Part Six)

(You'll want to read parts one, two , three, four and five first)

The human brain has a powerful set of tools for detecting and matching useful patterns in otherwise chaotic data. This set of tools can be conditioned to override normal behaviour patterns in the presence of sufficiently powerful and randomly provided incentives: so-called operant conditioning. You will have probably seen the term 'Skinner box' associated with certain types of game-play: in particular with MMORPGs and slot machines, where people become addicted to randomly provided rewards for repetitive activity.

But the same set of pattern matching tools are useful for the designer of procedural content generation systems. The semi-randomised output of PCG systems will be picked over by the player's brain, and the underlying systems hopefully understood and enjoyed. This reinforcement of play through randomisation is hopefully a more 'nutritious' game environment that simply statistical delivery of reward and one I would expect Johnathan Blow to commend rather than criticise.

The greatest challenge of procedural content generation will be to augment or replace human intelligence in the creation of meaningful narratives in computer games. But even in a single player game, there is a powerful creative intelligence involved in the decision process, and that is the player themselves. A procedural content generation system may be able to leverage this human intelligence in creating meaning and narrative: in part through relying in part on serendipity, happenstance and superstition. In juxtaposing two disparate game elements, the human mind will attempt to find a meaningful relationship between them, and provided that the game does not mix every game element into a brown stochastic blend, the player will build up a narrative of moderate complexity from very simple components. Such a narrative may be no more complicated than 'first I did this, then I did this, and then I did this', but it will have meaning.

It is possible to go too far in procedural content generation techniques: too far being when no two games have any elements in common. This may still be an interesting game - Minesweeper being a good example - but a less interesting movie. Even Minesweeper has a beginning, a middle, some tough choices where a guess might be required, and an end. Most games will have more complex choices that could be formed into a player-centric narrative. Angband for instance encourages the player to stay within a certain distance of the surface until certain resistances are acquired - encountering monsters deeper in the dungeon without these resistances would likely result in game over. A more sophisticated example of these player-centric narratives is the 'Day in the Life' posts that many games encourage - these can either be mundane or dramatic retelling of in-game events from the perspective of the player controlled avatar.

These player-centric narratives, while interesting, are probably not what you envisioned when you hear 'procedural content generation of narrative'. And while the emergent narratives of Dwarf Fortress are a sophisticated example of what is possible with a sufficiently deep game system, as mentioned, not every game developer has the time, resources and fortune to develop this type of game.

What would an explicit, as opposed to emergent, PCG narrative system look like? One way of implementing this is little more than a sophisticated puzzle generation system - essentially a string of escalating Fed Ex quests, and randomly selected Blankety Blank sentences. This is still developer expensive, and at the same time not particularly rewarding for the player, as the systems underlying the puzzle generation is no more sophisticated than the statistical generation of reward probabilities in Skinner Boxes.

By increasing the complexity of the systems underlying the puzzle generation, there is a greater sense of involvement from the player, who must decode these underlying systems in order to maximise their rewards from successful puzzle solving (or questing, or whatever game equivalent process is). And the easiest way to increase this complexity is to have a behind the scenes meta-game, that the player has no direct involvement in.

Consider the plight of an individual person living in the world of a game of Civilisation IV. They may be pivotal to the outcome of a single battle, if they are in the position of being a spy, or help advance the civilisation, if they are a Great Person. Each civilisation is run by a leader, whose particular traits inspire the civilisation to work better in certain areas. But no individual (except the 'hand of God' player who is playing the civilisation behind the scenes) is responsible for the actual decisions taken from turn to turn, how the civilisation advances and how the game of Civilisation IV is played.

Now, replace all the human players playing a game of Civilisation IV with computer players. And instead put the human players in the roles of individuals living in the game world. Civilisation IV has suddenly become the meta-game. Individuals will perceive the actions of the AIs controlling the game only through their indirect effects: cities will be built, technologies gained, enemies routed and civilisations fall. But no player in the game will directly be able to control these effects - their influence will instead be felt only as warriors or spies, or great people or perhaps civilisation leaders.

The actions of the AIs in controlling the meta-game should appear to the individuals in the game to be a consistent narrative. An AI's decision to amass armies on the border to invade a neighbour will have profound in-game consequences. Whether the invasion is successful or not could be decided by one individual: a spy whose vital information enables the encirclement of enemy forces, a leader who can inspire his troops to break through the enclosure, a peasant who correctly shoed the horse of a general so he wasn't thrown from it's back. But the fact that the attack occurred, and the consequences of it, should form a consistent narrative from the player's point of view because it follows a consistent set of meta-game rules, which the player may be able to decode over the course of the game. With sufficient understanding of these rules, the player may be able to predict which side to take, when to rally his troops, when to flee the scene.

And Civilisation and other 4X games are well understood problems, with sophisticated AI, that can provide a narrative backdrop to a lower level game involving player control at an individual or a squad level. There are already examples of blended RTS/FPS games such as Natural Selection and Savage: The Battle for Newerth that have proven successful using this kind of idea. The weakness of these games, and the reason that the Valve elected not to have a commander class in Team Fortress 2, is that the success of the game depends heavily on the competence of the battlefield commander player. Replacing the battlefield commander with an AI levels the playing field in this regard.

And hopefully makes the story behind the play.

Further Reading:

The articles and links sections on the Procedural Content Generation wiki.
Proceduralism: The follow up article series.


bourgon said...

Well worth the read. Thanks!

Unknown said...

I enjoyed reading this series of articles very much. Your description of "hand-of-god" to "individual" role-reversal using Civ IV was also very illustrative.

After thinking about it for awhile I realized that certain games in Koei's Romance of the Three Kingdoms franchise (VIII and X, at the least) are similar to this concept: The game is a military/economic game set in historical China (so thus not completely 4x). The player chooses an individual to play at the beginning of the game. If the individual has the role of a ruler of a kingdom, then the player effectively acts as the hand of god, making decisions similar to those of a Civ player. However, if the individual chooses a lesser role, then he is subservient to a ruler and can choose to serve (or not) however he chooses while the ruler makes decisions to issue commands, tries to conquer other countries, builds infrastructure, etc. independent of the player's direct involvement. The result is that an emergent and sometimes very engaging narrative can result as these events and changes in the socio-political landscape are witnessed through the perspective of the player's avatar as warlords struggle against each other to unify China, with different results each time the game is played.

By default, there is a bias towards certain pre-scripted events occurring. This bias can be removed from the options, resulting in an even more divergence between games. At that point, the only things that are pre-set in the game are the cast of persona and their statistics, the map of China, and starting positions of individuals and kingdoms. If these facets were also procedurally generated anew each game, then doubtless the space of possible narratives would grow exponentially. Of course, similarly to what you stated earlier, doing so would basically remove the theme of the game because each game would be too radically different from the next (and the popularity of the series is tied to the familiarity of the audience with the specific persona, events, and relationships of the source material that the game is based on).

I found your article to be very inspiring and thought-provoking, so my apologies for the long post. =)

Unknown said...

I really like your post.

The entirely procedural game is an idea I have been floating around on for almost a year now.

I believe that PCGs can't completely eliminate good game play design but it can do most of the hard work.
A good example would be like how comic book scenes are done: the main artist would draw the main scenes and the apprentice would fill in the in-between scenes.

The idea would have been that the player only choose a storyteller (a collection of game play constraints from a designer) before starting the game, and the game world, genre, scripts, and other assets would be procedurally generated with that particular designer's style as the constraint.
This is particularly powerful when other parts of the game are also abstracted.
Change the rendering engine and the game will be updated to next-gen graphics (like switching between character and tile modes in roguelikes). Add new prefabs or storyteller profiles and you get new game play styles. A game like this would be the bane of game designers.

However, I doubt any game company would make this, as it locks them out of any future profits.
More likely, in the future, designers could use PCG tools and infuse it with their own creative 'seed', making incredibly quick prototype games that they can polish.

Sorry for the long post. This read is great!

Stone Bytes said...


I've been lured by this provocative title, and felt like it needed comments.
I'll be honest and go straight to the point.

First and foremost, you say:

"The Death of the Level Designer: Procedural Content Generation in Games"

After six pages of what should have been an argumentation to defend your eye-smitting hypothesis, I'm yet to see anything that would remotely provide a solid argument in favour of your bold claim.
Had you limited your article to the informative enumeration and discussion of new PCG technologies, it would have been fine. Trying to spin that into a sensational claim was an absurd choice.

We're looking at cases where the topology of the terrain doesn't matter much as long as you can complete independant and repetitive tasks, like hacking mobs.
There are concepts which this methodology works for. There are others where this fails totally.
There is no doubt that terrain generators help gain a lot of time, but this won't necessarily apply well to all genres.

Procedural content is a good topic, but it should be wise not to make generalizations.
PCG is most acceptable in games where the randomness - and may I say soullessness - of a level doesn't matter much. This is why, among other things, random maps for RTS isn't a tool as shocking as a competition map on a FPS for example... but I could pick a racing game. People would rather play a thousand games on the same Mute City track rather than play on thousand variations of said track, simply because the success of a game is about learning it, and learning the levels.

So what are your chapters about, in regards of the initial claim?

Part I-II:

Points 1 and 2 are appreciable lists of existing methodologies and technologies, but don't prove that the end is nigh for level designers (or whatever you wanted to imply in your premise).
You would rather find yourself be telling that new tools offer new forms of creation, and fasten production times, make level designers' lives a tad easier (which, actually, may be arguable for anyone who's toyed with Carmack's texture technology).

Point 3 gets lost in irrelevance in my opinion. There is an amalgam of technologies which do refer to procedural content to a degree, but in the end, they have more to do with LOD than anything else. Case in point: It was only a question of time before we'd get beyond the limitation of spheres that kill you if you get too close (Freelancer for example), supposed to represent a true world in space.
You also pretend that (endless) exploration of random landscapes will make for future thrilling gaming experiences.
Not only this would get boring after a while, but worlds which would be too detached from human direct intervention would have no real warmth to them, and not having humans get the final say, add the final and meaningful touch to the picture is a mistake.
Of course, there are degress of PCG, from totally created out of the blue based on variables, or at least merging precreated assets with the fruits of algorithms. PCG without human intervention as a future standard makes no sense. You'll still smell the tasteless fractal essence of a world you wander in.

Point 4 digresses totally from the main topic, and we can rejoice to the idea that we'll finally have genuinely different NPCs, it doesn't provide a shred of evidence that LDs will become pointless.
You always need very specific content at some point, and this will be part of the LD to get sure this specific content meshes well with procedurally generated content.

Point 5 picks the case of Spore, which most important aspect had nothing to do with level design, especially due to the type of game we're speaking of. You are relying on a product which, at this moment, and maybe for the years to come, will be hard to hammer with fiery negative criticism. You're not taking risks by citing anticipated and already appraised subjects, much contrary to your series' title.

Part III

Point 1: It's already happening. Carmack, for example, has made no secrets about his work on the next id Tech iteration, where PCG will be applied to BSP content texturing as well.
It's probably less flashy than the likes of the Unreal Engine or CryEngine at the moment, but the implication is huge, and it's done step by step. But he never dismiss the intervention of the designer. On the contrary, he shapes the tool to make the job more effective and easier for the artists to add his own detail after the construction is done. Depending on how you segment the level production, the one who may have less work to do would be the artist, but the level designer will still be crucial.
They'll phase out in games where careful and meticulous level design is less important, as in, for example, Diablo 2, but no one has played this game because of the incredible repetitive mazes.
It's rather obvious, by the way, that quality should prevail on quantity.

Point 2 assumes PCG will apply to "games" as a whole, which is just plain wrong, and is in error in thinking that procedural terrain generation will become the rule in MMORPGs. MMORPGs being games which need less of the traditionnal replay value tricks. Yes, people do like the world they have actually learned day by day, and I don't think worlds would make much sense if, for example, Middle Earth looked differently everytime you and your guild logged in (yes, remember, this article initially started with a bold and embarassing claim regarding level design).

Point 3 is a good point, in only that the success of Spore will possibly launch a (re)new(ed) trend. Say a new market. But other branches won't dissappear all of sudden. It would be most absurd to think so.

Point 4 wrongly that PCG would engender greater game design, while totally forgetting that many good game designs reveal their greatness through the existence of equally excellent, manually and cautiously crafted levels.

Point 5 sees PCG as a revolution and tying itself into games-in-a-box. What is that? Is it relative to classic retail? Sand box genre? File size?

"The consumers benefit because they get a well-designed game as opposed to the licensed rubbish that is often churned out at the moment."

I'd say the rubbish lies in the out of the blue claim more than elsewhere.
PCG won't magically make games better.
Cherry on the cake, there's no credibility to gain by citing Atari's ET as an example in favour of your argument. On the contrary.

Part IV is almost entirely irrelevant to the LD issue.

Part V is interesting by the introduction of the following subclaim:

"The one area that random map generation is missing complex 3d topology generation: and no game is currently doing this. Dwarf Fortress doesn't generate the fortresses for you - it still relies on human intelligence to go through the process of placing tunnels and building bridges and towers. When a game is capable of procedurally generating maps of the complexity of Half-Life 2, S.T.A.L.K.E.R., Minerva or any other modern FPS, then PCG for random map generation will be completely 'solved'."

The only problem you will have solved is how to create a maze with no soul. Quantity and randomization doesn't make quality. Eventually, it only assures variety while having the same player do the same stuff on and on, which actually leads to waste of time and the creation of mirror houses, by likely supporting the addiction in certain genres, giving the player the illusion of playing something new, while it's not.
It makes gaming poorer.

Part VI is rather puzzling, as you build it upon the ending sentence of former article, "I believe the real strength of procedural content generation will be seen in procedural generation of plot and narrative content," and yet cite the skinner box behaviour, then expand on it by saying that "the same set of pattern matching tools are useful for the designer of procedural content generation systems. The semi-randomised output of PCG systems will be picked over by the player's brain, and the underlying systems hopefully understood and enjoyed."

An addict might enjoy his dope, but it does not make his/her drug induced trip objectively sane, nor enjoyable to someone who's actually healthy.

Then you wonder why Johnathan Blow is particularily negative against what you defend. But I think he's particularly spot on regarding this point.

I can see the benefits of PCG in adventure and puzzle games rather easily, but a key element I think you should have considered is that in many cases, possibly the vast majority of them actually, players like to evolve in very familiar environments, and for many games, this means worlds which won't change from a game to another.
Consider GTA for example, which wouldn't be the same without well known landscapes and key locations, because what matters most is not the rather uninspiring city design, but the core gameplay. This gameplay relies on factors which depend on resources, themselves accessibles at those key locations (like the special muscle car). Could you imagine player having fun ever trying to find said car?
Oh but maybe the city would be generated once, when you start a new game. But then, what would PCG add to the level design at all, in terms of content and variety, especially to a game which is already that long?
Well, nothing. Your city would just be different than your friend's San Adreas. That is all.
They expect to meet people on equal grounds, or in environments they know. In certain cases, they'd rather know the environment by name.

You don't even wonder if we might see, post PCG craze, people being tired of fast-food 3D content, and ask for a more noticeable human intervention in their games.

So, well, I hope you do have part VII (or more) ready to roll, to tell me where I'm wrong and why you feel LDs should feel particularily worried about PCG.

Andrew Doull said...

Hi Stoney,

Thanks for you post.


Dante Italo Andriano said...

Frankly you inspired me. I'm writing my project to be an informatic engineer in Argentina and its about an Automatic Story Creator. Am making progress in the theoric documentation. I'm not copying you, but what you wrote orientated me. Thank you. If you're interested me, send me a mail and I will send you the project once it's done. Best wishes!