The Saturday Paper: Minecraft and Monet

2013-04-19_19.52.42

Procedural content generation is a popular piece of technology, to say the least. From Minecraft’s rolling hills to Dwarf Fortress’ intricate world histories, we love games that can generate parts of themselves each time we play them. But other than tweaking the sea level in Civilization V, we don’t tend to think of content generators as things that can change much. What kind of Spelunky levels would Minecraft’s worldgen make? Do Dwarf Fortress’ histories share a literary style? This week The Saturday Paper is about generating the content generators – and the world of possibilities that opens up beyond.

We’re reading A Procedural Procedural Level Generator Generator, a paper by Manuel Kerssemakers, Jeppe Tuxen, Julian Togelius and Georgios Yannakakis. In it, they describe a system they built for interactively designing level generators for Infinite Super Mario Bros. – and it offers up some interesting insights and ideas about how we use content generation in the games we make today. Users of the tool can view level generators abstractly, look at them in detail, see sample levels, and combine generators they like to make new ones – similar to the way the evolutionary system we saw two weeks ago worked. The authors very kindly uploaded the tool for us (more on that later), which you can download here.

Screen Shot 2013-04-22 at 16.33.35

How do you ‘look’ at a level generator, though? The image above shows how – the tool generates lots of levels from a single generator, and then lays them on top of each other, averaging out all the colours representing each type of tile. It’s surprisingly effective – you can see generators that repeat particular patterns (such as rising and falling sections of blocks) as well as see which level generators are more chaotic, or that feature lots of detail at different parts of a level.

If you select one of these level generators, you can see a generated level in more detail – even playing one out yourself to see what kind of output it provides. You can also select two generators to combine together, to try and mix features that you like into a single generator. To understand why this works, and how these weird patterns you can see in the image above come out, let’s look at how these level generators are described.

Screen Shot 2013-04-22 at 16.41.26

The procedural procedural tool uses agents to generate their levels. Each agent is like a robot with a particular set of instructions attached to it. Before generation, the level is a blank white canvas, and the agents are set out at different times to lay tiles into the level – in this case, things like coins, platforms or breakable blocks. The agents have lots of parameters that describe their behaviour, such as how often they act on the level, an area they randomly spawn in, how they move across the level, and what tiles they drop[1]. With just a dozen or so of these agents you can describe a wide variety of level generators.

When you choose two level generators you’d like to see combined, the tool chooses a random grab of agents from each generator, and combines them into a new one. The different rules will all interact in different ways (some of the agent rules also allow them to react to tile placement, offering up even more interesting combinations). You can then view these new generators in the composite view we looked at above, drill down and play levels from each one, or go on to combine them further if you see something you like.

Screen Shot 2013-04-22 at 17.07.29

Sample levels from a single generator – you can see similar patterns or themes in placement.

The tool has some mixed but undoubtedly interesting results. Some generators show great diversity, while others produce variations on the same level over and over (both of which I can see being useful for different types of game). What’s encouraging about the tool is that it’s fast and robust –  it can generate an average-sized playable level in an impressively nippy 1/20 of a second, and using Robin Baumgarten’s Infinite Mario AI it can test the initial set of level generators to ensure they tend to generate playable levels. This means that the tool is in excellent shape for further development to explore other genres, or look at different ways of representing level generators.

What’s most interesting to me is this little quote in the evaluation section:

…[some generators] generate levels that look completely different from each other in the game view, while retaining a common “theme” or “style”.

 ‘Theme’ and ‘Style’ are not words you associate with procedural content generators very often, but I think it should be. Instead of thinking of Minecraft’s world generator as the only possible generator that could appear in such a game, we should think of it as just one possibility in a huge space of generators. There are generators that favour dramatic mountain ridges, ones that place villages in valley passes, and run rivers through deserts. This research helps us think of generators as things that we might also one day generate – perhaps automatically, even.

This is something I hope we can explore more in the research world, but it also has a place in game development too. Can my dungeon generator have a personality? Could Dwarf Fortress’ world generator develop a taste for romantic subterfuge one day, and shift to preferring political intrigue the next? This paper is an excellent example of how to build simple abstractions of content generators, and explore a whole new exciting space through this.

