Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12906) RFC: rethinking "celebration" city growth
Home

[Freeciv-Dev] Re: (PR#12906) RFC: rethinking "celebration" city growth

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: saywhat@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12906) RFC: rethinking "celebration" city growth
From: "Peter Schaefer" <peter.schaefer@xxxxxxxxx>
Date: Wed, 27 Apr 2005 08:41:19 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12906 >

That is a very cool idea, I think.
I like simulations.

I would propose slightly other "rules" though.

On 4/27/05, (Eddie Anderson) <saywhat@xxxxxxxxxxxx> wrote:
> 
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12906 >
> 
>     Since there has recently been some discussion about celebration
> growth (in relation to effects code), it might be a good time to
> present this idea for consideration.  Here goes:
> ...
>     IMO, the problems with celebration growth are:
>  ...
> 3) Because of the number of years per game turn, it is unrealistic
>    after 1000AD (where are these additional people coming from when
>    game turns are only 10 years long (or less)?).

Not really, I just did a quick calculation in my head, and assuming
people make a kid every of 22 years in a 42 year lifespan, the growth
rate achieved would be 25% per year max, so this method could make a
size four city grow one citizen per year. Or not, since freeciv
citizens represent the square root of the population, reflecting the
increasing size of the food box. so 4 to 5 would mean (25-16)/16 = 56%
growth rate, which under my model could be achieved in two years.

However, as Per pointed out, increased health should lead to longer
lifespan which leads to less kids, as well as a safer life.

I think if you have built 200 cities, you will want more than one city to grow.

>     To address these problems, the idea that I've been toying with
> is changing the "celebration growth" mechanism.  The idea is this:
> Make celebration growth a zero sum operation within each empire.
> I.e. if one of your cities grows by one size point (e.g. from 3 to
> 4), then another of cities will lose one size point (e.g. from 3 to
> 2).

Well, as you may be aware, there was a feature in Sid Meiers Civ1 that
an unhappy city with not much income would revolt and join your
empire. This is an ideal opportunity to implement a similar feature:
Simply make the "happyiness growth"/"migration" algorithm work across
nations.

Because implementing it 100% accurately would invariably involve
either sorting or weighting, I'll just try to describe an algorithm
that uses randomness and is faster:

//---------------------------
- determine the number of migrations, by multiplying a float factor(a
game option) with the total number of citizens in the world, adding a
random number between .000 and .999, and rounding down

- if there are zero migrations, we are done

- build a list of cities eligible for migrating to: cities which have
50% happy citizens and are at least size 4, and no unhappy
- build a list of cities eligible for emigrating from: maybe 
                all cities with a least one unhappy citizen 
        AND     a high percentage of corruption, lets say corruption/trade >25%

- repeat the following until the number of successful migrations is
reached, or the number of tries exceeds 100
  - choose a random city for migrating to
  - choose a random city for emigrating from
  - determine whether migrating between these is allowed, 
                e.g. both cities are on the same continent 
          OR    one of the players has an embassy with the other
     if yes, we have a succesful migration, adjust both cities and
output a message.
//---------------------------

Thats it. You could complicate it by giving preference to the worst
and the best cities, but it would be slower.

>     You're probably thinking, "Then why bother celebrating?".
> Because some cities benefit more from growth than others.  And if
> all cities can't grow equally (and magically) then you might want to
> concentrate the growth in cities where it will do the most good.

Well it takes very long for a big city to grow, due to the foodbox,
and not very long for the small city, so that would be reason enough,
even if migration takes place only within a nation.

:-)





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