Interview with Amit Patel of Red Blob Games
Creator Interview Procgen Interview Map Gen Interview

Interview with Amit Patel of Red Blob Games

Duncan Thomson
In card games like Magic The Gathering, players spend some of their time building their decks and some of their time playing their decks. I think the same is true for skills and projects. I've been spending the past few months learning math and algorithms by using them in tiny "game jam" sized projects.
All about procedural generators and tools with Amit Patel.

Q&A with Amit Patel of Red Blog Games

How did you get into creating procedural generators?
Inspired by the Mississippi River floods of 1993, I made a game about environmental and economic simulation. I used procedural generation to build the maps for SimBlob.
Its procedural generator was heavily based on water simulation including rainfall and erosion. I read geology and hydrology books and got it to produce realistic effects like volcanism, river meanders, and dam sedimentation.
SimBlob was a fun project, and ignited my interests in the main topics people know me for (A* pathfinding, hexagonal maps, procedural map generators).
What are the most painful lessons you've learnt from using procedural generators?
I started working on SimBlob in 1994. I looked up years later and realized I spent all my time playing with generators and simulators and never finished the game. I just kept putting things in hoping that it would would work, but I never knew whether it was what I wanted, because I didn't know what I wanted.
After that project I decided that I should be careful about procedural map generation. I gave myself a rule: either I should have a specific goal in mind, or I should have a time limit.
The process-driven approach (which PCG Wiki calls "teleological") is fun to play with.
When it works, it's great! It produces neat things you'd never expect, like Dwarf Fortress cats getting drunk. But it often doesn't work without a lot of tuning and tweaking.
And even then, it might produce bad output.
I saw a talk by Galaxy Kate Compton about Spore's planet generators. Looking at the generator itself, it looked great! There was lots of procedural variety. But from the player perspective, it occasionally produced planets that led to a bad experience.
That led me to rethink how I approach procedural generation, and that led to mapgen2.
What procedural tools are you most proud of creating and why?
I'm most proud of mapgen2 from 2010.
  1. I spent a lot of time trying to figure out rivers. I had learned from the SimBlob project that rivers and streams are key to understanding landscapes. With the usual terrain generation systems, rivers are an afterthought. I wanted to put in rivers from the beginning. This led me to developing my own algorithms on a Voronoi graph instead of using Perlin/Simplex noise like everyone normally does.
  2. We launched the alpha testing of the game with a placeholder map. We learned what parts of the map worked and didn't work, figured out what we needed, and then built a procedural map generator. I think this worked much better than if we had written the procedural generator from the beginning. The maps were designed to fit the gameplay.
  3. I wrote an article that explained all the techniques I used. This inspired many people to play with procedural generation on a Delaunay+Voronoi structure. I think this had more impact than the generator itself.
Nine years later, I wrote mapgen4 with different goals. I was inspired by hand-drawn maps and wanted to make a map painter where the output looked like hand-drawn maps. The big challenges there were:
  1. making the algorithms fast, with complete simulation of evaporation, wind, rainfall, and river flow from scratch every time you painted on the screen (30-60 times per second)
  2. making the output look like hand-drawn maps even though it's a 3d world; this required using custom lighting, an unusual projection matrix, and a post-processing step
I haven't yet written an article explaining how it all works.
What is the most fun thing about creating procedural tools?I usually find it fun to explore the boundaries of a specific technique and then share what I've learned. I'm especially interested in the structure underneath content. Examples: hexagonal maps, square tiles on a sphere, percolation structures, voronoi on a sphere, representation of conveyor belts, grid edge coordinates. Although I do enjoy seeing people use the tools I make, I think of these tools as an example of what could be made. I enjoy it even more when other people are inspired to make their own tools based on what I've shared.

There's a great Roguelike Celebration talk by Alexei Pepers about different types of people using procedural generation, comparing them to Dungeons & Dragons magic-using classes. It explores motivations: is it fun to learn and master the rules, to get weird output, to make tools that others can use, to guide others, etc.
This was eye-opening, as I hadn't really thought about it before. One of the weaknesses to my approach is that I focus on everything I can do with the specific technique I want to share, but a generator is often much more interesting if it's using many unrelated techniques. For example, Azgaar's fantasy map generator uses a mix of different terrain, name, religion, and other generators.
Where do you see procedural generation heading in the next few years?
Some previously neglected approaches like neural networks, example-based systems, constraint solvers, and texture synthesis might get more attention thanks to high profile projects like GPT-2 and WaveFunctionCollapse.
I'm also hoping to see more collaborative efforts where humans and algorithms work together to make things. Overall though, I don't expect any major changes in the next few years.
What is the most interesting generator or tool you've seen?
Dwarf Fortress continues to be fascinating, not only the parts I've played so far, but also the planned modules that Tarn has talked about.
I like Caves of Qud for approaching things in the opposite direction, building just enough to make the player think there's a coherent world history, even though the history wasn't simulated.
I also like Brogue's map designs. These three are examples of games where the procedural generators serve the game experience but aren't something that make sense on their own.
Ultima Ratio Regum is out of this world. I've only read about it; I haven't tried it myself.
As far as standalone tools, I continue to be impressed by how much Azgaar has done with the Fantasy Map Generator, and I'm also keeping an eye on WonderDraft and Deios.
I love the extensive research on Scott Turner's blog, For H in Hexes blog, and Undiscovered Worlds blog, but I think those tools aren't available yet.
What are your next big projects (generators or otherwise) that you can talk about?
I don't have a big project right now.
In card games like Magic The Gathering, players spend some of their time building their decks and some of their time playing their decks. I think the same is true for skills and projects.
I've been spending the past few months learning math and algorithms by using them in tiny "game jam" sized projects. These experiments give me knowledge and tools that I can use to make new projects. For example, in roughly 25 small experiments I learned things that eventually led to mapgen4. I'm hoping the things I learn now will lead to a future cool project.
At some point I'd like to look into Munkres-Kuhn for NPC job assignment simulation, blue noise points for procedural object placement, negative binomials for understanding loot drops, and differential heuristics for optimizing pathfinding. I also want to write a reference page about coordinate transforms (scrolling, zooming, rotating, isometric, etc.) and a reference page for working with Delaunay+Voronoi procedurally generated maps.
Where can people find you on social media?
I'm @redblobgames on Twitter , redblobgames#8559 on Discord, and /u/redblobgames on Reddit. I don't expect any social media site to be around in ten years, and I want my content to be around thirty years from now, so I put my content on redblobgames.com, have a blog (with Atom/RSS) at simblob.blogspot.com, and can be emailed at redblobgames@gmail.com.
Is there anything else you would like to talk about?
My recommendations to people making procedural generators:
  1. Make some output by hand first before writing code. This will give you a sense of what you want and don't want.
  2. If part of a game, consider writing other parts of the game with the hand-made content before writing the generator.
  3. Think about what you want to happen every time, what you want to never happen, and what you want to vary.
  4. Write about the process! Writing helps you think through things.
Making procedural generators is a lot of fun. I recommend it!

More Interviews...

You can find more more Creator Interviews on Rand Roll. I'm also on instagram as rpg_generators. And you can always use gold coins on Coffee.