Best Practices for Procedural Narrative Generation

This GDC talk, by Rogelio Cardona-Rivera and Chris Martens gives a high-level overview of different approaches to generating procedural narrative. They cover the whole spectrum, from the simulation of Dwarf Fortress to plot-centric things like Façade to new frontiers of discourse-centric narratives.

It’s mostly a look at the different techniques, with some dives into the details of implementing some of them. They also announced the launch of storygen.org, a site I’ve mentioned that catalogs story generators. Which I’m particularly excited about: there’s a bunch of research story-systems that could be used for interesting things but were never expanded upon. 

Though they’re mostly not very accessible, there’s unexplored artistic potential in there: for most of them, they’ve only been used for the stories they were originally designed for. Which often had more of an eye on researching innovative techniques rather than telling a good story. Not to mention to potential of plugging them into a larger game. Like using Prom Week’s social tech in Skyrim.

https://youtu.be/k2rgzZ2WXKo









Funding ProcJam 2017

I don’t usually talk about Kickstarters or crowdfunding here, for various reasons. But this one is different, because it’s not looking to fund a game or even a generator. It’s looking to fund ProcJam.

While the university funding for past ProcJams has been beneficial, I agree that it’s better to have the community sustain the project. The funding will go towards new art packs, video coverage, and another issue of Seeds, plus the thing that I’m most excited about: tutorials on procedural generation.

I’m always looking for more ways to show people how they can make things that make things, so I endorse this whole thing. I’m looking forward to seeing what ProcJam 2017 can accomplish.

https://www.kickstarter.com/projects/2056264679/the-2017-procedural-generation-jam




Awkwords

Since we’re apparently talking about made-up words today, what about a look at another conlang tool?

If you’d like something a bit more hands-on than the all-in-one-power of Vulgar, Awkwords is one of several word generators that create words based on patterns of syllable vowel and consonant construction.

It uses template construction with patterns and sub-patterns. It can get fancy with probability weights and filtering. By default it uses the standard vowel, consonant patterning, but the labels are arbitrary, so you can build any syllable construction that you like.

With the existence of fully-formed language generators, tools like Awkwords are now most useful when you’re trying to generate words with specific patterns or rhythms. A bit of linguistic knowledge helps, to know what the possibilities are: like most generative tools, word generators are an encoding of expert knowledge. They’re a description of the internal workings of a thing, a living diagram.

In this case, the encoded knowledge is about patterns in syllables. You’ll have to supply the phonemes yourself, and you’ll need to work out what the possible patterns are. But the strength of a generative tool is that you don’t need to know all of this up front: you can experiment. Each run of the tool gives you feedback for how well you understand the problem you are trying to solve. Generativity allows you to course-correct.

http://akana.conlang.org/tools/awkwords/




Diaspora Star Cluster Generator

Diaspora is a roleplaying game designed by Brad Murray and others at VSCA publishing.

Like many roleplaying games, Diaspora uses some generative elements to create content. In this case, an expressive method of generating a cluster of star systems that fit with the hard-sci-fi setting. It’s a clever little system that quickly produces a lot of story seeds. It’s also a handy base for building other, similar generators by using different sets of stats.

This online generator by Jeffery Miller automates it and produces a nice diagram of the cluster, plus suggests Aspects for each planet. I like the mix of aspects. It takes a lot of work to get a large enough collection to give good juxtapositions. But it pays off: When I encounter a bronze-age system with a thriving planet but poor resources, with “Byzantine Intrigue” and “Shapeshifters walk among us” that immediately gives me several story ideas, especially when I notice that their system is at the crossroads of the cluster.  

I’m fond of Brad Murray’s designs: one of his other games is the play-by-email Callisto, which I’ve run several times. (And I’m starting a new game soon!)

http://www.aristobit.com/diaspora/randomcluster.html




Procedural 2D Worlds

I recently came across this writeup by Nick Gregory about generating an explorable 2D platformer world.

Metroidvania-style platformers are 2D games that are built around the idea of large, explorable worlds. This presents some interesting challenges for procedural generation, but also some opportunities.

Nick presents a procedure for building rooms within the world that conform to the needed properties: you have to be able to get to the exits, for example. Platforms need to be high enough to be interesting but not so high that you can’t jump onto them.

It’s interesting to contrast this with something like Spelunky, which is in a similar space but takes a very different approach to level generation.

https://imgur.com/gallery/fM9yn








System Shock’s Procedural Music System

There’s a surprisingly long history of procedural music systems in videogames. Because the early MIDI tech was already playing notes on the fly, there were some sophisticated systems built to take advantage of that and also compose or arrange the music.

For example, System Shock 1′s dynamic music system. The music, composed by Greg LoPiccolo (And Tim Ries), is built out of different chunks that are assembled procedurally. This blogpost from one of the devs of the Kickstarted reboot explains some of the details:

