What is Procedural Generation?
Procedural generation is algorithmic creation of data that follows a set of rules. You’ve seen this in games like No Man’s Sky, as well as older titles such as Soldier of Fortune and River Raid.
Offline procedural generation is often built in layers, with the base map giving coarse data of terrain and mountains, while rivers, roads and vegetation make use of this in their implementation.
There are many ways to generate objects procedurally. One popular approach uses a model of a physics engine to create different environments using the same rules and generating them from the same set of inputs. This is similar to the way in which video game levels are often designed.
Another method uses a set of algorithms that use cellular automata to produce different environments. The Game of Life is an excellent example of this. The simulated cells obey four simple rules, and yet the result is a complex system of chaotic events.
Some games also use artist created content to provide specific features for a world, while others use a combination of both approaches. For example, Left 4 Dead uses a mixture of procedural generation to create certain areas of the map while Borderlands generates items and weapons. These systems are often built in layers. The bottom layer provides coarse data such as the terrain shape and topography, while higher layers create detailed features such as roads, rivers and vegetation.
Procedural generation can be used to create environments on a massive scale. This is what you see in video games like Minecraft, where the world is generated on a block by block basis following certain rules to create mountains, caves and other landscape features.
You also see it in survival and open world games where the player can explore a huge map that is randomly or deterministically generated. These games may use cellular automata to generate different pixel or voxel-based biomes and then distribute objects, resources and creatures within them.
This can be done at runtime or offline as part of the game’s design process. When it is done at runtime, the generation has to be able to work in very few milliseconds per frame of the game, so high-detail generation isn’t always possible. Offline generation, on the other hand, can be much more detailed and takes advantage of computer power to render the results.
Procedurally generated characters can be used in a variety of ways. They can replace hand-authored models entirely, or they can be used to provide a large number of variants of the same model, such as different rotations, shapes and colors. This can help to avoid the “thousand bowls of oatmeal” problem where a game may have many technically unique variants of an object but in the end they all look the same to the player.
This method is particularly useful for background or other content that cannot break the game if it isn’t perfect, such as foliage. For example, the game No Man’s Sky is primarily procedurally generated but is supplemented with some more detailed foliage which has been hand-authored.
The generation process can be done offline as part of the design process, known as offline procedural generation, or it can be integrated into the game to be run at runtime, known as online procedural generation. The latter type of implementation generally puts a great deal of pressure on the performance of the algorithm as the game only has a few milliseconds per frame to perform all its logic including AI, physics, rendering and the generation process.
Procedural generation (abbreviated as proc-gen or proc) is a technique used to create data algorithmically rather than manually. The process can be automated and random and is often applied to generate assets in video games such as the landmass generation in Minecraft or No Man’s Sky. It can also be used to create textures and 3D models.
For audio, procedural generation allows developers to use algorithms (often pseudo-random) to produce music configurations that adapt and change during runtime, known as online procedural audio synthesis. This can be done using tools like generative noise functions, cellular automata and fractals.
This can save time and money compared to manually creating sounds from scratch. It also reduces the need for large sound libraries, allowing developers to save storage space and make more room for other game content.