Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[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: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Nov 2003 19:08:56 -0800
Reply-to: rt@xxxxxxxxxxx

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

Guest wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=576 >
> 
>>[per - Tue Apr 29 21:22:08 2003]:
>>
>>Recording some opinions and information from previous discussions:
>>
>>Each player's turn to move his units is called her 'phase'. The word
>>'turn' should be reserved for game turns.
> 
> ok, but we can use the PACKET_START_TURN to start the 'phase' of a 
> player. when the client receives this it will:
> update_unit_focus() /* it will find a unit because we've replenished the 
> units movements by now */
> update_turn_done_state()
> ...etc
> (the player does what it has to do)

There should be separate packets for the start of the turn (e.g. the 
year, which is the current definition of 'turn') and the individual 
player's movement phase (which I will call 'phase', e.g., 
PACKET_START_PHASE).

If game.syncronized_phases is set, then the client will only let the 
player move during their own phase, and the server will enforce this by 
discarding any appropriate packets (just unit movement?  I'm not sure) 
that it gets from players whose phase it isn't.

>>In beginning of game (or immediately after changing game to alternating
>>movement), server sends an update to all players that their units now
>>have zero movement points. Then for each player who begins her phase,
>>send the real movement points. Once her phase is done, send another
>>update setting all units to zero movement points. (For network
>>efficiency, we may want to introduce a new packet to do this in one
>>operation, however.)
> 
> do we have to send the real movement points? can't we invoke some 
> function in the client to know the unit movement poins?
> I agree with the packet to reset unit movements.

Having the server fake the number of movement points seems like a gross 
hack.  Better to send the actual number of movement points remaining 
this _turn_, and leave it up to the client to enforce the constraints of 
the _phase_.

(Note that the client enforcing this is just an interface issue.  The 
user wants to know what (s)he can/can't do as easily as possible.  The 
server _has_ to enforce this so that you can't cheat by hacking the client.)

jason




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