Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9627) PATCH: correct some parameters in map generator

[Freeciv-Dev] (PR#9627) PATCH: correct some parameters in map generator

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9627) PATCH: correct some parameters in map generator and clean-up
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Tue, 10 Aug 2004 02:07:31 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: >

part 1 of patch
There are a big bug (not fatal one) in freeciv there is
the arguments:
map.forestsize,  map.swampsize, map.mountains, map.deserts,
map.grasssize are normaliced in  adjust_terrain_param as its was %
values but the code for generator 1 and 5 not use its as %

map.mountains are used as a permille of mapsize (or someting like it)

map.swampsize, map.deserts are used as a number, map.forestsize like %
and  map.grasssize is simply any else. This patch basically correct it

now all these parameters are % of the landmass. we can call it weights,
this will corrected by adjust_terrain_param to be exact %.

map.grasssize count (1/2 grass 1/2 plains) as in the pass
make_plains, andle plains and tundra in cold zones.

the i need adjust default value to get ok maps in gen 1,5

About gen 2-4, this use these values as % i think but coders was tuned
it in a bizzare way to get ok map with the bad values need by gen 1,5, 
then map.swampsize, map.deserts, map.forestsize are
not exact we can expect, this has to be corrected too but i not touch it.

part 2 of patch,
 im my older patch creating map_temperature i introduce a split of map
in climatic zones, now i create Maros to define easlly these climatic
zone: polar, temperate, dry tropical and wet tropical. this change
noting exept clarity of the code

this will be interesting latter to convert this to parameters or change
dinamically for nuclear winter but there are simply a stetic clenp-up now

3th Part of the patch

make mountains is rename as make_relief and kip doing it, making
mountains and hills.

near any else make_someting create only single tile or a cluster of some
terrains and are called by make_terrains, this allow these function to
exprime itself.

Imagine you want place cercles and squres at a 50% rate. if you place
first all squares randomly then there are no more room to place complete
circles and your make_cercles function never can be tuned to do a
cercle. the best way is to set one cercle one square and then the second
ones. this way you can spend time to create good make_circle and
make_squares function in find complete and partials circles and squares
in the map.

This is done in this patch, all terrain types are created this way.


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