Online Classes

ProcJAM and NaNoGenMo are right around the corner! If you’re looking for some ideas for your projects, there are a couple of online classes starting soon that you might want to check out. They’re not exclusively about procedural generation, but the topics line up really well with ProcJam and NaNoGenMo.

The Principles of Modern Game AI is a twelve-week pay-what-you-want course for technically-oriented developers. Week #2 has a procedural Minecraft exercise for lab work.

Electronic Literature is a free online edX course from Davidson College, covering both the historical and contemporary works of electronic literature. It’s much less technical than the Game AI course, and sounds like it’s going to be an interesting look at the possibilities of e-lit.








Galactic Arms Race (2010)

A game that is also a research project into better procedural generation, Galactic Arms Race is based on the research of the Evolutionary Complexity (EPlex) Research Group at the University of Central Florida.

The game is a space shooter with particle weapons. Each weapon is generated by an evolving system that tracks the player’s use of the weapons and uses that as part of its fitness function for the NeuroEvolution of Augmenting Topologies algorithm that creates the weapons.

The advantage of evolving weapons this way is that, since they take into account how useful the player found their ancestors, the newly spawned weapons are much more likely to be usable. Moreover, they’re likely to fit the style of play that you prefer. This is a way of narrowing down the infinite possibilities into something more meaningful and manageable.

Where this really gets interesting is that the game has a PvP mode. Rather than having the designers handle multiplayer balance, the players evolve their own weapons, searching out the niches that will give them the advantage. Techniques like this can potentially go a long way to keeping a long-running multiplayer game viable. New strategies can evolve in multiplayer to match the new weapons, keeping the balance of power dynamic and always fresh. Since the new content is the weapons plus the ways that the players use them, this keeps things much more interesting than either aspect would be on its own.

http://gar.eecs.ucf.edu/




More Unpredictable Stuff

Michael Cook, creator of the game-designing AI Angelina and founder of PROCJAM, has been thinking about uniqueness. Procedural generation can create unimaginably vast amounts of things, but are those things unique?

He summaries the most common vision of procedural generation–“More Unpredictable Stuff” and discusses how both what we hate and what we love about procedural generation is summed up this way.

This strikes me as an important conversation to have, particularly given the number of major upcoming games that use procedural generation. When you have a generator that can produce unpredictable stuff, what are its limits? Can you measure interesting uniqueness, and how does that differ from unpredictability? Should you make your game infinite, or should you deliberately limit its scope? Can you think of uses for procedural generation that go beyond “more unpredictable stuff”?

You can read Michael Cook’s article on the Games by Angelina blog here: http://www.gamesbyangelina.org/2015/10/more-unpredictable-stuff/






Flora and Fauna

Flora and Fauna shares some conceptual similarities with Hannah and the Twelve-Disk Tower of Hanoi. The core narrative structure is based on solving a puzzle–a maze in this case–and translating the moves into narrative form. 

The labyrinth is a bit less literal than Hannah’s puzzle, however. While the first person protagonist is trying to escape, the pathfinding exploration is much less rigid than Hannah’s puzzle solving. Additionally, another layer is added to the narrative with the addition of plants and animals that the protagonist encounters along the way. Who, naturally, talk to each other.

While no one is likely to accuse Flora and Fauna of being great literature, I do think it’s ideas can serve as inspiration for other, more sophisticated approaches to translating non-narrative systems into plot structures for generated fiction. 

http://amarriner.github.io/Journey/




Extra Credits talks about procedural generation, including the pros and cons.

While this is a good introduction to the topic, the main reason I wanted to highlight this here is the way they delve into the reasons why you might not want to use procedural generation.

I’m all in favor of more procedural generation, but–as Dan Cook has said–procedural generation doesn’t solve every problem. Sometimes it’s better to use other methods to get the results you want. Sometimes you want a fixed star to steer by, and sometimes the effort at producing a generative solution is greater than the value of the results. Knowing when and where to not use procedural generation is an important part of learning how to use procedural generation.

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




Framing

Here’s an essay by Michael Cook, talking about the importance of framing.

Framing is a Computational Creativity technique where the computer explains what decisions it made to try to convince the viewer that it did something intelligent.

There’s a related concept in game AI, where enemy characters will talk loudly to explain what they’re doing. One example is the way that F.E.A.R.’s squad AI used voice to communicate to the player what was going on under the hood.

Framing that explains things that are otherwise not obvious to an observer is a useful tool to avoid what Noah Wardrip-Fruin calls the “Tale-Spin Effect”, where all of the complex machinery under the hood is completely invisible to the player.

Using framing to give your generative processes context, and adding cues to hint at why it made certain decisions, will go a long way on making your results more interesting to the people observing them. 







Data Generation

This week, Patreon had a data breech. Hopefully this won’t harm the crowd-patronage of the artists and creators too severely; the funding model has been doing great things for the creative community and letting people have a steady income producing things that are hard to monetize in the 21st century internet.

Where my interest comes in, though, is that this problem could have been avoided if they had used procedural generation. This isn’t my crazy idea: this is the recommendation from security expert Troy Hunt, who runs “have i been pwned?” a website that gives users a reliable and trustworthy way to discover if their information was stolen in a particular hack.

