asasa
Autor: Denis Lima Oliveira | Publicado: 2015-07-17T18:09:00-07:00


    

      
        
          
            






          


          
          



          

          

        
          
            
              
                





                  

                

                
              

                

              

                
                  
                    



                  





                





          

Copyright (c) 2013 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI

10.1109/TCIAIG.2013.2290371, IEEE Transactions on Computational Intelligence and AI in Games

IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES

1

Procedural generation of dungeons

Roland van der Linden,   Ricardo Lopes and Rafael Bidarra

Abstract

The use of procedural content generation (PCG) techniques in game development has been mostly restricted to

very specific types of game elements. PCG has been seldom deployed for generating entire game levels, a notable

exception to this being dungeons, a specific type of game levels often encountered in adventure and role playing

games. Due to their peculiar combination of pace, gameplay and game spaces, dungeon levels are among the most

suited to showcase the benefits of PCG. This article surveys research on procedural methods to generate dungeon

game levels. We summarize common practices, discuss pros and cons of different approaches, and identify a few

promising  challenges  ahead.  In  general,  what  current  procedural  dungeon  generation  methods  are  missing  is  not

performance, but more powerful, accurate and richer control over the generation process. Recent research results seem

to indicate that gameplay-related criteria can provide such high-level control. However, this area is still in its infancy,

and many research challenges are still lying ahead,

e.g.

improving the intuitiveness and accessibility of such methods

for designers. We also observe that more research is needed into generic mechanisms for automating the generation

of the actual dungeon geometric models. We conclude that the foundations for enabling gameplay-based control of

dungeon-level generation are worth being researched, and that its promising results may be instrumental in bringing

PCG into mainstream game development.

Index Terms

Procedural content generation, procedural level generation, role playing games, gameplay semantics.

I.  I

NTRODUCTION

Procedural content generation (PCG) refers to the algorithmic creation of content. It allows content to be generated

automatically, and can therefore greatly reduce the increasing workload of artists. Some procedural content generation

methods are gradually becoming common practice in the game industry but are mostly confined to very specific

contexts and game elements. For instance, SpeedTree [

1

] is becoming a standard middleware to procedurally generate

trees,  as  demonstrated  by  its  integration  in  games  like  Grand  Theft  Auto  IV

(RockStar  Games,  2008)

,  Batman:

Arkham Asylum

(Eidos Interactive, 2009)

, Battlefield 3

(Electronic Arts, 2011)

, and many others. More complete

PCG approaches (

e.g.

methods that generate complete game levels) exist, but mostly in the research domain.

Roland  van  der  Linden,  Ricardo  Lopes  and  Rafael  Bidarra*  are  with  the  Computer  Graphics  and  Visualization  Group,  Delft  University

of  Technology,  2628  CD  Delft,  The  Netherlands  (*corresponding  author:  +31152784564,  email:

roland.vanderlinden@gmail.com,

f

r.lopes|r.bidarra

g

@tudelft.nl

).

This work was partly supported by the Portuguese Foundation for Science and Technology under grant SFRH/BD/62463/2009.

Copyright (c) 2013 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI

10.1109/TCIAIG.2013.2290371, IEEE Transactions on Computational Intelligence and AI in Games

IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES

2

The lack of commercial use of PCG techniques has most likely to do with their lack of control: designers, by

giving away part of it to an algorithm, are often suspicious of the unpredictable nature of the results of an automatic

generator. However, an increasing number of recent benefits can help establish PCG in mainstream game development.

These benefits include: (i) the

rapid

generation of content that fulfills a designer’s requirements [

2

], (ii) the possible

diversity

of generated content (even when using similar requirements), which may increase game replayability [

3

],

[4], (iii) the amount of

time

and

money

that a designer/company can spare in their game development process [5],

and (iv) the fact that PCG can provide a basis for games to automatically

adapt

to their players [6], [7].

Such advantages continue to motivate ongoing research on this increasingly active field. In this paper, we survey

the current state of PCG for dungeons, a specific type of level for adventure and role playing games (RPG). Our

focus on dungeon generation is justified by two important factors: the unique control challenges it raises and its

close relationship with successful games.

We  define  adventure  and  RPG  dungeon  levels  as  labyrinthic  environments,  consisting  mostly  of  inter-related

challenges, rewards and puzzles, tightly paced in time and space to offer highly structured gameplay progressions. A

close control over gameplay pacing is an aspect which sets dungeons apart from other types of levels. This notion

of pacing and progression is sophisticated: although dungeon levels are open for free player exploration (more than

e.g.

platform levels), this exploration has a tight bond with the progression of challenges, rewards and puzzles, as

desired by game designers (unlike

e.g.

sandbox levels, in open game worlds).

