Mad About Science: Procedural Generation

By Brenden Bobby
Reader Columnist

Unless you’re an avid gamer, the phrase “procedural generation” probably hasn’t meant much to you up to this point. You have to admit, it looks more like the name of a sci-fi cop novel than anything that might impact your life.

However, procedural generation has slipped its way into our digital lives in more ways than we realize. So what is it?

Essentially, it just means that a computer made something, graphically, with minimal human intervention.

The most relatable example I can think of is “Minecraft”.

Mojang, the developers of “Minecraft”, programmed the functions, models and textures into the game, but set the game up to generate everything inside of it as you encounter it, then save it afterward. That means that no two experiences are alike, and each time you step into a new world, you’re stepping into a totally new adventure.

How does the computer do this? Will it gain sentience?!

Luckily it won’t. It’s just using mathematical algorithms programmed in by the developers to generate things in a procedure, hence the name. In the case of “Minecraft”, it begins with a seed. You can’t plant the seed in the garden, because this seed is just a string of numbers that fits into the constant of the algorithm.

As an example, if you set the seed as 12345 then enter the game, you’ll get a world. If you start a new game and set the seed as 12345, you’ll get the exact same world, because 12345 is now the constant in the equation you can’t see.

So what happens if you don’t select a seed? How does the computer figure out what to do then?

There are a number of ways the computer decides how to proceed. We’ve talked about RNG, or random number generation before. A computer is a machine, and it’s not capable of being truly random, it’s just really good at appearing random. If you don’t select a seed, generally the computer will snapshot the exact time it was told to create a seed. You don’t see these processes happening, so to you it looks completely random. In actuality, if you told it to create something at the exact same time (down to the thousandths, even millionths of a second) on two separate days, chances are you’ll get the same outcome. This process varies between software developers.

So what are the benefits of doing things this way? There are many!

Less human time spent on developing computer programs. This translates to less money being spent on program developers and a bigger focus on catching bugs and unintended behavior, which creates a polished and marketable product.

Less file space usage, which translates to faster download times, more storage on your computer and better computer performance.

More variance for the end user. Who doesn’t like variety? “Minecraft” and the “Diablo” franchise are still hugely popular because of their near-infinite replayability.

While procedural generation has the biggest benefit to gamers, that’s not the only place it’s filtered into our lives. It’s been used in the film industry to quickly generate background items that appear extremely detailed, but would cost a fortune to build and shoot for a few hours. As an example, some chain grocery store commercials procedurally generate stands full of fruit. If you were to visit during filming, you’d see empty stands, but they later use a computer to generate an apple, then an algorithm to generate another apple of a slightly different shape, color, maybe with different markings, then do that a couple of hundred times in a few seconds to fill the stand.

Background items that aren’t a focus, like cliffs or clouds or treelines are also procedurally generated, especially in movies that heavily use CGI (think: any superhero movie.)

Similar functions are used to tailor search engines to your interests. The seed, in the case of your search engine, is your past results, then the algorithm crafts everything around those searches to fine-tune future results for you. This, however, isn’t technically referred to as procedural generation. It has another name that strikes fear into the hearts of humans, who are woefully ignorant of the depth in which it permeates our lives.

Artificial intelligence.

Dun dun dunnnn!

That’s right, 7B. I lured you in with the promise of cool game technology to bait and switch you into a controversial subject at the cutting edge of science.

I’ve been wanting to cover AI for a while now, but it’s an intensely complicated, multifaceted subject that would take a few articles to cover.

Now that we’ve covered some of the basics, we can dive right in next week to begin a two-week series on artificial intelligence.

In the words of another famous AI: I’ll be back.

While we have you ...

... if you appreciate that access to the news, opinion, humor, entertainment and cultural reporting in the Sandpoint Reader is freely available in our print newspaper as well as here on our website, we have a favor to ask. The Reader is locally owned and free of the large corporate, big-money influence that affects so much of the media today. We're supported entirely by our valued advertisers and readers. We're committed to continued free access to our paper and our website here with NO PAYWALL - period. But of course, it does cost money to produce the Reader. If you're a reader who appreciates the value of an independent, local news source, we hope you'll consider a voluntary contribution. You can help support the Reader for as little as $1.

You can contribute at either Paypal or Patreon.

Contribute at Patreon Contribute at Paypal

You may also like...

Close [x]

Want to support independent local journalism?

The Sandpoint Reader is our town's local, independent weekly newspaper. "Independent" means that the Reader is locally owned, in a partnership between Publisher Ben Olson and Keokee Co. Publishing, the media company owned by Chris Bessler that also publishes Sandpoint Magazine and Sandpoint Online. Sandpoint Reader LLC is a completely independent business unit; no big newspaper group or corporate conglomerate or billionaire owner dictates our editorial policy. And we want the news, opinion and lifestyle stories we report to be freely available to all interested readers - so unlike many other newspapers and media websites, we have NO PAYWALL on our website. The Reader relies wholly on the support of our valued advertisers, as well as readers who voluntarily contribute. Want to ensure that local, independent journalism survives in our town? You can help support the Reader for as little as $1.