Cyclic Dungeon Generation 

This article by Joris Dormans on a better way to approach dungeon generation popped up on my radar recently, and for good reason: if you’re designing any kind of level or dungeon generator, you need to read it.

The basic idea is that instead of generating one path between nodes, it generates two of them, forming a cyclic loop. This lets the game reason about the cycles as a unit, so the generator can apply design patterns that exploit the topology. For example, it’s easier to design a lock-and-key level pattern this way. Not to mention that reducing backtracking from dead ends is often more enjoyable for the player.

Using larger conceptual ideas in generating something is a very useful pattern across all kinds of procedural generation. Not only does it guarantee a useful topology, but it lets you treat the pattern as a unit. Instead of having to detect abstract concepts, which is easy for humans and hard for computers, start from the abstract concept, so the computer has a better handle on the invisible systems behind the generation.

For example, a terrain generator that uses Voronoi cells as its primitive structure lets the generator use that to create a more coherent landscape. Or a village generator that starts from relationships between the inhabitants rather than the placement of the buildings. 

Can you think of other patterns that could work this way? Or ways that you can use the cyclical loop design?




Procedurally generated fireworks!

Fireworks are pretty easy to implement with particle systems. The fun comes in tweaking them as you explore which variables look good.

Here’s some Processing sketches of fireworks:
http://www.openprocessing.org/sketch/17259
http://cs.brynmawr.edu/gxk2013/examples/arrayList/fireworks/




Sonancia 

Sonanica is an ongoing research project to procedurally generate levels and soundscapes for horror games. 

Phil Lopes, Antonios Liapis, and Georgios N. Yannakakis have been gradually expanding its capabilities, creating a system with the ability to frame tension with an input curve and create a scary soundscape for the generated level

There’s a playable demo of their output so far, and you can help them with their horror sound research.

