Algorithm Help

BlitzMax Forums/BlitzMax Programming/Algorithm Help

Hey all,

I'm doing random worldmap generation right now, and am looking for a good algorithm to use as a starting point to solve the problem of creating provinces on the map. Here's what I've got.

- a 2d array of map squares
- each square knows its own height (the whole map was seeded heights by mid-point displacement - thanks impixi & the other contributors to that code)
- a semi-random selection of squares that are also province capitals

What I'd like to do is have each province capital spread outwards from itself "claiming" land, having its eventual outward movement limited by the advance of neighboring provinces. I'd also like the ability to make it more difficult to spread from one geographic zone to another - i.e., it's a lot harder to take over the mountain squares from the grasslands than it is to just spread out in the grasslands.

Thanks for any help you can lend.