Procedural Generation is a form of creating media automatically. Rather than hand-crafting every coastline, mountain, tree, person, and their identity, a designer makes a system where they need to enter a few variables and the program works out the details. It's a bit of a double-edged sword: when it's done well, it works really well, but when it's done poorly, it's either a mess or horribly boring.
Procedural Generation has a kind of sinusoidal history: it was pretty much required in the days of 8-bit gaming, as cartridges and computers literally did not have enough memory to store all the levels. This brought in the concept of using "seeds" to grow a randomly generated world which looked realistic and challenging. Then, as games got more detailed and had more capacity, level creation was done manually, as by this time, random generation, particularly in games with save features, took up more space than static levels (take Dwarf Fortress for example: each world can hit 100MB... in .txt form). As of late, procedural generation in video games tends to be behind the scenes: in AI, for example, or for audio or visual effects.
To generate more complex maps procedurally, an algorithm called "Wave Function Collapse" may be used. In short, that means; the computer gets a pattern like "Water tiles go next to sand tiles, sand tiles go next to grass tiles, etc." and generates a grid in which all tiles exist in a superposition of states. Then it randomly "collapses" one of them into a random state and updates the neighbouring tiles accordingly. Repeat until completion.
Even if static maps exist in a game, it's possible procedural generation was used in development to save map developers some time... and is most likely if it involves random tree or rock placement, or anything to do with cliffs or coastlines.
The Demoscene has historically made more use of these techniques than anybody, in order to get spectacular graphical effects out from tiny, tiny packages.
Randomly Generated Levels, Randomly Generated Loot, and Dynamic Difficulty (and, by extension, Rubber-Band A.I.) are subtropes; put pure examples of either there. Roguelikes in particular are defined by this kind of level generation.
- The .hack games use a variation of procedural generation for fields and dungeons; at Chaos Gates in Root Towns, players can input a combination of three keywords to act as the seed for the field and dungeon they wish to travel to, with the keywords determining everything from monsters to terrain to difficulty level.
- .kkrieger was very famous in its day for being an FPS built near-entirely on procedurally generated content, matching the likes of Doom³ with a filesize of only 96 kilobytes.
- AI Dungeon 2 is a Text Adventure that uses procedural generation based on player responses to create its prompts. It markets itself as the first video game with an infinite amount of content to explore.
- Borderlands does this for your loot. It was going to make the world this way as well.
- cactus' several games, including Protoganda games and Burn The Trash use random seed generator to create enemies out of random parts that are always the same. These games also often included "random" option where enemies are completely random.
- Castle of the Winds randomly generates the dungeons outside of certain plot-relevant elements.
- Cloudberry Kingdom is a Platform Game that generates its levels based on the player's skill level and the type of power (Double Jump, Flight, Jet Pack, etc.) they are using. Even at its most sadistic, most levels are designed to be solvable.
- Conway's Game of Life is an artificial life simulation that involves drawing cells on a grid and then applying the game's rules to them. It can lead to some surprisingly life-like patterns. The Other Wiki has some particularly awesome animations.
- Cube World has a world that generates as you progress, which can contain different biomes, cities, and dungeons. The worlds use seeds so players can share interesting maps with each other.
- There's a trend in Rhythm Games to do this: creating maps from a user's music collection. Dance Factory most likely started this, making DanceDanceRevolution-style step charts, and indie games like Audiosurf and 1...2...3...Kick It! (Drop That Beat Like An Ugly Baby) offer different takes on the idea.
- Darkest Dungeon randomly generates most dungeons and adventurers.
- Demoscene competitions challenge developers to make the most advanced 4K, 1K, 256-byte, 64-byte, or even 32-byte software.
- Deep Rock Galactic uses this for level generation, ensuring each mission has a different layout.
- Dragon Creek has seven species of dragons, each with a set list of parts, and they can come in any colour. The player can choose to have one randomly generated, input a code to get a specific dragon, or customise one.
- Dwarf Fortress: Not only does it generate terrain for a region up to the approximate size of the planet Earth, it also simulates weather, erosion, and other geographical features in minute detail. And then it adds up to a thousand years of procedurally generated history: Wars, battles, the rise and fall of empires and dynasties, and even the creation of great works of art and literature. The game even has procedurally generated "forgotten beasts" living underground, similar "titans" living above ground, various "night creatures" generated from a different format, and the procedurally generated Hidden Fun Stuff. The .40 versions also contain procedurally generated metal, weapon, armour, and entity raws for adventure mode HFS.
- The Elder Scrolls
- Arena and Daggerfall were almost entirely generated in this fashion, with a few plot-specific cities and dungeons as exceptions. The former being the size of Europe, the latter being only the size of Britain or so. Both also use Randomly Generated Levels for areas and dungeons that aren't plot-important.
- Morrowind went away from it for the first and, to date, only time in the main series. The entire world was hand-created and remains exactly the same between playthroughs. It helps that, through the use of Space Compression, it is nowhere near the size of its predecessors but is still far larger than most game worlds.
- Almost all of Oblivion is created through simulated soil erosion, with dungeons being made of random parts of quest dungeons, making for long, repetitive crawls. Coupled with enemy and loot spawns being spreadsheet generated, much of the uniqueness seen in Morrowind was lost.
- Skyrim, while still having non-quest related areas of the landscape generated in this fashion, made a move away from this trope compared to Oblivion. Even many non-quest related areas were still hand built to inspire awe and give the game's regions a more unique feel.
- Elite was one of the first games to use this technique to generate not only worlds, but names, descriptions, and even prices of commodities, among many other innovations, by using the Fibonacci sequence. All in 22 kilobytes — your phone likely uses more for menu transitions.
- Empire Earth: Random maps are generated according to some specifications (terrain type, map size...), but the editor allows their creation with just a seed number. The second game allows a bit more tinkering (resources close to starting positions or placed randomly, allies starting together or not, etc.).
- Fuel is a Racing Game with a map of 14,000 square km of postapocalyptic wilderness, or half the size of Belgium. It uses a fixed seed generated by the developers (because if they shipped the entire map, it wouldn't actually fit on the disc) and a few manually created landmarks. The game was praised as an incredible technical achievement, but most reviewers considered the idea wasted on a racing game.
- Gangland had the wife of Player Character Mario who gets killed later in the storyline procedurally generated.
- Kingdom of Loathing has a number of zones based around randomly-generated content, such as the GameInformPowerDailyPro dungeon. Jick, one of the founders of KoL, has a self-admitted fondness for procedural generation, so much so that it's possible to use a special item to enter his subconscious and fight your way to the top of the Tower of Procedurally-Generated Skeletons. Your reward for clearing it is a sword with five semi-random enchantments, the combination of which is (probably) unique to each player.
- In Kitty Powers' Matchmaker, the clients are generated with mostly random interests, hair and eye color preferences, and personality traits, although not everything is completely random — for example, geeks are way more likely to be introverted.
- Left 4 Dead handles music the same way, giving each survivor their own music based on what was happening to and around them, and not necessarily to his teammates. Additionally, spectating a player will also duplicate that player's music for the spectator.
- Lenna's Inception: The overworld and dungeon maps, as well as the dungeon/item/boss order, are determined by the seed name you chose when creating a file.
- The traitors in Lost Dimension are randomized each time through the game, with the sole exception of the first one. On a New Game Plus, that is also randomized.
- Middle-earth: Shadow of Mordor and its sequel use procedural generation as part of their "Nemesis System": every Orc has a unique appearance, and every captain, warchief, and overlord encountered is given a unique name, voice, a title related to their expertise or personality, and various strengths, weaknesses, Berserk Buttons, and phobias.
- Minecraft procedurally generates landscapes that are, for all practical purposes, infinite. There's an end, but it's about 30,000 kilometersnote from your spawn point, which would take a minimum of 820 hours of gameplay to reach without cheating. The terrain randomly contains NPC villages, dungeons, strongholds, temples, and abandoned mineshafts, as well as thirty-six distinct biomes, including mountains, jungles, deserts, swamps, and tundras. This combines to create an immense worldnote that you could spend your entire life exploring, if you felt like it. Furthermore, the game uses a special code called a seed to keep generated terrain consistent, and there are roughly four billion seeds to choose from, each of which can generate a unique world. The same seed can be used to generate the same world on any computer, and there are quite a few websites dedicated to sharing interesting seeds with other players. The alternate dimensions, the Nether and the End, also generate procedurally, which results in extremely varying layouts in different seeds for both as they consist basically of massive cliffs and floating islands respectively.
- Noctis: A space flight simulator allowing you free roaming in a galaxy approximately 90 thousand light-years in radius (about double the radius of the Milky Way Galaxy) made of over 78 billion stars, many with planets and moons. If you pick any point in the starfield, you can go there, then land on any rocky planet you find and roam around, created by a program of under a megabyte.
- No Man's Sky, a sort of Spiritual Successor to Noctis: A space flight simulator allowing you free roaming in a massive universe full of stars, all of which support at least one of the game's 18 quintillion planets, all procedurally generated. And the planets aren't the only things that are procedurally generated, either: every plant, animal, asteroid field, spaceship, trading route, weapon, and space station in the game is also procedurally generated.
- One Way Heroics uses seeded PRNG worlds. You can share these worlds by providing the seed numbers to other players.
- Pitfall! used a linear feedback shift register to generate 256 screens within the four kilobyte confines of an Atari 2600 cartridge.
- Portal 2 procedurally generates music based on user actions, using a decent number of different sound effects. The game composer mentions that the frequency of hearing the same track twice is somewhere in the tens of thousands of years.
- River Raid randomly generates the level layout with each playthrough. This is the first video game to have such a feature. According to an interview with developer Carol Shaw, she said that she wanted to create a bunch of levels, but was unable to fit them on a cartridge, so having the game generated the level layout randomly on the fly was a solution to the problem.
- Rodina uses procedural generation to generate countless square kilometres of planetary terrain (the planets themselves are predefined), create asteroids in the asteroid belt, and leave wrecks of the Vanguard fleet strewn throughout the solar system.
- The Sapling: When random mutations are turned on in sandbox mode, the game adds pre-existing parts in logical locations onto pre-existing species. Also, the background music during gameplay is made of various parts that play depending on what's happening.
- Space Engine supplements stars, planets, nebulae, black holes, galaxies, etc. discovered in real life with countless stars, planets, nebulae, black holes, galaxies, etc. generated from a fixed seed.
- Spelunky uses PRNG level 'chunks' that are then ever-so-slightly further randomized.
- Spore can take any creature design and make it workable. And that's not including the number of stars in the galaxy and the planets surrounding those stars and the creatures on those planets, all procedurally generated.
- Starflight used a plasma cloud fractal to generate altitude maps for 800 planets. The game fits on two 360k floppy disks.
- The Swindle generates a heist location anew with each mission launch, and randomly creates a vaguely British-sounding thief whenever you lose your previous one.
- The "Oblivion" music from Turok 2 is an apparently infinite non-looping sequence of pseudo-randomly arranged instrument clips.
- In Westerado, the appearance of the person who killed your family in the opening, and who is searched for by the player the entire game, is randomly generated every time you play to keep the game fresh. Even their gender can change!
- Wildermyth randomly generates its world map and playable characters, which further evolve during gameplay based on how the player handles the various randomly-selected events they encounter.
- The Wolf and the Waves: The spawn locations of enemies, rabbits, mushrooms, and cure ingredients are randomized every playthrough.
- World Neverland: Daily Life in Elnea Kingdom starts the player out in one of eight pre-made states, with a set group of NPCs in certain roles. However, its evolution from that point is based entirely on the actions of the player and procedural generation.
- XCOM 2 features procedurally-generated maps that used pre-generated UFO and building elements as part of the landscape (explained in detail in a Games Developers Conference Talk). These can interact with Save Scumming to the player's advantage: if you don't like the layout of a mission, load a save from before the mission starts. The mission will reappear with the same objectives, but on a different map, which may be easier or harder than the previous map.
- Evolution: The Game of Intelligent Life: The game can procedurally generate new and unique maps that will change over the course of the game.
- Betrayal at House on the Hill [sic] is a board game involves 3-to-6 players exploring a haunted mansion. It is procedurally generated by drawing and placing square tiles, each representing a room of the house, every time a player goes through a not-yet-opened door. (This can lead to Alien Geometries like doors to nowhere or an underground lake next to the parlor.) Additionally, at some point and the Co-Op Multiplayer exploration phase switches to Asymmetric Multiplayer as one player betrays the others and becomes a supernatural antagonist who must be defeated. The exact nature of the threat is determined by which player failed the saving throw, what (randomly drawn) event they were rolling against, and what room of the house it happened in.
- Blades in the Dark has tables for randomly generating entire city parts, missions, NPCs, and even simple word on the street from a couple dice rolls. The official usage instruction of these tables simply says "Roll some dice and use the results and these tables however you see fit."
- Dogs in the Vineyard contains a procedure for the Game Master to quickly generate entire towns from a single conflict idea.
- Dungeons & Dragons 5E DMG includes tables of random dungeon rooms, monsters, and loot, allowing a DM to run a simple yet varied Dungeon Crawl with zero prep just by rolling some dice and engaging their imagination. The first edition of Advanced Dungeons & Dragons included a similar system, and random "wandering monsters" generated from an encounter table have long been a feature of the game.
- Stars Without Number has tables for randomly generating entire sectors of space. The detail goes from planet placement down to how breathable the atmosphere is to what factions are on planet. There is even a metagame where the game master can generate interactions between factions, both sector-wide and local to a single planet.
- Most editions of Traveller have a process for randomly generating worlds. Some editions take this much further. T5 lets one generate an entire solar system this way, including detailed world maps for each non-gas giant, to the point that its author cautions against doing this too much if it is being done to prepare for a game (doing it for its own sake is fine).
Map Only As Really Necessary
- Generative music sequencing, often used by IDM bands such as Autechre.
- mezzacotta has comics generated using the date as a seed.
- Various CGI animated works randomly generate background characters to avoid the tedious task of having to design each background character individually. Pixar, for example, randomly generated many of the background monsters in Monsters, Inc. and its prequel based on a variety of factors (body types, number of eyes and limbs, size, color, etc.). This did sometimes result in the characters looking identical to one another, but it's usually considered a minor inconvenience.
- The Avengers (1960s) episode "Love All" (6-21) involved computer-generated romance novels.
- One of the background details in Nineteen Eighty-Four was similar (pornographic) literature and patriotic music generated using a kind of mechanical computer.