[Freeciv-Dev] Re: (PR#725) Order of end/new-turn activities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=725 >
On Wed, 12 May 2004, Jason Short wrote:
> One other complication.
>
> At some point we want synchronous player turns.
I assume you are talking about alternating unit movement here.
> For this to work we
> need a loop that is logically like
>
> do {
> begin_turn()
> players_iterate {
> begin_player_turn();
> do_player_turn();
> end_player_turn();
> }
> end_turn();
> }
>
> now in this case I have some questions.
>
> - (design) Which actions should be done in begin_turn and which in
> begin_player_turn? City production? Unit (goto) movement? IMO both
> should go into begin_player_turn().
What is the reason for begin_turn() and end_turn() in a game with phases
(alternating unit movement)? I don't think there's a need for it, instead
put put all activities for starting a players turn in begin_player_turn().
Then the loop for alternating unit movement becomes:
do {
players_iterate {
begin_player_turn();
do_player_turn();
end_player_turn();
}
}
If you've ever played RISK, then that is the type of turn based game mode
I am trying to describe. This game mode is also consistent with what
people are used to with Civ2/3 turn based mode.
The current simultaneous moves could be described like this:
do {
players_iterate {
begin_player_turn();
}
players_iterate {
do_player_turn();
}
players_iterate {
end_player_turn();
}
}
> - (technical) How do we have this loop coincide with the loop we have
> now, which is
>
> do {
> begin_turn()
> begin_all_players_turns();
> do_all_players_turns();
> end_all_players_turns();
> end_turn();
> }
>
> maybe we can pass NULL to begin_player_turn to mean it is to be done for
> all players. Then a dummy loop can either loop over all players
> (shuffled as needed) or just the one player.
>
> - In this case we probably only want to shuffle once, at the beginning
> of the game. After that everything proceeds in order. This means the
> shuffled order must be put into the savegame. This should be done
> anyway since currently players are re-shuffled on loading meaning games
> aren't identical after a save+load.
I agree that the player order should be shuffled once. As pointed out in
PR#576, if you shuffle every turn, then one player can get two turns in a row,
which is
unfair.
Andreas Røsdal
|
|