How is procedural generation different from just regular generation?

488 views

Slightly related to a recent post.

I understand procedural generation in video games is basically an instruction set to tell the computer to run through to get the same result every time so that it doesn’t load a whole level each time, it builds the level based on a set of parameters.

How is this different than just loading a built level? Isn’t that what a normal script of code is in any other game? Is an instruction set to tell the computer to load the level?

Is it just the difference between one being done by a programmer and one done by a level designer/artist? They both need assets already designed and made to work right?

In: 30

15 Answers

Anonymous 0 Comments

Imagine a space game where we have different planets. Each planet’s characteristics is determined by a set of 16 digits strung together, say the first 3 numbers represent size, the next digit is the color, the next is type of planet, and then then the next few digits are the x y and z coordinates.

So a planet would look like 4783079433924570.

With regular generation, we would manually pick values for each planet and store them in a list. If we had a million planets, each of those values would have to be stored on a hard drive somewhere. That would be a million x 16 digits, so roughly 15.26 MB of data.

For procedural based generation, instead of storing data on the harddrive, we could instead find a decimal number that repeats infinitly with no patterns. For example, pi or the square root of 2. We could use that list of digits and do some fancy math to split the number up in to 16 digit chunks and generate our planets from that. We just need to store that math function and do some extra processing to get our planets.

Procedural saves on hard drive space, but takes up more computing power to get the same level of detail. We would also need to find a cool infinite number to use, otherwise, there could be weird results, like 3 planets stacked inside each other. With regular generation, we could hand pick our values. More work, but we can minimize any weirdness and make every look good.

You are viewing 1 out of 15 answers, click here to view all answers.