Am Saturday 10 October 2009 09:54:26 schrieb Goswin von Brederlow:
> Matthias Pfafferodt <matthias.pfaffer...@mapfa.de> writes:
> > Am Thursday 08 October 2009 01:43:23 schrieb Goswin von Brederlow:
> >> On a related matter, how does migration work with the patch?
> >>
> >> The patch says the city radius is considered. Does the other city need
> >> to lie within the city raidus? Do the city radius of both cities need
> >> to overlap? Can there be a gap of <x> tiles between the city radii of
> >> both cities?
> >>
> >> I think the migration distance config option should select this, e.g.
> >>
> >> -99: city must lie within city radius
> >> -x: city radii must overlap
> >> 0: city radii must touch
> >> x: there may be x tiles between city radii
> >>
> >> I think a default of -1 would make sense.
> >
> > At the moment migration is defined by a migration distance (1 to 7). The
> > patch #1232 adds the possibility to set the migration distance to 0. In
> > this case, the migration distance depends on the city radius (migration
> > distance = city radius + 1; your case 0).
>
> I will definetly want to have more choices there.

The migration distance setting could also be defined as the value added to the 
current city radius. This would require a change of the current definition 
(name). Example:

city_radius_sq = 5 => city_radius = 2
mgr_dist = 2
max distance for migration (tiles) = 2 + 2 =4

city_radius_sq = 10 => city_radius = 3(.1) = 3
mgr_dist = 2
max distance for migration (tiles) = 3 + 2 =5

>
> > As for the migration one has to check all tiles within migration radius
> > of the receiving city for giver cities the radius should be as small as
> > possible.
>
> If checking the tiles is too expensive then cache the result:
>
> When creating a city check if it is within the migration radius of
> another city and link it into a migration list for that city. When
> the city radius of a city changes (and therefor migration radius) then
> scan the area once to rebuild the list.

This list has to be updated every time a city is created or destroyed. 
Furthermore it would spread the code needed for migration over a lot of 
files. At the moment it is mainly in one file.

>
> But is it too much work? If I understood migration right then it is
> done only once every 5 turns.

That's right. Migration is checked every fifth turn after a city was founded 
(default settings).

Does the variable city radii work for you?

Matthias

>
> MfG
>         Goswin
>
> _______________________________________________
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev



-- 
Matthias Pfafferodt - http://www.mapfa.de
Matthias.Pfafferodt <at> mapfa.de

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to