(via https://www.youtube.com/watch?v=WHMJYQ6anZw)




rnn-writer

I am writing this post with the help of an artificial intelligence, that it seemed to be as a part of the meaning of the solution.

The AI is trained on pulp science fiction texts, and some of the stories we can’t make it in the end. As you can see, it’s intended for fiction writing prompts more than for informational blog posts. So let’s write a story:

Marie scowled at the row of glitched houses as she complained loudly about what had been done to her idea. “I suppose the artificial intelligence readers thought would be worth while displaying them. The baseline human audience means nothing to you. I can see that the controls are all plainly spiteful, and that the anger is impossible.”

If the docent could sigh, it might have. It was popularly believed to not experience emotions, but somehow it could be permitted. “The result is intended for both humans and machines,” it said, the expression on a silent smile. “If you breathe up my mind, we’ll propped you a drink.”

The irritated curator imbibed the offered nanite cloud, but she tried to control her breath and went back to the little house. She didn’t see the point of having it, or any of the others: “I don’t know what the rest of you are about.”

The docent spoke to her mind: “In the accumulating precautions of the Machine this marriage is more useful to you, as quickly as possible. We set up the process since I got out.”

She said absently, “Drink, won’t you?”

The docent materialized alcohol. “A trick of hydraulic speed. It should have provided the constancy of a tape that I have read in detail.”

She drank, and it was something she was thinking. “Well, I didn’t know anything about the computer control.” It had brought Marie to a single system of countless activities. What a valid thing to do, she thought. She did not understand much. But she had not changed.

“I do not know,” she said.

“After all, you are a true human, and I am not alone,” the docent said. “What is this stuff you can do? If it’s there, they must have come from the construction of the concept. Your concept, my arrangement. It was the problem of my presence and it was a good idea.”

“Yes, yes. Well, it’s something else. I don’t think that’s why I hope to discover what you’re doing. And you have to have a defense.”

“I don’t think so. Do you know what the machine says? What would they call the same thing we were trying to do? Creativity. You don’t need to explain it, for that matter – that’s the reason! I don’t know what I’m thinking about. What are you thinking? Can you reconstruct all your thoughts? Do you need to?”

“No,” called the girl. “I can understand why you can’t do that.”

The docent might have laughed, if it could have. “I think I know that this is something comparable to your acceptance. There is another problem which you overwhelmed by our study which you have put in the power of your subconscious.” It retreated, reabsorbing itself into her mind as she breathed it in.

Half of those are my words and half the machine’s words.

The machine in question is Robin Sloan’s rnn-writer, which is explained in this blog post. It uses 150MB of pulp sci-fi data to generate sci-fi-ish suggestions for what words to write next.

Some other gems to spark your story-ideas:

“We don’t know how to sleep,” said Paker in with a look of modern pain.

“I’ll tell you,” said Wormser, “they won’t be able to be warm and they’ll all be a little different.

He gazed at explosions, shifted his limbs and scrambled toward the inner locker door, closing the lock.

"You don’t understand,” said the colonel, “and I don’t think you’d better stay alive.”

"I think I’d like to know,” Zen explained to himself.









Metaphor Magnet

Do you feel satisfied and impressed by original creativity? I quite often feel challenged by fascinating creativity. That said, creativity puzzles me.

Those aren’t my words: I got them from Metaphor Magnet, a project from the Creative Language System Group. Metaphor Magnet’s API powers part of the MetaphorIsMyBusiness bot, but you can also interact with it directly.

In addition to finding new metaphors based on the ones you search for, it also can suggest feelings about something, like the ones I used to start off this post, or compose poetry on the paradox of creativity:

The original challenge of this creativity

Fascinate me with your enigmatic challenge

By logicians is creativity identified, and the logics of this creativity do these logicians study

No bore is more maddening, or struggles so much

Perplex me with your incomprehensible mystery

Let your incredible impact amaze me

Does any paradox madden more incredibly than this creativity?

How you fascinate me, like any inexplicably inconsistent paradox

Is any paradox more incredibly questionable than this creativity?

See how you amaze me with your impossible puzzles

Just as the most shocking terrorists exhibit the most disturbing hostility, the most shocking paradoxes are built on the most disturbing contradictions

Even if you were a boring lecturer wouldn’t you want to lecture to this class of intriguing paradoxes?

O Creativity, you haunt me with your stark madness

You can try it out for yourself at http://ngrams.ucd.ie/metaphor-magnet-acl/




Qualitative Procedural Content Generation

The seventh International Conference on Computational Creativity (ICCC 2016) is going on right now in Paris.

This talk, by Ultima Ratio Regum developer Mark Johnson, explores his approach to giving underlying meaning to each generated result. This includes how the languages in the game world are generated, the similes they use in conversation, names, insults, and sentence complexity.

The central idea is that the underlying systems, such as the national ideologies in the game, should be reflected in a visible, concrete way. The aesthetic style gives a unified feel to each nation and gives the player clues to how they interrelate.

(via https://www.youtube.com/watch?v=Mk-TmpSUb54)




MetaphorIsMyBusiness

The @MetaphorMagnet bot, run by the Creative Language System Group is one of the more sophisticated bots using Twitter. It uses a large variety of techniques that revolve around metaphor generation and a Breaking-Bad-inspired character arc generator that writes transitions between character states.

The Creative Language System Group is part of the WHIM project. Their projects are good examples of computational creativity, which is a field dedicated to making computers creative or enhance human creativity.

The bot (and its associated back-end services) is very good at what it does. While a few of the things it suggest are banal or nonsensical, there’s a lot of compelling story-seeds in its feed. I’ve occasionally used some of its suggestions as inspiration for creative projects.

Part of what makes it so effective is that it combines a ton of different approaches, giving it a multitude of ways to explore its central themes.




Cliché Soup

A reader sent in this bot that they made. It takes a list of clichés, feeds it through a markov chain, and does an image search for the picture that best represents the brand new proverbial saying.

The creator mentioned in the message that one of the appeals was in not knowing what the bot will do next. I think that’s one of the pleasures of bot-making that I enjoy them most, when I get to be surprised by my own creations. 

That’s what’s fun about projects like this or Darius Kazemi’s Random Shopper. In a world that is increasingly optimized and efficiently-recommendation-searched into bland averages, breaking out of meaning-drained clichés can result in some striking juxtapositions. 

Of course, that can sometimes be dangerous too. If a bot does something illegal or immoral, who is responsible? Particularly if it happens in a way the creator never anticipated?

On a more positive note, an algorithm that deconstructs something, as this one does with clichés, can end up telling us something about the thing it’s deconstructing. The bot can only re-purpose the patterns it sees in the original phrases. The new generated phrases can hold our unexamined assumptions in front of us, like a fun-house mirror. (A very OuLiPoian concept.)






Process Compendium

Casey REAS is one of the two original creators of Processing. As such, he’s been pretty influential in the generative art space.

Process Compendium 2004-2010 is a catalog of generative artworks. Each piece, which Casey calls a “Process”, is a short description, in English, of a kinetic drawing machine. The implementation in software is up to the programmer’s interpretation. The history of the ongoing project is quite interesting, recounting a series of works that build up processes from basic forms, behaviors, and elements.

image
image

Here’s a video introduction to the Process works. If you want a step-by-step walkthrough of the project, this is probably the best place to get it.

You can read the catalog here: https://drive.google.com/file/d/0B9h469–G5OwOGVfVmUxZUQ5VzA/view






Building A Galaxy: Procedural Generation in No Man’s Sky

At the 2015 nucl.ai Conference, Innes McKendrick gave a presentation on the procedural generation in No Man’s Sky. It’s the most detailed technical breakdown I’ve seen of everything that has gone into the game.

By details I mean things like the what that the voxel regions on the planets are stored as octrees on cubes, but projected onto spheres, but the voxels are stored as flat arrays. 

image

There’s lot of stuff to learn from here, like how the art concepts interact with the design process, or the way that modular generators can be built up into a whole that’s more than the sum of its parts. They’ve built up a whole toolkit that they use to assemble complex, varied generators. There’s a lot to learn from here, even if you’re generators are less grandiose.

Just the texturing is pretty amazing: even recent open-world games have trouble getting large, open ground to look good from a distance and up close. And Hello Games has worked out techniques for applying triplanar textures to entire planets.

Regardless of how well the game itself does, we’re going to be studying its techniques for a long time to come.

The 2016 nucl.ai conference is July 18th to 20th 2016, in Vienna, Austria. There’s entire tracks dedicated to Procedural Content Generation, Generative Systems and Design. I will, naturally, be trying to keep a close eye on what they post online.