Decomposing a map
Posted: 09 Mar 2012, 16:43
So, i imagined myself a problem, that sounds this way:
"Given the following: heightmap, typemap, metal spots, create a voronoi-like diagram using spots for seeds, while trying to keep cells to equal area each, avoiding long-and-narrow cells, and aligning cell edges to obstacles such as cliffs or lava".
So far i've been thinking of using lua pathfinder calls for calculations of distance as a magic bullet for taking height/type into the equation, but i've no real idea on how to balance it out with the equal-area demand.
What i'm hoping to achieve with this is a map is divided into sectors, which can be 'conquered' by units and serve as the game's only (re)source of income, while reusing many of the existing maps made for other spring games.
(because the old approach i used - that's, just dropping a rectgrid on top of those maps - is just ugly, terribad, and doesn't respect the map in absolutely any way; and because i'm not that fond of an idea of making a lot of my own maps from scratch at least right now)
Any ideas/suggestions how i can do this? Is using pathfinder here a good idea or a hopelessly abusive fail?
"Given the following: heightmap, typemap, metal spots, create a voronoi-like diagram using spots for seeds, while trying to keep cells to equal area each, avoiding long-and-narrow cells, and aligning cell edges to obstacles such as cliffs or lava".
So far i've been thinking of using lua pathfinder calls for calculations of distance as a magic bullet for taking height/type into the equation, but i've no real idea on how to balance it out with the equal-area demand.
What i'm hoping to achieve with this is a map is divided into sectors, which can be 'conquered' by units and serve as the game's only (re)source of income, while reusing many of the existing maps made for other spring games.
(because the old approach i used - that's, just dropping a rectgrid on top of those maps - is just ugly, terribad, and doesn't respect the map in absolutely any way; and because i'm not that fond of an idea of making a lot of my own maps from scratch at least right now)
Any ideas/suggestions how i can do this? Is using pathfinder here a good idea or a hopelessly abusive fail?