itch.io is community of indie game creators and players

Devlogs

Improving Region Borders

Worlds - History Simulator
A downloadable game for Windows and macOS

This weekend I continued working on the region border generation algorithm, and I managed to get it to a decent state. For reference, here's an image from the previous weekend showing how things where left of:

And here's where things are now:

Some of the things I did to get here where:

  • Soften area border expansion: Cells aren't just added if they have the correct biome, they can also be added, or rejected, if the neighborhood cells have the correct biome.
  • Micro-area inclusion: If an area bordering a region is too small to become a region of its own, then it will be added to the bordering region. This takes care of very small areas that fall between two or more different regions.

I also made improvements to border detection in general to make it faster and more consistent. Though there are still some quirks in the algorithm that produce weird border artifacts... The algorithm could still be improved in multiple ways, but I think I reached the point of diminishing returns. Too much effort for little gain. So it's time to move to the next step and start working on sub-region generation. Which will help me break up the larger regions into chunks that can be occupied by single tribes and can be defined as migration targets.

Download Worlds - History Simulator
Read comments (2)