Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#9956) PATCH new rand_map_pos_condition tool for ma
Home

[Freeciv-Dev] Re: (PR#9956) PATCH new rand_map_pos_condition tool for ma

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#9956) PATCH new rand_map_pos_condition tool for mapgen code
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Mon, 6 Sep 2004 07:03:37 -0700
Reply-to: rt@xxxxxxxxxxx

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

Le lun 06/09/2004 à 13:15, Mateusz Stefek a écrit :
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9956 >
> 
> > [mburda - Sun Sep 05 18:16:19 2004]:
> > 
> > The rand_map_pos_temperature is rm and a new rand_map_pos_condition is
> > create
> > new code search randomly pos with some good defined conditions, no
> > numericals parameters!
> > 
> > the conditions are coded in a naive form, laters others patch will
> > modifi it.
> > 
> > there are from 3 types, temperature, wetness and miscelaneous, later a
> > condtions relief can be added
> > 
> > Some clean ups,indendts, assert and comments fix was included. specially
> > remove_placed_map was renamed destroy_placed_map. this is not related to
> > the rand_map_pos_condition code, but is ok i think.
> > 
> > Marcelo
> > 
> 
> First of all, the word "condition" is to general. I would expect that
> rand_map_pos_filtered() does the same thing as rand_map_pos_condition().
> 
mmm i will search in my dictionary :-)
> The second problem is speed. Conditions like:
> ((hmap((x), (y)) - hmap_shore_level) * 100 \
>             <2 * map.swampsize * (hmap_mountain_level -  hmap_shore_level))
this can be a problem for the miscelaneous conditions only, as CM_LOW
your choice if continue to be used later(not sure), for others this will
be fixed in news patches when tmap, wmap will really work
but i think i can really improve it.
anyway, i think speed is not the first problem for generators, we can
wait 30 second (today this is 10 seconds) to beging a game. specially if
player can choice the nation at some time of runing generator instead to
wait. (TO DO)
> can be evaluated million times. Why don't you use integers like
> min_height and max_height in rand_map_pos_condition? I know that you are
> trying to avoid using constants in generator, but in this case the
> integers can be evalauated by the callers of rand_map_pos_condition.
> 
> And some style issue:
> please write:
> if (x)
> not:
> if(x)
> --
> mateusz
thx, Marcelo
> 




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