Caves of Qud

Learn how procedural generation can be used to create infinite maps, music, and worlds to explore.

Procedural generation, or procgen, is the art of of pseudo-randomly creating things from seeds — a unique number or phrase used as input to generate a unique result. With games, procgen is a huge range of techniques for doing everything from generating unique music to building dungeons to creating maps, calendars, and histories of entire civilizations in real time. The alternative is to create these things by hand, one at a time and ahead of time.

I think we’re entering an exciting age of procedural generation in games, with high profile successes like No Man’s Sky and the rise of procedurally generated levels in indie games. These games have exploded over the last ten years both due to huge improvements in the power of computers as well as the success of games like Spelunky and The Binding of Isaac.

But to find truly strange, interesting, and challenging uses of procgen we need to go to the original procgen-based genre: true rogue-like games.

Rogue-likes are named after the game Rogue, an adventure game that had some really influential features: permadeath – when a character died there was no restoring from a save or reusing that character – and the floors of the dungeon you’re exploring into are generated randomly.

Rogue-like games today have procedurally generated worlds and permadeath but there’s more to the genre; a sense of experimentation and emergent weirdness I find exciting. Caves of Qud is a sci-fi rogue-like game I think exemplifies this spirit. Qud takes place millions of years in the future, after so many civilizations have risen and fallen that humanity itself has evolved in a thousand different directions.

When I asked Jason Grinblat, who along with Brian Bucklew develops Caves of Qud, why he likes working in this genre he said:

Roguelikes invert the model of a lot of AAA games. They say, “hey, we’re going to deprioritize graphics and interfaces, but in return we’re going to put a lot of effort into simulating the systems that are inside. We’re going to represent a creature—say, a worm—visually as an ASCII character or a simple sprite, but we’re going to give it strong motivations (like ‘I need to eat’), we’re going to simulate an environment it can interact with (say, a cave system with an underground river), and we’re going to let the collision of those systems play out.” Then I, as the player, can watch the worm tunnel through the earth in order to get to the river to find food and follow it to my own adventure.

In Qud you explore a world made anew with each time you play through. Some things stay constant, like the tutorial village, but the placement of many things on the overworld map, the layout of dungeons and small areas, and even the history of the world are generated each time. I loved the way Jason describes their use of procgen:

There’s a bunch of handwritten lore, a main quest, and a number of main locations that stay the same every game, although small pieces of even those are proceduralized. Then, there’s a bunch of generated content woven around that foundation. I like to think of it as a generative family of vines crawling up a stable iron trellis. The two-sided effect of this is that all the procedural content has a rich, characterful context to be read against, and the static content is kept fresh by new contrasts with the dynamic.

We’ve talked a bit about why procgen in games and rogue-like games are cool but how do you get started?

Well as we’ve alluded to procgen isn’t one technique but a thousand. There are some great resources for learning about procgen. I really like Seeds, the magazines for the annual procgen gamejam. The developers of Qud also recommended starting with this blog post by Kate Compton.

And we’ll leave off with a bit of advice from Jason and Brian for budding rogue-like developers:

Roguelikes tend to attract solo developers, but consider finding collaborators to work with. Almost every project that makes it off the ground is a team effort. This can be hard to accept as a talented young person, and hey, yes, you’re smart! You have good ideas! But lots of people are smart, and lots of people have good ideas. The earlier you can start to foster creative relationships with others, the bigger leg up you’ll have. Doing creative work with other people is its own skill: you need patience, empathy, and humility, but those things will help put you in a position to make great games with other people, and they’ll make you a better developer.

Learn More

Kate Compton’s introduction to procgen

The pronoun generator mod in Qud that’s being used to prototype the final version

The roguelike dev reddit

Seeds magazine

A talk Jason Grinblat gave on text generation in Qud

Also In The December 2019 Issue

30+ ideas for STEAM-theme gifts for kids of all ages!

Visual storytelling apps are a great way for kids to document and explore their lives.

Meet 16-year old Astronaut StarBright, whose activism is inspiring the next generation of STEM fans.

Dive into the first “console wars” and learn how more bits led to bigger and better games.

From the start of computing history, people have tried to optimize the software programming process. This includes having two coders work together to code software.

Explore the solar system and test your knowledge of space through this fun coding activity.

Learn how procedural generation can be used to create infinite maps, music, and worlds to explore.

The Wayback Machine lets you travel back in time to see old websites. Plus the Internet Archive has thousands of vintage games, software, books, and more.

Online research skills are critical for software programmers. It's how you learn any language, by searching for error messages and looking up reference material.

How rural America connected itself to the phone grid using barbed wire, glass bottles, and even corncobs!

Meet Cozmo, the clever new robot that’s bringing AI concepts to life for kids as young as 5-7 years old.

Throw some festive ornaments on a virtual Christmas Tree in this fun introduction to functional programming.

How the Internet of Things could improve education, from VR to accessibility to facial recognition.

No one wants to deal with viruses over the holidays. Here’s how to protect your new devices!

Some digital tools to help you create your own unique, ever-changing symphony with nothing but some code and a computer!

Take a peek into the importance — and the struggle — of getting truly random data.

Interesting stories about computer science, software programming, and technology for December 2019.

Links from the bottom of all the December 2019 articles, collected in one place for you to print, share, or bookmark.