Interesting Procedural Generation

Been thinking about procedural generation lately, especially in a paper-and-pencil context. What are some good attempts at procedurally generating game stuff? What do they do well, or poorly? What are some best practices we can glean?

Defining Procedural Generation

Let’s get the annoying definition out of the way. What’s procedural generation? It’s helpful if we break it down. A procedure is an algorithm or sequence of steps which we can use to solve a problem or arrive at some result. So, something procedural is something that uses such a procedure in order to arrive at something. Our particular use case is procedural generation, which means that we’re using a procedure or algorithm to generate some kind of content.

In the realm of computer games, we use procedural generation to create maps, images, or AI behavior programmatically. Take Minecraft as an example: starting from a randomly-determined or user-set “seed” (a long number or string used to generate pseudorandom data), the game creates a new world with certain elevations, biomes, and structures. Every single seed results in a unique world, but, if you were to use the same seed, you would end up with the same world. Therefore, although though the seed itself might be random, the generative process itself is deterministic.

Minecraft is just one example of procedural generation. Some games have multiple random factors or “seeds” at different points of the process. However, the important part is that the generation is procedural: it is performed step by step, each one building on top of one another in order to result in a product that is cohesive (and, hopefully, interesting) according to the rules as defined by the programmer.

Traveller: A Classic Example

The old sci-fi role-playing game is full of interesting procedural generation, for creating characters via lifepath as well as generating worlds. I’m going to talk about the latter, since I have a handy generator for it on my blog. There are many steps to generating a world system in Traveller, each one being informed by previous steps. The result is that worlds generated are pretty self-consistent on average, while maintaining a degree of randomness due to 2d6 rolls each step along the way.

My friend Emmy Verte has reproduced the procedure in toto on her blog, but below is a summary:

  1. Roll 2d6 to determine [starport].
  2. Roll 2d6 for [size].
  3. Roll 2d6 + [size] – 7 for [atmosphere].
  4. Roll 2d6 + [atmosphere] – 7 for [hydrosphere].
  5. Roll 2d6 – 2 for [population].
  6. Roll 2d6 + [population] – 7 for [government].
  7. Roll 2d6 + [government] – 7 for [law].
  8. Roll d6 + various modifiers for [technology].

There are really only three independent variables here: [starport], [size], and [population]. The remaining variables are all variations on previously determined variables: for example, [size] determines [atmosphere] and then [atmosphere] determines [hydrosphere]. In fact, 2d6 – 7 is the same thing as d6 – d6, so we can define [atmosphere] as [size] plus and minus one die. This means that [atmosphere] on average is very close to the roll for [size], most of the time only varying by plus or minus ~2.4 pips. In short, the planets generated by this method are done so predictably but not deterministically.

By the end of the process, you will end up with a string of hexadecimal (base-16) digits, each one representing one dice roll made throughout the course of the world generation procedure. For example, the string AAAAAAA means that at each step of the process, you rolled a 10 (which is represented as A in hexadecimal form). Each digit in the string has also already been modified by previous steps, so it’s impossible to have a string like A2C1847 since C (12 in hexadecimal) cannot follow 2 (if you had a size of 2, the maximum possible atmosphere is 7). All this means is that you can use the string to refer to all the tables you had rolled on.

I really like this procedural generation method. It’s not too complicated, and the results of dice rolls are generally consistent and cohesive with each other without being overdetermined. It’s helpful and informative that steps inform subsequent steps. I think this even helps the user consider how the ecology (?) or society of the world functions, since each component is not isolated but is connected with other components. I also like that the generation is only for the high-level, sciencey aspects of the world so that you can decide how best to interpret the numbers.

Night Tripper: A Fine Example