The music for each level is not contained in a single file, but instead each level’s music is built procedurally from different musical building blocks, controlled by parameters in the game. The core set of each level’s musical building blocks are named with a gameplay state (“W”alking, “P”eril, “C”ombat) and a section (“A”,”B”,”C”,…). “WA” can play into “WB”, unless the game state changes to peril, at which it may play into “PB”. This kind of interactive system provides both varying intensity, which mirrors the pacing of the gameplay, and linear sections, which give the music a sense of forward momentum and structure. This procedural music system is then made more interactive by having various layers which represent the various enemies that are overlaid on top of the core level music, based on the proximity of enemies of that type. These layers are used to represent these enemies across the entire soundtrack, giving each enemy type a theme of sorts! Very cool, stuff!

(Greg LoPiccolo would also go on to be the project lead on Thief, Guitar Hero, and Rock Band, to name a few other games that depend on dynamic audio systems.)






Turbulent Planet Textures

One of the images above is from the amazing photos of Jupiter that have been captured by the Juno mission. The other is from a presentation by Stephen M. Cameron, about procedurally generating textures for gas giants that look appropriately swirly.

This effect is tough to replicate with some of the common texturing approaches. And it’s not just for Jovian planets: Earth’s clouds look wrong without it, and there’s a whole host of smaller-scale texturing (like water or flames) that looks better with it.

Perlin noise is a common basis for a lot of texturing, but despite looking a bit like puffy clouds it isn’t all that great for representing textures that are swirling or turbulent. Especially on a large scale, the swirls and flows form complex patterns that are beautiful and appear information-dense. Having a way to replicate that opens up another class of texturing options.

Stephen’s presentation (which he developed as part of his open-source game Space Nerds in Space) and this Junkship dev blog post about texturing planets looks like a good starting point for using a flow map created with curl noise via procedural fluid flow to create the swirling textures.

No doubt there are other methods out there, but I’m mentioning this one to point out a couple of things:

First, the common procedural generation tools (Perlin noise, in this case) aren’t always the best choice. There’s still lots and lots of new techniques that can be discovered.

Second, try combining processes and information (in the technical sense) from other sources: use flow fields and slime mold growth and plate tectonics and earthquake data and traffic noise into your generators.

Third, one reason why I think this looks better is that turbulent textures have an implied history, and that history is extra information. And the appearance of having denser information makes for better-looking, more convincing generation. It gives it another layer of meaning.




ALPHA (A TRANSLATION OF GENESIS 1)

Here’s a very clever use of word2vec.

Using the word2vec data, Douglas Summers Stay made a list of adjective-noun pairs, indexed by the sum of the two words’ vectors, and used that to translate general words into phrases that started with the desired letter. He then used this as a tool to help with his poetry composition, translating the first chapter of Genesis into words that all started with the letter A.

The resulting phrases remind me of kennings, the Old Norse poetic technique of using compound expressions to obliquely refer to  a person or concept. (The Skaldic Project has a database of actual historical examples.)

I’m fond of kennings, parallelism, sestinas, and villanelles: poetic forms that introduce extra structure and constraints on top of the natural sound-rhythms of the words and use repetition to juxtapose imagery. They’re especially useful for procedural generation. These regular forms are things that the machine can more easily detect and compose, even if it isn’t quite sure about the meanings.

The other significant thing to note here is that this was done with a tool, an AI-assistant. Poets have been using tools like this at least since the invention of the rhyming dictionary, but generative methods offer much more flexible ways to explore unexpected connections.

Poetry is, in some sense, a way to get beyond the surface meaning of words and find the hidden patterns. The meaning we didn’t anticipate, the alien way of understanding what it is to be human. And AI, at its best, is about giving us access to alien ways of thinking.

https://llamasandmystegosaurus.blogspot.de/2017/05/alpha.html?m=1






cosmic.txt

A generator of planets, a maker of universes. A generator by Ben Porter.

I like the asymmetric variation: there’s some planets that are small and barren:

While others are busy and bustling:

You can see the interactive version here: http://bp.io/galaxy/#

There’s also a Twitter bot version, which is where I first spotted it: https://twitter.com/cosmic_txt









Vulgãr

Perhaps you need a constructed language, but don’t want to build one from scratch. Vulgãr is a complete language generator.

While the conlang community produces a lot of software tools to make the process easier, most are built around the idea that the user wants the participate heavily in the process. Vulgãr is aimed more for the people who want a constructed language without doing the heavy lifting themselves. So it features things like creating derived words and introducing semantic overlaps based on real-world language data.

It’s a very slick product, starting from basic phonemes and building words and grammars. I especially like the way it develops homonyms and overlapping senses. Real-world languages have a lot of relations between words that present in some languages but absent in others. The specific idioms of a language give it a flavor that’s hard to reproduce. By using the real-world data as a source, the generator can create new words that encompass meanings that make sense in context.

Consider extending that to other kinds of generators. Introducing asymmetry is a powerful design pattern. Breaking up the regularity of an orderly system with an unexpected shortcut can make the whole system more interesting. There’s precedence for this in art: Perec introduced deliberate flaws in the organization of one of his novels, for example. This becomes even more noticeable in something interactive, like a language or a game.

https://www.vulgarlang.com/