Saturday, January 19, 2013

#5 - Procedural Content Generation

Procedural Content Generation (PCG) is a field of games studies and computer science where methods of automated content generation are studied and researched.  When we talk about PCG, we will need to define the terms very carefully.

Game World: The virtual world comprising of the game environment and all its entities.
The Character Self: The entity that you control inside the game world.
Characters: Entities in the game that you can interact with, via your character self.
Game: The competitive goal of the character self in the game world.
Game Content: Anything that the character self encounters within the game world.
Gameplay: Anything that the character self can do in the game world.

Of game content, which we will typically simplify as simply content, there are two broad categories that we address:

Random Game Content: Content that changes after the character self encounters it.
Static Game Content: Content that never changes.

It's important to note that PCG doesn't always generate random game content, so let's break that down.  In one type, we use PCG to generate content that is random, and in the other manner, we use it as developers and later adjust it in some way or use it as-is to deploy as static content.

Random Procedural Content Generation: Generation of game content that is deployed as random game content.
Static Procedural Content Generation: Generation of game content in an automated and random manner, but is later deployed as static content.

PCG can be further categorized, but the kind that I want to focus on is the automated generation of levels during runtime of the game: Level Generation.  Again this can be static or random, depending on the needs of the designer.  For static level generation, levels are generated automatically via some algorithm, and then the designer takes over and decides whether to adjust it further or to use it as the decided static content for the game.  In random level generation, levels are generated on the fly while the gamer plays.

In the area of random level generation, I've managed to generate random levels using a common algorithm known as the BSP-Tree (Binary Space Partion) algorithm, with some tweaks to make the dungeons seem more realistic - by adding rooms and perturbing the corners to give the dungeon a more "cavey" feel.

PCG is a relatively new field that shows a lot of promise.  Algorithms can be used to aid the game designer and/or to provide longer lasting fun and fresh content.  But anytime we deploy a new technique, we need to ask ourselves if it is really helping, so we need to define what "helping" means with more specificity - and that is currently the problem to address with the field.

No comments:

Post a Comment