Night Tripper is sort of a simplification or modernization of Traveller, and it also has its own world generation procedure—for which I also have an online generator! There are just four steps, each one having its own d6 roll which is modified by the result of the previous step(s)—oh, cool, I didn’t see it was last updated March 2023. Need to update my thing lol.

  1. Roll d6 for [habitability], and determine any flaws. Worlds with 1-2 [habitability] have 3 flaws, those with 3-4 have 2 flaws, and those with 5-6 have no flaws.
  2. Roll d6 for [population]. Subtract 1 if [habitability] is from 1-2, or add 1 if it is from 5-6.
  3. Roll d6 for [authority]. Subtract 1 if [population] is from 1-2, or add 1 if it is from 5-6.
  4. Roll d6 for [government].
  5. Roll d6 for [technology]. Subtract 1 if [population] is from 1-2, or add 1 if it is from 5-6; do the same for [authority]. Also add 1 if [population] exceeds [habitability].

This is very much a simplified version of the Traveller world generation procedure, allowing you to only roll five dice for five main steps. I miss the granularity of 2d6, however, since that gives greater variability at each step; in comparison, Night Tripper worlds feel less variable overall while also feeling more random at each step since d6 by itself has a flat distribution with fewer possible results.

Originally, I was going to say that I didn’t care for a world details table I thought it had, something like a d3 table for each level of [habitability]; the details then were too specific, not feeling like a world generated from scratch but an existing world discovered except without the benefits of having a d66 table of fleshed-out, individual planets. This seems to have been replaced with the new flaws determination, where you roll d6 for the category of flaw (e.g. hydrography, atmosphere, temperature, gravity) and d6 again for a specific one. This is more interesting than the original method, and allows a cohesive vision of the world to emerge organically rather than for there to just be like 18 preset but undeveloped worlds.

I think I still prefer Traveller for being just 2d6 down the line without having any conditional subroutines, but Night Tripper is a well thought-out alternative that maintains procedurality (that is, an algorithmic approach) in its method. Steps still inform and build on top of each other; there is still predictability it without being overly deterministic.

Bastionland: Hmmmmm

We’ve made it this far because I just want to explain why the universal hex profile and universal borough profile by Chris M of Bastionland kinda feel like pet peeves to me, though this is not like a hit against him (Mythic Bastionland is really neat). For both, you roll 5d6 and drop the highest so that you have four dice left. Then you read the dice in order. The result is a hex you can plop down onto your world, as well as a little code to symbolize the hex (similar to but unlike the codes you get in Traveller—put a pin in it).

Below are the four hex attributes:

  1. Topography
  2. Wetness
  3. Ecology
  4. Infrastructure

And below are the four borough attributes:

  1. Climb (difficulty to traverse surrounding area)
  2. Code (difficulty to navigate without a guide)
  3. Crush (density of population and structures)
  4. Crap (how dirty the place is)

My first peeve is that the attributes are arbitrary with respect to each other. Earlier results do not feed into later results. This would not be difficult to account for; for example, mountains tend to be wetter than (surrounding) flat areas because they catch rain, so topography could feed into wetness. You’d also think that wetness would certainly influence ecology (since plants and animals need water), and ecology would influence human settlement (since humans don’t tend to live in arid environments without other forms of life, unless they developed alternate means of subsistence—which is an interesting result to occur, but one that should stand out as an emergent exception).

My second peeve—which is not really with the algorithm itself—is that half of the hex code digits are letters:

  1. 1, representing a trace
  2. 2, representing some
  3. 3, representing lots
  4. N, standing for ‘null’
  5. H, standing for ‘hazardous’
  6. S, standing for ‘super’

The idea is that those upper three are supposed to be less common than the lower three, so they have special outcomes. However, picking the lowest four out of five dice only brings the average total down by 2 pips, or a difference of 0.5 on each attribute. So, ultimately, each attribute is a d6 table modified only slightly. It would be more intuitive, then, if we just used the actual indices on d6 rather than turning half of them into letters when even the numeric ones still don’t correspond to actual quantities. At least in Traveller, representing quantities 10+ as letters served an actual function of representing them as single digits via hexadecimal. Still, this point is really just a peeve with with the representation of the method, not with the method itself.