Since procedural generation is, in essence, automated design, dungeon generation shares the same challenges

of manual dungeon design. Dungeons are unique due to the tighter bond between designing gameplay and game

space. Unlike

e.g.

platform levels or race tracks, dungeons call for free exploration but with a strict control over

gameplay  experience,  progression  and  pacing  (unlike  open  worlds,  where  the  player  is  more  independent).  For

example, players may freely explore a dungeon, choosing their own path among different possible ones, but never

encounter challenges that are impossible for their current skill level (since the space to back track is not as open as,

for example, a sandbox city). Designing dungeons is thus a sophisticated exercise of emerging a complex game

space from a predetermined desired gameplay, rather than the other way around. As such, dungeon generation is

unique:  it  is  more  about  achieving  structured  control  over  generation  than  about  finding  unexpected  interesting

generated results.

Typically dungeons can be classified in two types: for adventure games and for RPGs. Adventure games like

The Legend Of Zelda

(Nintendo, 1986)

strictly follow our definitions above, as apparent in,

e.g.

, [

8

], [

9

]. Modern

RPGs, like The Elder Scrolls V: Skyrim

(Bethesda Softworks, 2011)

, include more open dungeons, complex in many

ways  (

e.g.

exploration),  but,  when  compared  with  adventure  games,  are  less  sophisticated  in  their  strict  control

over gameplay experience, progression and pacing. Most current academic research is in line with dungeons for

adventure games and, as such, the remainder of this survey will be focused on that scope.

Dungeons are intrinsically tied to the history of PCG, showcasing its potential in video games. Players of this type

of adventure games and RPGs were introduced early on to the notion of procedural levels and already recognize its

value. Rogue

(Troy and Wichman, 1980)

, The Elder Scrolls II: Daggerfall

(Bethesda Softworks, 1996)

and Diablo

Copyright (c) 2013 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI

10.1109/TCIAIG.2013.2290371, IEEE Transactions on Computational Intelligence and AI in Games

IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES

3

(Blizzard  Entertainment,  1998)

are  some  of  the  better  known  early  examples  of  this  relationship  between  PCG

and dungeons. However, that original momentum is not quite apparent in more complex current adventure games

and  RPGs,  which  are  still  very  successful  genres.  We  reckon  that  this  backlog  can  be  largely  overcome  by  the

application of many current state-of-the-art research results surveyed here.

This survey aims at providing an overview of dungeon-generation methods, with a special focus on their main

scientific  challenge:  how  these  methods  can  be  controlled.  The  remainder  of  the  paper  is  organized  as  follows;

Section  II  gives  a  more  detailed  introduction  to  procedural  dungeon  generation  methods  and  how  they  can  be

controlled. Sections III through VI elaborate on specific methods that are relevant for procedural dungeon generation,

classified into Cellular Automata (III), Generative Grammars (IV), Genetic Algorithms (V), and Constraint-Based

(VI).  Section  VII  analyzes  other  related  work  which,  although  not  directly  related  to  dungeons,  could  improve

dungeon generation. Section VIII contains an overview and discussion of the surveyed methods. Finally, Section IX

provides concluding remarks.

II.  C

ONTROLLING PROCEDURAL DUNGEON GENERATION

In most adventure games and RPGs, dungeons basically consist of several rooms connected by hallways. While

the term ’dungeon’ originally refers to a labyrinth of prison cells, in games it may also refer to caves, caverns, or

(abandoned) human-made structures. Beyond geometry and topology, dungeons include non-player-characters (

e.g.

monsters to slay, princesses to save), decorations (typically fantasy-based) and objects (

e.g.

treasures to loot).

Typically, dungeon generation refers to the generation of the topology, geometry and gameplay-related objects of

this type of levels. While generation of non-player-characters, decorations (and even ambient effects, like lightning

and music) are themselves topics of PCG research, they fall outside the scope of this survey.

A typical dungeon generation method consists of three elements:

1)

A representational model: an abstract, simplified representation of a dungeon, providing a simple overview of

the final dungeon structure.

2)  A method for constructing that representational model.

3)  A method for creating the actual geometry of a dungeon from its representational model.

Most surveyed research describes the method of constructing the representational model, but does not provide

quite as much detail in their method for mapping the model to the actual geometry of the dungeon. Unfortunately,

this step is often neglected by researchers in their publications. However, it is understandable, since this is typically

a less sophisticated step than the generation of abstract representational models. Therefore this survey mostly focuses

on the representational model and its generation.

A very important element in any procedural method is the

control

it provides over the output and its properties.

We refer to control as the set of options that a designer (or programmer) has in order to purposefully steer the level

generation process, as well as the amount of effort that steering takes. Control also determines to which extent

editing those options and parameters causes sensible output changes,

