Map Generation in Factorio

I’ve been playing Factorio lately. At first I wasn’t planning on talking about it here because I wasn’t looking for procedural generation in it. I was playing because of the emergent system. At it’s heart it’s about building an immense Rube Goldberg supply chain, so the focus is on the emergence of the interacting mechanics. But it does have procedural-generated maps. And then I read one of the developers’ recent blog posts about it, and it crystallized something I’ve been thinking about lately.

While the maps in Factorio are generated, they’re currently pretty homogeneous: zoom out a bit and they start looking pretty samey. This is a problem shared by all noise-based generators–I’ve talked about it in relation to scale and biomes–and in Factorio it means that after a certain point the terrain mostly doesn’t matter. You stop treating the map like a place with possibilities and more like a liquid with some resources floating in it.

I’ve been thinking a lot about something Douglas Wilson recently highlighted from the Arcane Kids Manife$to: “the purpose of gameplay is to hide secrets”. The more I think about it, the more I agree with it.

It helps that the way I’ve framed it fits in with my existing views: that games are constructed out of gaps and clues (aporia) that you unfold with epiphanies. Chess and Go, in this view, are about ferreting out the secret implications that emerge from the rules interacting.

Factorio is similar to Chess in this regard: the long-term engagement loop is figuring out the secret configurations that invoke the magic. But along the way there is the technology research acting as a progression system, the creatures on the map fighting back, and the resources running out–which upsets your careful equilibrium.

But the map itself, as I said, fades into a brown bowl of oatmeal at larger scales. Once you’ve mastered the resources, there aren’t any landmarks. You’ll want to expand as you run out of resources, but there’s no particular reason to choose between going east or going west.

I’ve come to see all this interactive stuff and a continuous space that shares the same design problems: the complicity Alex Kennedy describes when talking about Sunless Sea is the same kind of problem Sidney Icarus is describing in tabletop roleplaying, or that occurs when reading a CYOA novel, researching a tech tree, or in exploring a map.

As such, your procedural map generator has to solve the same classes of problems as you might encounter when designing a Twine game. Sometimes you’ll want a Visual Novel that just moves from moment to moment, or a map generator that fades into the background so it supports other content: that’s a valid design choice. Other times you’ll want more consequence, which calls for more context.

What you definitely don’t want is a left-or-right choice with no sign-posts and no context.

Factorio’s current map is perfectly serviceable: it’s not interesting, above a certain scale, but the rest of the systems are fine picking up the slack. Your emergent constructions help by adding player-designed texture–though after a certain point you’ll also be automating that.

However, as the developers’ discuss in their post, adding landmarks, more biomes, and adding larger-scale structure to the map generator can help give different parts of the map their own unique character.

There are many different ways they could do this: a unique resource that acts as a reward, a goal or quest to fulfill, or a difficult terrain that adds new constraints on the way to somewhere else, or just a memorable landmark that makes that spot a bit different.

But the thing I keep coming back to is that this design problem in a map generator is the same one in designing a tech tree or writing an interactive story: our games need secrets to discover. They could be hidden in the mechanical emergence, slotted in as progression content, or even be embedded with literary techniques that need interpretation to tease out. But the purpose of gameplay is to hide secrets.

https://www.factorio.com/blog/post/fff-200