Covering Holes

This weekend I worked on the new region generation algorithm. I started by cleaning up the old algorithm and disabling most of the code I rushed in during the last steps of the last release to try to handle the inclusion of rivers. Just for reference, here's a screenshot of regions generated by the 0.3.3 algorithm:

As you can see, the algorithm generates many medium-to-small regions that tend to have many small once-celled holes within them. I made an attempt to cover those holes but the detection logic wasn't very good. Here's a screenshot of the algorithm once I removed the not-so-good hole detection algorithm:

In this case, I also removed the range and altitude limitation algorithms that I added to prevent regions from becoming too big (I'll rework those back in later). So now you see many huge broccoli-like regions. 

After that, I implemented a more robust hole-covering algorithm that identifies areas fully enclosed within a region. If those areas are small enough, the algorithm will merge them into the region, resulting in something like this:

As you can see, there are still many holes that fall in between regions, which make region borders very jagged. Also, there are quite a few regions that seem to consist of two or more blobs joined together by single-celled strings. My goal next week will involve smoothing out the edges and splitting apart regions joined by strings. I'll also start working on a subdivision algorithm that hopefully will let me break large regions into smaller subregions that a single tribe can occupy...

Get Worlds - History Simulator

Download NowName your own price

Leave a comment

Log in with to leave a comment.