Menu

All posts in “stepping”

I had originally written an article on how to implement PHS here. Having found the maps generated slightly redundant I decided to take another look. Here are the steps taken to successfully generate a more realistic "town." It's essentially a drunken walker like Diffusion Limited Aggregation mixed with a hallway constraint that mimics the large part of PHS.

Start somewhere in the middle, add this and all possible directions up to a certain dynamic length (I used a standard deviation of 1.4 with a mean of 5, ) as nodes: [{x,y,direction},...].

For 7DRL this year I developed a new map generation algorithm called Pigeon Hole Stepping.

Fill the map with walls

This map generation algorithm relies on negative building techniques. This concept will make more sense as the later steps are explained.

Dig Hallways

Essentially, we can assume that hallways that are parallel to each other are at least the length of a single room and up to two rooms apart in distance. Because of this assumption, we can make a random walker that will move around with this restriction in mind until map is filled completely.

Allocate Rooms

The Other Experiment Studio Newsletter

Subscribe here to get our latest updates

About TOES

The Other Experiment Studio is all about understanding complexity by
breaking problems down into small and composable solutions. TOES focuses
primarily on video games or open source projects, but also assists others
in contract work in frontend web development ranging from complex WebGL to
single page applications or generic data visualization.