Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9787) RFC: generalized terrain
Home

[Freeciv-Dev] (PR#9787) RFC: generalized terrain

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9787) RFC: generalized terrain
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Tue, 24 Aug 2004 03:05:21 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [jdorje - Mar. Aoû. 24 03:31:26 2004]:
> 
> This idea has been discussed in other tickets.  The idea is to remove 
> the hard-coding of terrain types from the code.  The terrain types then 
> come entirely from the ruleset.
> 
> Most of the work is done.  Most of the rest of the work is easy.  This 
> patch does that.  This is a target patch, not a patch intended for 
> inclusion in CVS.
> 
> What remains is mapgen, which is hard.  Marcelo had some ideas about it 
> but I'm not sure I understand them.  Marcelo: how would your mapgen 
> ideas work with this patch?
> 
> jason
> 
This is the simplest way, but is absolutly posible. for generator is
very bad, this need some things

the generator parameters has to change

map.landmasspercent ok


map.relief_factor (not percent, this will depend of terrains in ruleset!)
map.wetness_factor (for land terrians) 

for temperature the maps is split in zones (as in may patch ;-) ) then
this as to be set by users, 
map.pole_max_level (poles bigin in 0)
map.tropical_min/max_level (basicaly a wet tropical zone)
any else is temperate

map.dry_min/max_level (this is the dry zone, where dessert are placed,
and can ovelap others ones)

a all temperate map as no tropical and dry zones, or else no pole ones.


generator need some info in ruleset
relief = (one of) flat/medium/abrupt
wetness = oceanic OR (a list of) dry, medium, wet
clima = (a list of) cold, temperate, tropical

the minimum set of terrains as to be 

[neutral plains]
relief = flat
wetness = dry, medium, wet
clima = cold, temperate, tropical

[neutral_hill]
relief = medium
wetness = dry, medium, wet
clima = cold, temperate, tropical

[neutral_sea]
relief = flat/medium
wetness =  oceanic
clima = cold, temperate, tropical

[neutral_ocean]
relief = medium
wetness = oceanic
clima = cold, temperate, tropical

with these info i can rewrite the generators

NOTE T_UNKNOWN is to unknown tiles not for all T_ANY is for it:

  @@ -89,7 +89,7 @@
   Tech_Type_id cond_adv;          /* A_NONE = unconditional; A_LAST = never */
   enum effect_type cond_eff;      /* EFT_LAST = unconditional */
   Unit_Class_id aff_unit;         /* UCL_LAST = all */
-  enum tile_terrain_type aff_terr; /* T_UNKNOWN = all; T_LAST = none */
+  Terrain_type_id aff_terr; /* T_UNKNOWN = all; T_NONE = none */
   enum tile_special_type aff_spec; /* S_* bit mask of specials affected */
 };


Marcelo 





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