Procedural Content Generation in Games is an in-development-textbook about games and procedural content by Noor Shaker, Julian Togelius, and Mark J. Nelson, plus a ton of contributing writers. 

As mentioned by renderfck in reply to the question about tutorials, it’s a good next step for learning about more advanced procedural generation. It’s got detailed technical breakdowns of various techniques, with a focus on approaches that are useful in playable, interactive situations. I want to cover the chapters here individually at some point, but if you’re interested in any of the content of this blog, you’ll probably want to read the book long before I get around to doing that.




elfboi:

procedural-generation:

The Library of Babel

“The Library of Babel” is a short story by Jorge Luis Borges, about a library with every book that could ever be written. The ideas it discusses touch on the meaning of language itself.

But what if you could experience the library for yourself? Take one of an infinite number of volumes off the shelf and flip through it. Now you can.

The text of every Tumblr post ever written is in one of those books. And reversed. And translated. And in code. Your name is in there. This post is in there. As is every post I am going to write in the future.

In an incredibly clever feat, the library is searchable. You can read how it’s done, if you want a glimpse behind the curtain, or you can just browse at random and discover texts no human has ever encountered before.

Too sad the website is offline now. :(

Not dead, just sleeping. :)







Skyline (2015)

Shadertoy is a website where people post 3D graphics shaders they’ve created. Some of the shaders can get quite elaborate, such as this example: a procedurally generated city created by Octavio Good.

The source code is included (and CC0 licensed) so you can take a peek under the hood and see what its doing. It’s very well commented.

Graphics shaders are an example of how procedural generation has become an inseparable part of computer graphics: every shader is a tiny program that  runs on the graphics card and generates a visual output via a procedure. This particular shader takes that to an extreme, but many games nowadays have quite a bit of generative processes going on right under your nose.

https://www.shadertoy.com/view/XtsSWs











Cloud OCR

It’s another project from everest pipkin! This time it’s about reading clouds.

It works by grabbing the Google Streetview imagery for a chosen location, looking up, and then running optical character recognition on the resulting photo. To say that this is an unexpected way to appreciate clouds is perhaps an understatement: we often talk about seeing patterns in the clouds, but reading them as text is a twist worthy of BLDGBLOG.

What have the clouds been trying to communicate to us? Look up: what staccato typewritten message is passing unnoticed overhead? 

http://ifyoulived.org/translations.html












Frontier: First Encounters (1995)

Explore a galaxy of procedurally generated stars and planets!

The third Elite game (legal disputes notwithstanding) was very similar to Frontier: Elite 2. It updated the graphics with procedural texture mapping and it adds more of a plot structure, should you choose to explore that. It also added a few new bugs. Despite those, it’s become a reference implementation for Frontier/Elite style gameplay.

The world of Elite is still fundamentally a lonely one, full-motion-video NPCs notwithstanding. But there are an immense number of planets to potentially visit, and while most of them don’t have a whole lot of extrinsic rewards for doing so, the physics of landing your spaceship at any arbitrary location keeps each planet as a destination, not just something to look at.

The planetary rendering code makes use of progressive tessellation to handle the level of detail changes required to deal with the differences in scale. Due to the tech limitations at the time (on the 386) this creates very visible popping as you fly closer to a planet. This can occasionally make things tricky when you try to land. 

The way this exposes the underlying algorithm also has an interesting humanizing effect: the game feels more alive because of this technical limitation. Observing the inner workings of the game makes it easier to understand what is going on, involving the player in the process and facilitating the ergodic agency that is at the heart of the game’s appeal.

image

Once you are on the ground, the major gameplay element that interacts with arbitrary parts of the surface is the deployable mining machine, which can be used nearly anywhere on the planet. (You get fined if you try to mine near a populated spaceport) While it’s not the most engaging part of the game, it does tie intimately into the minute details of the generator.

If you’re going to design a vast generative landscape, that’s something worth keeping in mind: having some kind of interaction that depends on the details of your generator. Try to give your generator a feel that goes beyond just simple visual looks. It can be an extrinsic reward (as with the mining) or intrinsic (such as the feel of trying to land on the surface) but think beyond the immediate, material appearance and try to give the generator a life beyond its surface representation.

