This page explains the zones generation algorithem in my rmg


In my rmg zones are generated in similar way to the homm3 algorithem , It uses something called voronoi diagram , At first stage a constant number of points are set randomly and divide the map area :

img216.imageshack.us_img216_8784_zonesdemo1tz2.jpg

Pic Sample

From that starting point an algorithem that tries to put adjacent zones (based on connection definition) closer to each other and the 2 starting zones as far away as possible from each other.

Basically it picks the 2 farest zones and tries to fit them into the zone size ,If the zone is bigger then the zone size spacified in the template it needs to be shrinked ,there for another point will be added , spliting the zone , if its small then it adds a random adjacent zone . img361.imageshack.us_img361_2961_zonesdemo1xh1.jpg

Pic Sample

the next step adding a new point :

img361.imageshack.us_img361_9117_zonesdemo2oj3.jpg

Pic Sample

After this proccess is completed for all zones the final shape is achieved and map making proccess continues..

random_map_generator_by_idan/zones_generation.txt · Last modified: 2008/05/16 10:48 by nevermind
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0