Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8624) New clima function to best handle terrain place,
Home

[Freeciv-Dev] (PR#8624) New clima function to best handle terrain place,

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#8624) New clima function to best handle terrain place, used to place poles.
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 6 May 2004 10:28:55 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8624 >

> [mburda - Fri Apr 30 10:11:06 2004]:

> This is a full tuning patch for pole based in a new function map_clima
> this function return a number form 0 (coolest) to 100. alowing to select
> terrains types from clima.
> I use it to fix the poles placing problems. now poles are good placed in
> all 4 topologies (in torus this is more nice if x-y ratio is 1-1 or (2-1
> iso) but this is a problem of the choice of sizes.

The concept is good.  But again we're going to need some tuning.

We can't go adding "natural" conversions all over the place.  We need
some new macros in map.h: map_to_ntl_pos, ntl_to_map_pos, ntl_width,
ntl_height.  Perhaps a do_in_ntl_pos() macro.  (In principle these can
be used for the overview changes as well, but it's hard to see how.) 
These should probably be added to map.h in a separate patch.

near_singularity() shouldn't use the hard-coded city iteration.  Use
is_valid_city_coords, or a city iterator, or just use circle_iterate.  

In fact clean_singularities isn't good since it's very inefficient.  But
I guess doing it differently means topology code.

Also clean_singularities must not hard-coded arctic, and shouldn't
hard-code ocean.  I guess we can use a new terrain flag here (given to
arctic and ocean).  Consider when we have multiple types of ocean: only
deep ocean should be found near the singularities.

I don't like how assign_poles_numbers() hard-codes knowledge of the
climate areas.

Also I suspect the separatepoles option is broken (in the current code
and in your patch).  IMO this option should just be removed.  A new
option should be added in its place: a boolean controlling whether the
map has climate differences at all (and hence, whether it has poles). 
If this value is FALSE, map_clima should always return a temperate (or
pseudo-random) value.

There may be more problems but that's all I see right now.

jason



[Prev in Thread] Current Thread [Next in Thread]