Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#576) Wishlist: alternating unit movement
Home

[Freeciv-Dev] Re: (PR#576) Wishlist: alternating unit movement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: tomg@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#576) Wishlist: alternating unit movement
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Wed, 26 May 2004 18:04:33 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=576 >


This is a non-problem.

1)  One turn or less spaceship arrivals should never be possible. If
     necessary make it so by computing the time as 1 + travel, or always
     rounding *up* to the next turn.

2)  Check for spaceship arrival/game end at the *end* of the turn, not
     the beginning as an alternative if this hurts (actually same as
     above with 1+).

3)  Strict round robin and phases are an option. Randomized turn order
     is actually a better option, but tying spaceships to an option and
     the whole phase notion is a horrible mistake. Ditch this.

Cheers,
RossW
=====

Jason Short wrote:

> <URL: http://rt.freeciv.org/Ticket/Display.html?id=576 >
> 
> A not on spaceships.
> 
> Launching a spaceship is an action; you should only be able to do this 
> on your phase.  There are some problems with spaceships if they're done 
> wrong.
> 
> Suppose you have 5 players, numbered 0-4 and taking their phases in 
> order.  Now...
> 
> One possibility is that you check for spaceship arrival for everyone at 
> the beginning of the *turn*.  However this is quite bad.  Say player 4 
> launches their spaceship in 1900 with a travel time of 1.0 years.  Now 
> it will arrive immediately at the start of 1901; the other players never 
> had a chance to counter-attack.  By comparison if player 0 launches in 
> 1900 everyone will have a chance to counter-attack.
> 
> So obviously the phase has to play some role.  There are two ways this 
> could be better done...but each has problems of its own.
> 
> In one method, each phase (in the above example) lasts 0.2 years. 
> Remember that spaceships may take a non-integer number of years to 
> arrive.  So if player 4 launches their 1.0-year spaceship in the year 
> 1900.8 (their phase), it doesn't arrive until 1901.8 (their phase in 
> 1901).  This is better.  However there is still a problem: suppose 
> player 1 launches a 1.5-year spaceship and player 4 launches a 1.2-year 
> spaceship, both in 1900.  Now player 1's spaceship arrives at 1901.7 and 
> player 4's spaceship arrives in 1902.0.  So player 1 wins just because 
> they happened to go first, which is obviously bad.  Also its a bit bad 
> to have spaceships arriving at random points during the turn 
> (complicated for the player to figure out when it will arrive) - note 
> that in the second example above player 1 wins the game at the start of 
> player 3's phase in 1901.
> 
> In the other method you do spaceship checking at the beginning of the 
> phase but only for the active player.  Any fraction part of a year is 
> simply left out in this case.  So when player 4 launches their 1.0-year 
> spaceship in 1900 (launched during their phase, of course) it will 
> arrive at the beginning of their phase in 1901 - the same as above. 
> However in the second example player 1's 1.5-year spaceship will arrive 
> at the beginning of player 1's phase in 1901, and player 4's 1.2-year 
> spaceship at the beginning of player 2's phase in 1902.  So again player 
> 1 wins just because they happen to be shuffled first.  But at least now 
> it's obvious to the players when the spaceship is going to arrive.
> 
> jason
> 
> 
> 
> 




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