Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2000:
[Freeciv-Dev] Mapgen river generator
Home

[Freeciv-Dev] Mapgen river generator

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik Sigra <freeciv@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Mapgen river generator
From: Thue <thue@xxxxxxx>
Date: Sun, 8 Oct 2000 22:11:47 +0200
Reply-to: thue@xxxxxxx

On Fri, 15 Sep 2000 19:50:08 Erik Sigra wrote:
> Gerhard Killesreiter wrote:
> > BTW: Freeciv seems to not compile with -lm by default. At least I get
> > a fatal problem when using Eriks river patch. Not on Linux, however.
> 
> Here is a new version of the river patch. It does no longer need lm. It is
also slightly less ugly and the formula for desirable_riverlength is tuned.
> 
> Remember that you can see a lot of debug information during the river
generation process if you run the civserver with '-d 3'.
> 
> > Cheers,
> >         Gerhard
> 
> Erik Sigra

Here is your patch somewhat mangled:
-spelling errors corrected (would you beleive that of me :))
-all log calls changed to LOG_DEBUG level; they are not really relevant unless
you debug the code
-note that "a + pow(2, i)" is the same as "a | (1 << i)", so the pow stuff is
really not needed. Anyway, I changed it to just be an array of integers of 
lenght
4, much nicer to work with.
-I think I corrected an error or two in checks for being on a pole
-generalized the code somewhat; it will now work for a flat map; a few issues
for isometric map
-Your test functions tested 4 tiles each; I changed them to check once and then
be called 4 times. Less code => less errors.

Possible improvements:
-Maybe all the non-fatal functions should be evaluated on a tile, and let the
attractiveness of the tile be a weighted sum.
-It could make small changes the terrain when painting rivers, as fx a river
going through a desert creating grassland.
-Allowing bigger intersections of rivers and then converting them to an lake.

(but let us apply the patch as it is now first.)

-Thue

Attachment: rivers_7.diff
Description: Binary data


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