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: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 16:02:08 -0600

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.
> 
> But I have an alternate solution that I think might be better: Create a base 
> calendar, with months and days and leapyear rules that are
> constant throughout the game (therefore, date math becomes possible). Then 
> create ages that all use the same calendar. I've included a couple of sample 
> ruleset fragments at the end of this message, but I'll try to explain the 
> system:
> 
> Each [month_*] has a "name" and a number of "days." Each [leap_*] has
> an "every" that specifies how many years between each (which can be
> decimal; for two leapyears every 9 years, use 4.5), an optional
> "offset" that specifies where the counting starts (defaults to 0), a
> "month" that specifies the name of the affected month, and a number of
> "days" (positive or negative) to add to the month.
> 
> This leapyear system is pretty simple, and takes care of everything
> you'd want. You can even create entire leapmonths (I've made a lunar
> calendar, with 13 28-day months, plus 28-day leapmonths that pop up
> every so often to keep the year accurate to within one day in 13,200
> years) by adding a month with no days, and giving it extra days during
> leapyear. See the second fragment.

        The mind boggles.
        I fully understand how nuts people have been in human history, but
what kind of masochist would want to include this level of complexity into
a game?
        Clearly, we need to start working on a Calvinball scenario.  "On
Tuesdays in March, you need to juggle 4 knives for two minutes and touch
thirteeth base, including the secret eighth base, as well as kick a soccer
ball onto the house roof, close your eyes, spin four times
counterclockwise, and count to thirty before you can build Riflemen..."

> First of all, troops movements, spaceship travel, and other factors
> important to the game don't accelerate exponentially along with
> technology. A bomber in the last age can't go any farther than a
> bomber two ages earlier, but it only takes 1/5th as long to get there?
> That's silly. The spacerace has been forced (both in Civ2 and in
> FreeCiv) to make sense, but the way it works is clearly a hack.

        Correct.  Movement rates in Civ were never really sane.  It didn't
take Magellan 20+ years to circumnavigate the world.  Yet it can in Civ.

> Speaking of the spacerace, FreeCiv (and I believe Civ2?) have some
> code that forces time to travel at one year per turn once you can
> build spaceships.

        Confirmed.

> So if you launch a spaceship with a 28.3-year flight
> time, the game has 28 turns left (unless someone annihilates
> you).

        Not annihilates.  Captures your capital.
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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