Procedural generation, a concept originating from computing, is a method for creating data through algorithms. This means that by using programmed instructions and the processing of numerical codes, known as map seeds, it is possible to generate elements automatically and randomly. This process is capable of producing everything from textures to complex three-dimensional models, and it is widely applied in computer graphics. Despite its various applications, procedural generation gained notable prominence during the development of video games.
In games, procedural generation was implemented with the goal of simplifying the creation of levels, maps, and worlds, requiring minimal human intervention. To achieve this, specific algorithms and techniques are employed, depending on the type of content that needs to be generated.
Randomized graph traversal is frequently used in the creation of dungeons or branched maps, as seen in titles such as Slay the Spire and FTL: Faster Than Light. This procedure involves constructing graphs—which are mathematical models—to structure rooms and their connections, applying predefined rules regarding aspects such as the shortest path, the number of obstacles (like locked doors or other barriers that require specific items or skills to be unlocked), and the existence of dead ends.
Generally, all these components are taken from ready-made assets and subsequently organized into a geometric configuration that can be rendered. An example of this is transforming the structure of nodes and links into different diagonals into a more 'square' structure, with only horizontal and vertical connections, as observed in game dungeons.
Other important algorithms include Perlin Noise and the Voronoi Diagram. These functions are responsible for creating smooth transitions between elements, making them ideal for representing natural landscapes. The most common uses of these tools encompass terrain elevation, cloud texture, and the demarcation of distinct biomes or terrain types. Such features are quite common in game development engines, such as Unity 3D and Unreal Engine.
Weighted random selection is another very used function, especially in the positioning of enemies and traps, as well as in the creation of items and equipment. All this data is inserted beforehand, along with the 'weight' assigned to each one. With this information, the algorithm must weigh, following the defined 'weight,' and incorporate into the game based on probability and other established rules.
An illustrative case can be found in games like Diablo and Borderlands, as well as in most roguelikes. Their weapons and equipment have various attributes and abilities, which are randomly inserted into each item, also considering its type, rarity, and other factors.
The application of procedural generation in games dates back to the late 1970s, specifically in the early roguelikes. These games were inspired by Dungeons & Dragons but featured single-player gameplay, and their dungeons were generated randomly. However, the process was much simpler, given that the graphics were basically composed of ASCII characters (common keyboard letters and symbols). One of the most popular games of that era was Rogue, released in 1980, which served as inspiration for roguelikes.
Although it is an old technology, the first use of procedural generation with greater complexity and graphical potential occurred in 1996. It was in that year that The Elder Scrolls II: Daggerfall was released, presenting a procedurally generated map. The result was a colossal world, measuring 160,000 sq km, which mixed predefined central regions with algorithmically constructed terrain, cities, and dungeons.
A more 'primitive' form of procedural generation became known thanks to Gauntlet, released in 1985 for arcade machines. This game used 125 distinct maps, which provided a sense of novelty when restarting the game and returning to the first map, combined with increased difficulty and the randomization of treasures and items.
In its sequel, released in 1986, this 'randomness' was even further improved. Its more than 100 maps could appear vertically or horizontally inverted, in addition to being rotated up to 180 degrees, and the exit points could also change location, elements that intensified the feeling of uniqueness.
Recently, neural networks, which are machine learning models inspired by the human brain, have been incorporated to refine procedural generation. By combining traditional generation methods with AI deep learning, new possibilities emerge for creating audio, images, and levels in games. It is also possible to develop agents that test the game itself or more sophisticated NPCs capable of responding naturally to voice commands or questions asked by players.
However, these are technologies that are still in very early stages of development. One cited example was the Ubisoft's NEO NPC project, which aimed to create NPCs with natural interaction with players, generating automatic responses aligned with user speech, but the project did not evolve as planned. Without major explanations, it shifted direction to Teammates, agents that automatically react to player voice commands, replacing predetermined command lists.
These ideas represent great potential to raise the level of game interactivity, offering unprecedented experiences and greater immersion. Nevertheless, they are technologies that are still promises, most in preliminary testing, potentially resulting in failure or something very different from the original scope, as happened with NEO NPC. Therefore, it is recommended to observe these innovations with caution until there are more concrete results.