First Encounter’s major intrinsic reward, like with most exploration games, is sightseeing. Because the physics of the planetary orbits are modeled in detail, you can go stargazing: turn on the time compression and watch the stars and planets spin overhead. And while the planets aren’t populated with very many structures or vegetation, they do manage to convey an atmospheric bird’s eye view of countless alien worlds.

image






Website Simulators

This is starting to become a trend. First one I noticed was Subreddit Simulator, a collection of bots that create a fully-automated subreddit that is entirely populated by bots that post Markov-chain generated comments using other subreddits as the source text. Which means that you get things like the Song of Ice and Fire Subreddit bot arguing with the Skyrim bot while the Crusader Kings bot offers strategy advice. The only human interaction is the ability to upvote the bots’ posts. People who accidentally stumble over the subreddit or its output are frequently confused.

(While the subreddit apparently uses Reddit’s API to grab live comment data, if for some unfathomable reason you wanted to build your own Reddit comment simulator, you could always grab the complete, 1TB public Reddit comment data.)

The Hacker News simulator, partially inspired by the above, also grabs past comments and feeds them through a Markov chain. While it’s not the first Hacker News simulator, it is the most through one I’ve seen, simulating not just the titles but also the comment threads. 

In both cases, the context of the original site gives enough interest to the facsimile to elevate it above the chaos of the often unintelligible Markov chain output. The Hacker News title generation is particularly convincing, a glimpse at the click-bait news titles from the universe next door.

https://www.reddit.com/r/SubredditSimulator/

http://news.ycombniator.com/







Mystery Tapes (2015)

Strangethink has done it again. I’m not really sure what the ‘it’ is, but the 640 mysterious VHS cassettes in this latest release continue the theme of re-purposing a specific artifact as a symbol for the procedural generation of space and meaning. The aesthetics invoke the era of early video art crossed with early computer art crossed with whatever it is that drives Strangethink’s alien intrusions into our plane of existence.

It would be very easy for this to be context-less chaos, but for whatever reason, the sound, visuals, and text in Mystery Tapes manages to imply just enough context to point you towards the enigmatic glowing egg…

http://strangethink.itch.io/mystery-tapes




chead:

There’s a legit Perlin Noise emoji in iOS 9.1 (attn procedural-generation)!

Cool!








ghostlevel:

procedural-generation:

Proteus (2013)

I needed something soothing after last weekend, so I decided that it was time for a vacation in the relaxing symphony world of Proteus. 

The heart of Proteus is in its procedural generation. The postcards saved from the game with F9 even come with the address of the island, the seed that it grew from. This time I visited island #1457104792.

Proteus has a relatively wide and flat interactive structure: where you are on the island is the primary thing that determines what you see, not your actions beforehand. There is very gentle gating as the island progresses through the seasons, and so the result induces quiet contemplation rather than obsessive exploration.

Proteus doesn’t get its interest from huge variation or complex interactions. Instead, it composes vignettes that induce the perfect momentary mood, like a visual haiku. 

And that’s the heart of Proteus: it’s a place where it’s worth stopping to sit and watch the sun set.

I need to take more walks in Proteus (with the Purgateus mod too).
And take/save postcards. I’ve never saved postcards.

(Is there a way to “load” a world with a specific seed to revisit it?)

Your two thoughts are connected: Proteus postcards contain the seed for the world they were created in, hidden in the lower left corner of the image:

image

Since procedural generation can often be reduced to tiny seed numbers, this is a neat trick for easily sharing game information between players. Spore does something similar, apparently using the alpha channel, though there are several other ways to embed arbitrary data into PNGs.




fyprocessing:

(via Processing architecture and landscapes on Vimeo)

Made with Processing. Based on source code available on openprocessing.

“Procedural Ink” openprocessing.org/sketch/117624

Here’s a cool procedural drawing tool. It uses a photo for input, analyzes it to detect vector fields, and uses that to generate the curving lines. The source code for the basic technique is available on OpenProcessing.org. Can you think of clever applications for it? Or ways to combine it with other techniques?

Ale González, the author of the original Processing sketch has a ton of other processing sketches, many of them showing off different generative techniques. Here’s one of his generative music videos: