Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Calendars (Re: Re: A bunch of patches)
Home

[Freeciv-Dev] Re: Calendars (Re: Re: A bunch of patches)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andi payn <paynfc@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Calendars (Re: Re: A bunch of patches)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 11:25:57 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Jan 08, 2002 at 02:15:19AM +0000, andi payn wrote:
> I went ahead and implemented the calendar code as we discussed, and it
> works, but it's ugly in a few places.
> 
> The basic problem is that each age can have a different number of
> months per year, different days per month, etc. Calendar math becomes
> very complicated. Fortunately, we don't do much math other than
> incrementing by one turn and comparing two dates. The few places where
> we do anything more complicated (e.g., the spacerace) I found ways to
> fake it that work.

[ complicated stuff ]

Do you think this is really needed?

I would favor a simpler approach where a turn takes either n years or
1/m of a year. Reasonable values for m are 2, 4 and 12. So given that
the server does all the calculations the client will get a packet
which says "current year is 1950 6/12". The client can format this as
"1950 6/12", "1950.5" or "June 1950". We have to decide if the names
for the seasons and months are supplied by the server or are entirely
generated in the client.

> [age_prehistory]
> name = _("Prehistory")
> first_year = -1000
> turn_years = 25
> 
> ...
> 
> [age_modern]
> name = _("Modern Age")
> first_year = 1900
> turn_years = 1
> 
> [age_future]
> name = _("The Future")
> first_year = 2000
> turn_months = 3
> 
> [age_far_future]
> name = _("The Far Future")
> first_year = 2010
> turn_months = 0.5

In the long run we also need some trigger events for this and not only
a first year.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  This customer comes into the computer store. "I'm looking for a mystery
  Adventure Game with lots of graphics. You know, something realy
  challenging". "Well," replied the clerk, "have you tried Windows 98 ?"


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