On Tue, 4 Dec 2012 05:03:17 PM Michael Vehrs wrote:
> I think it would be a good idea to split the MapGenerator into several
> components. I think the map import code liberally sprinkled here and
> there should be combined into a MapLoader able to load various layers of
> a map from another game. In the future, someone might write other
> MapLoaders able to load layers of a map from an image, or from an
> original Colonization file (or possibly from a savegame of the remake),
> or from some future format. And I think the generator itself should be
> split into a number of different MapLayerGenerators, one or several for
> each layer of the map. At some point in the future, we might have
> several implementations of MapLayerGenerators for the same layer, and
> make them selectable.

I can see that being useful.

> Map regions present a problem, however. Should we add another map layer
> for regions, and a corresponding region layer generator? Or should the
> generating of regions be handled by the Map itself? The terrain
> generator contains code for generating regions in case the imported map
> lacks them. Is this compatibility code?

IIRC when I last hacked on map generation the regions were at least partially 
to guide the placement of native settlements (see IndianNationType.regions).  
I can not comment on why that is so, ``It was like that when I got here''.  I 
think I did write some code to make sure regions exist in imported maps, but 
the details escape me. 

Regions may be helpful for native settlement placement, but I do not think 
they are necessary for that purpose.   Moving regions into their own 
independent layer would be a cleaner design.  It is certainly code that could 
do with some review, as ISTM we generate a few too many small regions for no 
good reason.

Cheers,
Mike Pope

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to