Based on what we know so far, it looks like Patreon was apparently using the actual data from their site on their test server. Having a lot of data that looks like your real data is vital for testing how software is going to behave under load conditions, but using the real data is a bad idea.

The answer? Generate fake data!

Some developers write scripts themselves to create fake data, while others use products like SQL Data Generator. Using procedurally generated data means there’s no privacy or security risk if the information is stolen, and it allows the developers to test how the system will behave with millions of users before they need to do it for real.

Though I usually focus on the artistic uses of procedural generation, there are also practical applications, like this one. And there are probably many more uses that are yet to be discovered.

(If you suspect your account might have been involved in a hacked data breech, I recommended checking out https://haveibeenpwned.com/ It is safe to use, as it only stores user names and email addresses, not passwords or other data.)






A Procedurally Generated Wilderness (In Text)

Over at Sibyl Moon Games there’s great write-up about a method of generating a text adventure wilderness map. While the project in question is written in Inform 7, the logic is widely applicable. And not just to maps: this is a useful example of one way to approach generating textual descriptions for any procedurally generated thing.

It also give a look at using procedural generation in an accessible way, since Inform-based interactive fiction, like most text adventures, are accessible to blind players. While many of the most obvious uses of procedural generation are highly visual, there’s a much wider applicability. NaNoGenMo, coming up in a couple of months, is another example of mostly textual output, but that’s only scratching the patina of the vessel of possibilities.

http://www.sibylmoon.com/a-procedurally-generated-wilderness/









Procedural Generation in the Elite Series

There’s a reason why the Elite series has been a central part of the procedural generation conversation. Not just because they were early examples of its application, but because their popularity meant that people studied how they worked in great detail.

Ian Bell released the source code for the original Elite on his website (which I suspect greatly helped the game’s visibility outside of Europe). So we know exactly how Elite generated its galaxy–including its names, economies, and descriptions–which has contributed to many other procedural generators.

The Frontier Elites use a more complex generator, and studying the techniques used is illustrative of how procedural generators have developed. Where the Elite galaxy map was generated all at once, the Frontier galaxy is divided into sectors, each of which is generated from a seed and the density information from the master galaxy map texture. Sectorizing generation like this is useful if you want to extend a generator indefinitely.

The system generation in Frontier works statistically: given a random seed, it rolls metaphorical die on a number of tables, picking numbers that are within the bounds of probability. This is a common approach: Elite uses something similar for picking government types and economies, and here it’s extended to the physical characteristics of the star systems, starting with the chances for each type of star.

image

A few star systems are predefined, overriding part or all of the generator. This includes Earth, of course, but also the many real-world stars included in the game. Combining scripted data with procedural generation is another useful technique to remember: it’s okay if some things aren’t procedural.

The planet generator is nested within the system generator. And within that there are calls to generate stations, spaceports, and other details. Nesting generators like this is, of course, another useful technique, chaining the output of one system into the input of another.

The name generator is another significant legacy of Elite: constructing sounds from pairs of characters in a Markov-like fashion, it influenced other generators. The Frontier games extend this to naming planets and starports, using tables of name-parts similar to the functionality of the “goat soup” string that described each planet in the original Elite.

Another technical detail is the way numbers are stored. While not technically a generative problem, people do occasionally want to procedurally generate things on vastly differing scales. They inevitably run into floating point issues, because the typical way to store numbers for computation work by throwing away precision, which can easily lead to your trees drifting randomly off of your planets. The Frontier games use a custom-coded scaled word variable; today there are a number of techniques to address this so long as you are aware that it’s an issue that needs to be solved.

image

Statistical generation has been a common approach since at least the early days of D&D random tables, but it isn’t the only possible method. And, indeed, the fourth Elite game, Elite: Dangerous, has introduced a completely different approach to star system generation, which we’ll discuss in due course.

A detailed discussion of some of the underlying Frontier algorithms: http://www.jongware.com/galaxy1.html




OpenProcessing.org

Processing is a great programming environment for artists. It lets you get right to the actual output that you want to work with without having to muck around with technical stuff, but also lets you control everything directly and in great detail. There are lots of procedural generation projects that have used Processing, and it’s also really handy for building prototypes.

Another reason why Processing is so useful is that its focus on spreading visual and software literacy has lead to a widespread open source community that shares techniques and code liberally.

OpenProcessing.org is just one of the places where you can find other people’s projects and look at how they work. It’s a great learning resource and a good place to check out new techniques. There are classes, both online and offline, which use the site, some of which are specifically focused on generative art. Or you can just browse the projects and get inspired. 

(Be sure to credit your inspirations! Not only are the artworks licensed under CC BY-SA and GPLv2, but it’s respectful to let people know that you were influenced by them.)

While the new security restrictions on Java mean that some older sketches no longer work in the browser, they can all still be downloaded and run in Processing directly. Newer sketches can use Processing.js to output Javascript code instead of Java applets.

https://processing.org/

http://www.openprocessing.org/