top of page

What is procedural generation? Why do game developers use it?

Introduction

Procedural generation is a method of game development in which game developers create content algorithmically rather than manually. This can include everything from the way that levels are generated to the way that character movement works. Procedural generation has become more popular over time and there are many different types of games where developers have used this technique.

Procedural generation is where game developers create a game experience algorithmically rather than manually.

Procedural generation is where game developers create a game experience algorithmically rather than manually. In other words, they write code that generates the content of the game based on certain parameters. It's used in games to create levels, characters and other content that can be randomly generated within the rules of the game's mechanics.

It's important to note that procedural generation isn't always used in games; sometimes designers will handcraft everything you see on your screen by hand. But there are plenty of examples where it makes sense for developers to use procedural generation techniques—namely for creating replayable experiences or big worlds with tons of content (like Minecraft).

Roguelikes are often known for their difficulty. They usually have large maps that are randomly generated to make them slightly different every time you play.

Roguelikes are often known for their difficulty. They usually have large maps that are randomly generated to make them slightly different every time you play. Some of the best examples of this style of game include:

  • Rogue (1980)

  • NetHack (1987)

  • Dungeon Crawl Stone Soup (2006)

Roguelike gameplay elements can also be found in other types of games, including first person shooters or adventure games.

Roguelikes are often turn based, but there are also real time roguelike games. Roguelikes can be played on a variety of platforms, including PC, console and mobile.

In roguelike games you will often find:

  • Permadeath - If your character dies in the game, they cannot be brought back in any way except through restarting from the beginning. This is usually seen as an extra challenge that makes each run more tense than usual. Some players enjoy being able to replay the same game over and over again while trying different strategies or characters; others enjoy having an end goal to work towards since it gives them something concrete to aim for instead of just wandering around aimlessly like many other sandbox titles do nowadays (or worse yet - not having any goals at all!).

  • Randomized maps/levels - The layout of each level changes when you start playing again so that no two runs are exactly alike even though they may share similar themes or storylines (such as exploring ruins). This adds replayability because every playthrough will be unique!

There are three main algorithms used to generate roguelike levels: cellular automatons, noise functions and random walks

Before we begin talking about how to generate levels, it's important that you understand some of the different methods used. There are three main algorithms used to generate roguelike levels: cellular automatons, noise functions and random walks.

Cellular automatons use a grid-based system where each cell has its own state (e.g., alive or dead). The state of each cell is updated based upon the state(s) of its neighbors in addition to an input function (for example, a clock-like signal). The results can produce interesting effects such as terrain and textures for materials. Noise functions also use a grid-based system but they take into account more than just neighboring cells; they also consider nearby points as well as their distance from the origin point (or seed). This allows them to create caves with twisting passages that look natural but still feel hand crafted at the same time since there isn't any type of randomness involved--everything is deterministic! Random walks are similar except there isn't any type of pattern when looking at neighboring cells/points; instead there is just pure randomness which tends not look very good unless modified somehow like using Perlin noise functions or interpolating between two end states rather than jumping directly from one end state back again every single time step so that areas don't overlap too much during generation times."

A noise function is an algorithm that generates what looks like random information but is actually deterministic. Noise functions take seed values and parameters that allow you to create different noises randomly. Some examples include perlin noise, fractal brownian motion and value noise. These sounds can be used to generate things like terrain (like in Minecraft) and textures for materials.

Noise functions are deterministic algorithms that generate what looks like random information, but is actually deterministic. Noise functions take seed values and parameters that allow you to create different noises randomly. Some examples include perlin noise, fractal brownian motion and value noise. These sounds can be used to generate things like terrain (like in Minecraft) and textures for materials.

The advantage of procedural generation over hand-crafting a map is that you don't need an artist or designer who knows how to draw mountains, rivers and trees etc., which makes it both faster and cheaper than traditional methods of generating maps such as tile-based systems where each section of map has been individually mapped out by hand.

Random Walk algorithms can be used to generate natural looking caves with twisting passages, which is the goal of cave generation algorithms using this kind of noise function. It works by picking points on the map at random, adding one more point if it has less than its threshold number of neighboring cells then adding a wall otherwise. These points will always be connected because they can't be topologically disconnected from each other.

Let's look at an example. To generate a cave map, we start with an empty list of points and then repeatedly pick a point at random, add it to the list if it has less than its threshold number of neighboring cells, or else add a wall between it and any neighboring cell whose distance is greater than its threshold. This will always connect points because they can't be topologically disconnected from each other.

If you're interested in more detail about this algorithm check out this paper by Dan Sunday which covers how he implemented it in Unity using their C# API: https://github.com/sundaydan/Unity-CaveGen

Conclusion

Game developers use procedural generation for a number of reasons. First, it’s cheaper to create large worlds with different types of environments if you don’t have to manually build each one. It also allows you to create an infinite amount of content without running out - no matter how many times players play through your game, they'll always find something new! Finally, there are some people who just enjoy playing games where they never know what will happen next



bottom of page