Connecting the dots

I often babble about interesting environments, unique creatures, interesting choices and how they hopefully would create an emergent gameplay and story. One related concept is how the story elements are used to tell the story: they should be specific enough, so that the story being told can be followed and interpreted. At the same time they should leave enough empty space for audience to fill in. Funny example about this is hair colour of Legolas in Lord of the Rings. The fact that it’s not explicitly stated in the book, yet fans have been debating it a lot, is significant enough that the wikipedia article mentions it.

I don’t like making analogies that much, especially when it comes to programming. At least the ones I’m making are usually either broken or bad (or both). This time I’m going to make an exception (so apologies in advance and proceed with caution).

Why did I name this entry as “Connecting the dots”? Reason is simple: I was recently playing with water colours and ended up with the picture below. Ended up describes the process pretty well, since when I started I didn’t have any idea what I was painting. I simply soaked the paper and then painted random blobs of colour there. Colours of course spread and mixed with each other, producing interesting shapes and colours. After colours had dried, I took some ink and started outlining shapes that were on the paper. I’m pretty sure that if I had a copy of the paper before I inked it, I could easily highlight different set of characters.

court of the sea

Court of the Sea

If the coloured paper is story elements that designer lays down, the inked pieces are the player’s interpretation of the story. They use the elements provided by the designer, but choose what parts are interesting and produce recognizable patterns and what parts are just background noise. Very loose layout might yield more varied pictures (not all of them would be coherent), while more detailed layout restricts imagination and more directly guides towards specific end result. Since loose layout can yield multiple different pictures more easily, it has certain reusability built into it. While pictures might be sort of samey, they still are different from each other. Eventually whole excercise gets boring and starts repeating same results (maybe mixed with each other, but same elements will resurface over and over again).

If static coloured paper is metaphora for traditional game with fixed story, ever changing coloured paper is metaphora for a procedurally generated one (like I said, I’m going to run this analogy to ground). Instead of having the same pattern every time, procedurally generated game (or coloured paper) will have different pattern. Again, the pattern can be as loose or as detailed as the designer wants it to be and it’s the player’s (or painter’s) task to fill in the details. Since the pattern is different every time, at least in theory there’s much more different game worlds (or coloured papers) available. In practice, since the coloured pattern is generated with the same method every time, the results will start repeating eventually. Worse is, that if the method is very poorly implemented, the pattern presented might repeat itself already on first time. Left side of the picture might be identical (or almost identical) to the right side. As a whole, the picture looks large, but upon closer inspection it’s only half the apparent size.

To make whole exercise more interesting, we could devise multiple methods of producing patterns. System would then pick up one of them and use it to produce a pattern when requested one. This would give more variation and it would also allow patterns to have a distinct, overall and consistent, theme. One pattern could be coloured blobs like the one shown above, while another pattern were black and white with more angular shapes. Very clever system could know how to combine these different pattern themes together and produce yet another pattern. And all this while producing somehow apparently coherent and consistent background.

So lets forget the coloured paper and inked sea creatures on it for a moment and talk about game and specifically stories they try to tell. Dwarf Fortress is a prime example of a game that produces a very detailed background information for the world. There’s a huge world with varied geological and botanical conditions, hundreds of years of history (most of what player most likely won’t ever read or see, but it’s all there) and so on. Player then occupies a tiny corner of this world and starts carving their place there. Interesting thing to ponder is, what kind of pattern does the game provide? It certainly is very intricate and filled in with details. And without doubt, it is also very large. But is it always different on a broad sense? Are there pieces that repeat time after time? Is game very different every time player plays it, or is it just the same?

Nethack is very well known example of game that generates part of the content procedurally. What kind of pattern does it produce? Greater layout of the dungeon is very fixed, with special levels appearing roughly at the same spots every time. Potions are always the same, they appearance just differs from game to game, forcing player to identify them somehow. Unlike Dwarf Fortress, Nethack doesn’t have any procedurally generated monsters (at least any that I’m aware of), so that’s another part of the pattern that repeats from game to game.

The original Elite had procedurally generated world that was always the same when game started. This was mainly done to conserve memory as the playing area was rather when compared to available memory. Thus, it’s an example of system that produces only one pattern (and rather repeating one even). A modern take to that same concept is No Man’s Sky that generates whole galaxy with unique planets and lets players to explore them and share what they find with each other.

All those three games (No Man’s Sky hasn’t been released yet and I’m not sure at all that my computer can even run it) can be considered as hallmarks of procedural generation and I have spent countless of hours playing each of them. No Man’s Sky looks extremely interesting and I’m sure it’ll attract devoted following once it launches. But to me it seems that all these games have one large pattern that is being varied. How would a game look if it could have completely different patterns and would it even be fun to play? Player wouldn’t know when starting if they’re going to play survival horror or dungeon hack. Or they wouldn’t know if some green, hulking creatures are friend or foe before approaching them. Or they wouldn’t even know if they’re going to play dungeon adventure or shop simulator before the game starts.

The pattern probably has to have some familiarity in it, allowing players to gather experience and learn about internal consistecy of the world. At the same time it needs to be different enough between play sessions that the players stay interested and are presented new challenges to overcome.

Did I miss something obvious? Or do you have an example of a game where procedural generation is done very well or that uses it for interesting effects? Do let me know in comments, I would be interested on hearing your take on the subject.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s