Get the latest Education e-news
 
  • Procedural Content Generation

    [02.06.07]
    - Introversion Software
  •  Introduction

    Content.

    Is.

    Bad.

    A very simple, yet very important rule that any independent developer must remember. For Introversion Software’s latest game, DEFCON, the only real content that we made was the audio. Almost everything else in the game is generated from publicly available information – the locations of cities, longitudes and latitudes of the various coastlines and country borders of the world are all freely available on the internet. DEFCON was in development for about a year. Introversion’s Darwinia, on the other hand, has about 10 hours of game-play from hand-built content, and took 3 years to develop. And each of the landscapes in Darwinia is generated procedurally from a few lines of text – if each of these landscapes was handcrafted too, who knows how long it would have taken.

    With each new generation of console, the costs of creating game content, in terms of both time and money, are increasing at a tremendous rate, and it is just unfeasible for a small developer to be able to keep up with such escalation. This is where Procedural Content Generation comes in handy. Procedural content is content that has been created by a computer algorithm rather than custom made by an artist. This content can be created completely dynamically, or can be generated based on some external input, from a user, or a text file, for example.

    Let’s say that, as an independent developer, you wanted to make a game in a similar vain to GTA3. You could spend months working on a single city, adding buildings and texturing the world, or you could spend a few weeks working on a way of creating these cities procedurally, the end result of which would be that you have an almost infinite number of cities that you can play through, with a vastly reduced development time.

    You might argue that a city created in this way would be far less detailed than one created by hand, but that all depends on how much effort you wanted to put into your dynamic content. Your dynamic buildings could be simple boxes, with textured windows and doors, or you could have the buildings include real, dynamically generated windows based on the size and architecture of your building, which could then be textured depending on the neighbourhood that it is placed in.

     




    These screenshots are from a procedural city generator written by Chris Delay for Introversion Software’s current game in development, Subversion. This is a great example of rapid procedural content generation – after a week's work, we now have a way of generating fairly convincing city layouts with dynamic buildings, whose size is dependant on the population density of that area of the city. As you can see, the same algorithm can be used to generate a number of very distinctive styles of city, simply by changing some of the value inputs into the generator.

    Such is the flexibility of these systems that, with a few small changes, the same algorithms can be used to create completely different objects. In the case of Subversion, the same functions can be used to generate the layout of each of the buildings placed in the city.

    Obviously, hand-designing the layout of every single building in a city that size would be a ridiculous task. It would take hundreds, probably even thousands, of man-hours. An algorithm written by a single person however can do the same task in seconds, and can be adapted to any other purposes that you might need. The trees in Darwinia, for example, were generated using a similar principal – lines ‘growing’ outwards from a seed point, branching out a number of times along the way.

Comments

comments powered by Disqus