At the start, I also mentioned the idea of Minecraft’s world generator making levels for Spelunky. The authors of the paper talk at the end about their hope to build a generic level generator generator – one that could create level generators for roguelikes as well as for platformers, simply by a designer sitting down and selecting the right combinations  of generator until something they like comes out. The idea of generalising content generation across games and genres really appeals to me, too. Of course, this all requires people to spend the time generalising their games so that they share common inputs or interfaces, something that many developers can’t afford to do. Perhaps the research in this paper will lead to some Tiled-esque middleware that might take care of this for them, though. I certainly hope so.

Screen Shot 2013-04-22 at 16.22.33

Where To Find More

The paper is freely available on Julian Togelius’s site here. The authors are all very approachable too, and I’ve met a few of them in person too. Manuel is currently part of Abbey Games, who are developing the exciting-looking Reus, but plans to return to finish his Masters’ degree after release in May. Jeppe is currently hard at work at ITU Copenhagen on his project “A Framework for Real-time Collaborative Game Design in Digital Environments“, where he’s working on tools that let designers sketch games out while the player is playtesting them. Julian is heading up games research at ITU Copenhagen, and Georgios recently moved to the Institute of Digital Games at the University of Malta.

All are very enthusiastic about their work and I highly recommend getting in touch with them to learn more about the work and its current status. We’ll also have comment threads on Reddit’s /r/gamedev and Gamasutra’s blog section too – I’ll link them here once they’re online. The authors of the paper may be popping into those threads to answer questions and discuss the work, so be sure to join in if you want to chat!

Aside from reading the paper, you can also interact with the tool itself! The authors have very kindly packaged up the tool and uploaded it to coincide with The Saturday Paper – the first time it’s been made available to the public. I’m incredibly grateful for this, and I know many of you will be excited to take a look. Download it here. It has some GUI issues on some Macs, but Windows users should be just fine.

As ever, don’t forget to let me know what you thought of the column this week. Let me know by emailing me – mike@gamesbyangelina.org – or getting in touch @mtrc on Twitter. Thanks for reading!

  1. [1] If you want to see a complete description of the agents, there’s a very clear breakdown in the paper itself.

10 comments

  1. togelius

    This is a very nice writeup of and discussion about our paper! Somewhat predictably, I agree that this is an interesting line of research and that being able to create level generators that can create content across game genres and represent different styles would be extremely useful.

  2. Andrew Doull

    My experiences with Unangband is that I was able to support a few fixed generators for what I called the ‘architecture’ of the game: basically the way rooms and corridors were laid out (wide corridors & few large rooms, narrow corridors & small rooms, pillared corridors and rooms, cave-like corridors and CA rooms, random polygonal rooms and corridors that were not constrained in the cardinal directions), and then many more generators for the content of the game which built up an ecology using a ‘fake foodweb’ of related monsters, but also themed the contents of rooms and placement of interesting terrain in corridors based on the top predator in the ecology.

    With roguelikes you’re going to have the same issue I did, in that the base unit of level layout (room + corridor) is a lot less atomic than platformers (the platform), and the way these units can be combined is much more restricted. Having said that, Brogue does a great job of placing these together in a much more compact level size than I did, so it may be possible to evolve generators that are much smarter than than approach I took.

    • Mike

      Interesting stuff! I like the question of doing this for roguelikes, because they do a good job already of conveying setting through tile placement (whereas platformers tend to rely more on the graphical tileset I think). I’m thinking of the cavelike levels versus the more regular mine/dungeon layout, etc.

      The ecology thing is interesting too. Perhaps this is something that could be done post-generation of the maps, as with the constraint satisfaction stuff by Leif Fogel et al?

  3. Pingback: The Sunday Papers | Rock, Paper, Shotgun
  4. Darren Grey

    Great article – I love how you take the somewhat dry academic paper and put it into much more accessible language. Regarding the personality of a level generator, have you read this article: http://www.gamesofgrey.com/blog/?p=236

    I made a generator a while back for Toby the Trapper that changes just a couple of variables to give different styles of levels, with different associated gameplay challenges. My level builders in Unstoppable also are quite fun for this, as the level is built by around 60 agents moving around the level and changing wall/floor placement based on the current theme (which can change at any time). This is just very basic pottering about though – there’s a hell of a lot more depth one can go into. I’m still waiting for a game that embraces procedural content as an active part of its gameplay – levels shifting as you move to present different challenges based on how you play.

    Looking forward to the next Saturday Paper :)

  5. Pingback: The Saturday Paper – A World Just For You | Games By Angelina
  6. Pingback: The Saturday Paper – That, But Bigger | Games By Angelina
  7. Pingback: The Saturday Papers: Dream Design | Games By Angelina

Leave a Reply