Introducing Generate Worlds for Procedural Generation without Code
The infinite procedurally generated worlds of games like Minecraft and Dwarf Fortress create a sense of exploration and variety that entirely hand-built game worlds cannot compete with. However, designing and coding the algorithms to actually perform this generation is a specialized technical skill few possess. At the same time, numerous online communities exist around mapping, painting, and otherwise imagining fantasy environments, and some great products exist to help them do it, like Wonderdraft for drawing fantasy maps. But something is missing: I want to experience these worlds from the inside, and drawing tools don’t let me do it.
My desire to design and explore fantasy landscapes inspired me to build the procedurally generated island worlds of Brimming Sea in 2014. It was a difficult technical task, but imagining and then walking around these islands was magical. Since then, I’ve created several tools to help me design infinite procedural worlds without writing any code, and I’m finally happy enough with one of those tools to release it. I’m calling it Generate Worlds, and it’s available on the itch.io store.
The video above shows Generate Worlds in action building a landscape and dungeon environment. The video below briefly describes Generate Worlds. Read on for the details.
Generate Worlds with Rules instead of Code
The key idea behind Generate Worlds is that instead of writing code that describes how to build the world, you simply create a set of rules about how you want the world to work and Generate Worlds puts it together for you. Let’s start with a simple example.
Imagine we want to create a simple dungeon world containing hallways and rectangular rooms. We will make the world by assembling these six passageway and room pieces:
I’ll now add a series of rules to put these pieces together into a coherent dungeon, starting with an unstrucutred world made of those pieces but without any rules about how to put them together:
We now have a reasonable looking, simple dungeon layout. To recap, the rules are simply
- Passageways can connect to other passageways.
- All floor space must be enclosed by walls.
- Passageways can connect to doors.
3D Tiles Instead of English Rules
Creating these rules is easy compared to writing a dungeon generation algorithm, but it’s hard to convert an english statement like “Passageways can connect to other passageways” to a world, so I’ll instead rely on a 3D visual language. This language consists of voxel tiles that the user provides. These tiles are simple .vox files that a user creates in some voxel editing software and loads into Generate Worlds. Imagine we want to create a world with walled cities and countryside. Here’s what the tiles for that world might look like:
The world should have the following properties:
- Rivers and roads have no dead ends
- Roads can cross rivers over a bridge
- Roads can cross into cities through a gate
- Walls separate the outside grassy countryside from town interiors
- Grassy areas can contain huts and trees
To enforce these all these rules, Generate Worlds does only one simple thing: it ensures that two tiles are only placed next to each other in the world if the tiles are the same color in all the places where they touch, as in the example below.
In the figure above, we can arrange these two tiles in this way because the tiles’ colors match where they touch.
Placing several tiles looks like this:
These tiles are easy to create in a voxel editor like MagicaVoxel. The tile set above is simply a directory of .vox files that Generate Worlds takes as input.
Generating a Dungeon
Let’s try a more sophisticated world: a 3D dungeon that extends endlessly in all directions. We can simply provide Generate Worlds with a new tile set of dungeon parts. Nine of those tiles are shown below. They contain pieces of passageways, rooms, stairs, columns, arcades, and doorways.
Putting them together in 3D looks like this:
Loading these .vox files into Generate Worlds, I can explore this dungeon world in first-person. Generate Worlds lets you set lighting conditions, and place lights.
Conclusion
My goal is to build a creative tool that isn’t quite like anything already in existence. Minecraft lets you modify worlds block by block and explore them, but it doesn’t let you redefine how the world is created in the first place, limiting the scope of what you can build. Mapping and drawing tools help you imagine and design worlds, but don’t let you explore them. Finally, coding your own algorithms gives you huge flexibility, but at the cost of much higher difficulty. And for what it’s worth, the worlds I’ve made in Generate Worlds are more varied and compelling than what I’ve been able to create by hand-building procedural generation algorithms in the past.
If you want to explore this creative avenue, consider supporting this effort by purchasing Generate Worlds. A tutorial is available to get you started. If you have any issues using it, you can contact me at ijdykeman@gmail.com .