My overall discontent is that although it’s presented as a simplification of what Traveller does in its world generation procedure, in intent and form, it does not have the same effect. It does not guide you through generating a thing step by step, each one feeding into another; it’s just a set of four d6 tables with an extra step to try to lower the individual die rolls. It’s not that there isn’t ever a use for independent tables—like of course they’re useful!—but it’s just not the same use case.

Conclusion

Interesting procedural generation does well to consider how its constituent parts relate to and inform each other. It should be predictable with respect to those relationships while retaining an element of surprise, leaving room for emergent exceptions which beckon explanation and tease our imagination. I think that Traveller is still the gold standard for tabletop procedural generation, for how straightforward (2d6 rolled seven times in sequence) yet in-depth it is.

Comments

  1. I consider procedural generation axiomatic to the hewcrawling sandbox. When I made Into the Unknown for old school play, I made sure to include procedural generation for all the major things that come up, including but not limited to:

    * Building dungeons (basically lifted from B/X)
    * Building encounters on the fly (including their relationships with adjacent random encounters)
    * Reactions & Morale
    * Treasure (including procedurally creating new magic items)
    * Events as time progresses in all phases of play (dungeon, wilderness, town, downtime)

    Much of the prep time for a sandbox is really just to create (or lift from elsewhere) good tables for more procedural generation in play.

    "A dungeon stocked by rolling sometimes tells you what it wants to become, instead of what you had in mind. A monster reacting unexpectedly demands its own will.
    Tables let you make free use of imagination in world building. You seed your setting with all the cool things you would want people to encounter in your game; and then watch it take on its own life with a roll of the dice. It will be born of your vision and creativity, but you get to explore how it unfolds alongside the players.
    It allows the GM to have an experience similar to the players of exploring an independent world; whilst giving players a sense they are not just seeing the hand of the GM, but a world on its own terms."

    ReplyDelete
    Replies
    1. that sounds really fun!! totally agree that having tools for those things is so useful and, of course, conductive to sandbox play; i don't like how people so often talk about sandbox like it's about exploring the referee's world, when i feel like the referee should at most be an intermediary.

      Delete
  2. Nice post. I hadn't previously considered the significance of having some parts of the procedure inform other parts, and on reflection this is often what leads me to feel like the result of a set of rolls need to be tweaked somehow.

    There's a lot I like about Kevin Crawford's setting generation tables, so now I'm thinking about whether there's a lightweight way to add this kind of interconnectedness after the fact.

    ReplyDelete
    Replies
    1. thank you! and i've heard a lot of good things about crawford's tables, though haven't read them myself; it would be really neat to incorporate some sequential logic into them :D

      Delete
  3. Love this, Marcia! And you are spot on about Night Tripper. I agree that the subtables for world type basically sucked haha.

    Relating to another reply of yours about the referees world versus an intermediated world, I have been wrestling a lot with productized hex crawls and megadungeons. I'm convinced the idea of a "megadungeon" as a thing made entirely ahead of time, especially in an expensive book, actually undermines the form. Something complete and static is very hard to also make emergent and reactive in play. A hex crawl in a book becomes a series of nodes of "content" and actually less of a sandbox.

    ReplyDelete
    Replies
    1. hey chris, thank you so much for your reply!! :)

      i totally agree about megadungeons. before published modules were so much the norm, it seems like so much of one's referee experience was drawing up your own vast dungeon and adding onto it or changing it as it was explored.

      i remember how my dad talked about D&D and, even more than how old-school adherents talk about it, he made it sound very much like an improvisational board game. he was usually a player, but being the referee one time meant drawing his own dungeon with its own tricks and puzzles. the game space being a personal thing, meant for a specific audience, seems important to me (and it's part of why i personally don't care about if people publish adventures or not; i don't because anything i do is specifically aimed towards the people i'm playing with, but what matters to me between sessions/campaigns is techniques of space design or play).

      Delete

Post a Comment

Popular posts from this blog

Plagiarism in Unconquered (2022)

OSR Rules Families

Bite-Sized Dungeons