Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: barbarians on the poles (PR#6183)
Home

[Freeciv-Dev] Re: barbarians on the poles (PR#6183)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: barbarians on the poles (PR#6183)
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Tue, 30 Sep 2003 02:28:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 29 Sep 2003, Jason Short wrote:

> Here's a full patch to fix this.
> 
> - A new function, rand_map_pos_filtered, is used.
> 
> - This function is used to find a _valid_ spot for barbarians.
> 
> - Barbarians are now summoned a fixed 1/10 of the time when 
> summon_barbarians() is called.
> 
> - Barbarians will never be summoned on arctic or tundra.
> 
> - If there are no valid positions for summoning, the server won't fail.
> 
> This does change the behavior.  Barbarian summoning is still random, but 
> with a different distribution.  In my tests the average # summoned was 
> about the same.
> 
> The only advantage of the new method is that it is robust.  If this is 
> not a concern we can use a much simpler fix (also attached).  Note that 
> we have the exact same dilemma in several other places, however.

I think it's a good solid design.  It can also be used in mapgen, but then 
the signature of the filter should be changed to, say, 
        filter(int, int, void *)
to be able to get more data.  This can be done when the mapgen starters 
patch gets updated though.

G.




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: barbarians on the poles (PR#6183), Gregory Berkolaiko <=