i.e.

the intuitive responsiveness of a generator.

Proper control assures that a generator creates consistent results (

e.g.

playable levels), while maintaining both the set

Copyright (c) 2013 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI

10.1109/TCIAIG.2013.2290371, IEEE Transactions on Computational Intelligence and AI in Games

IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES

4

of desired properties and variability. The lack of proper parameters or the lack of understanding of what a parameter

exactly does, almost always imply poor control over a PCG method, which may lead to undesirable results or even

catastrophic failures.

In early PCG methods (

e.g.

Perlin noise [

10

]), the focus was more on how the methods worked and

what

could

be generated. More recently, researchers became more concerned about

how

they can achieve the results they want.

Meaningful parameters were introduced to help generate content towards a specific output. As PCG methods grew

in complexity, and different PCG methods were combined to form more complex generation processes, more control

was needed as well. As an example, PCG control has evolved towards more natural interaction between designer

and machine, with the use of techniques like declarative modeling [

11

] or controllable agents [

12

]. More recently,

PCG control has expanded towards an even more natural interaction, including the use of gameplay as a meaningful

control parameter [13].

As discussed before, the tight bond between gameplay and game space is an essential aspect of dungeons. Therefore,

control over PCG methods for dungeons should preferably facilitate such bond, by steering space generation from

gameplay requirements. This can be done in more (

e.g.

parameters referring to the difficulty of a level) or less (

e.g.

parameters referring to topology) explicit ways. Therefore, in this survey, we are specially interested in discussing

this dungeon-specific generation challenge:

gameplay-based control

, where PCG parameters are related to gameplay

data.

III.  C

ELLULAR

A

UTOMATA

One of the methods for procedural dungeon generation is cellular automata. This self-organizing structure consists

of a grid of cells in any finite number of dimensions. Each cell has a reference to a set of cells that make up its

neighborhood, and an initial state at zero time (t = 0). To calculate the state of a cell in the next generation (t + 1),

a rule set is applied to the current state of the cell and the neighboring ones. After multiple generations, patterns

may form in the grid, which are greatly dependent on the used rules and cell states. The representational model of a

cellular automaton is a grid of cells and their states. An example set of allowed states would be

f

wall, path

g

, such

that cells represent either a location where a player can go, or a location where the player cannot go.

Johnson

et al.

[

14

] use the self-organization capabilities of cellular automata to generate

cave

levels. They define

the neighborhood of a cell as its eight surrounding cells (

Moore neighborhood

), where its possible states are

f

floor,

rock, wall

g

. After an initial random cell conversion (floor to rock), the rule set is iteratively applied in multiple

generations.  This  rule  set  states  that:  (i)  a  cell  is  rock  if  the  neighborhood  value  is  greater  than  or  equal  to  T

(

T=5

) and floor otherwise, and (ii) a rock cell that has a neighboring floor cell is a wall cell. Based on these rules,

‘cave level’-like structures can be produced, as displayed in Fig. 1. This method allows real-time and infinite map

generation.

As  interesting  features  of  Johnson

et  al.

’s  method,  we  can  identify:  (i)  its  efficiency  (with  the  possibility  of

generating part of a level while the game is being played), (ii) the ability to generate infinite levels, (iii) the relatively

straightforward creation algorithm (the used states and rules are simple), and (iv) the natural, chaotic feel that the

Copyright (c) 2013 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing pubs-permissions@ieee.org.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI

10.1109/TCIAIG.2013.2290371, IEEE Transactions on Computational Intelligence and AI in Games

IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES

5

Fig. 1.

A map generated with Cellular Automata. Grey areas represent floor, red areas, walls, and white areas, rocks [14].

levels created by this method have. Its main shortcomings are the lack of direct control of the generated maps and

the fact this method only applies to 2D maps. The authors briefly discuss 3D generation, however the present control

issues are likely to be worse in 3D. Additionally, connectivity between any two generated rooms (

i.e.

reachable areas)

cannot be guaranteed by the algorithm alone, but has to be systematically checked for and added if non-existent.

This method uses the following four parameters to control the map generation process:

 

A percentage of rock cells (inaccessible area);

 

The number of cellular automata generations;

 

A neighborhood threshold value that defines a rock (

T=5

);

 

The number of neighborhood cells.

The small number of parameters, and the fact that they are relatively intuitive is an asset of this approach. However,

this is also one of the downsides of the method: it is hard to fully understand the impact that a single parameter has

on the generation process, since each parameter affects multiple features of the generated maps. It is not possible

to  create  a  map  that  has  specific  requirements,  like  a  number  of  rooms  with  a  certain  connectivity.  Therefore,

gameplay features are somewhat disjoint from these control parameters. Any link between this generation method