Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: (PR#13468) Aifill problems in pregame screen
Home

[Freeciv-Dev] Re: (PR#13468) Aifill problems in pregame screen

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13468) Aifill problems in pregame screen
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 14 Jul 2005 10:59:25 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13468 >

On Wed, Jul 13, 2005 at 10:53:02PM -0700, Jason Short wrote:
> 
> I had thought that is-info was removed from all the packets.  But I
> guess this is far from the case, and this is another bug from it.
> 
> This patch fixes this and (probably) other problems by removing is-info
> from all packets.  It may be overkill, as explained in the warning.
> is-info is safe to add to some packets, so long as the data provided by
> the packet is purely "static" at the client and the packet reception has
> no side effects.
> 
> Example 1: player info is updated at the client when a player_remove
> packet is sent.  The server then doesn't resend the next player info
> packet because it's a duplicate of the last one sent.  But the delta
> code doesn't know that the player's info was changed by the delta

You mean "by the player_remove packet"?!

> packet.  Thus this packet cannot be is-info because this data is not
> read-only at the client side.
> 
> Example 2: game.info is sent to the client in the game_info packet.  But
> this info is purely static in the client; it is read-only.  Thus it is
> safe to mark this as is-info.  This doesn't save much network bandwidth
> and doesn't save much server processing, but it does save some client
> processing.
> 
> Example 3: a seconds_to_phasedone value is added to the game.info
> packet.  As a result the client must remember when it received the last
> game-info packet.  Now receiving the game-info packet has side effects.
>  It may no longer be marked is-info.

This is all correct.

> Conclusion: is-info is very bug-prone and should not be used unless
> there is a demonstrable gain from doing so.

Another conclusion could be to pay more attention to the packets.def
file. I.e. only let people change the code who know what they are
doing.

> The only likely candidate I see is the packet_tile_info.

When I added it I also posted some data. The savegame should be still
there and so is the statistics code. Just test it.

> However in all cases it is better if possible to remove the spurious
> send_xxx calls from the server entirely.

That is hard. Certain fields may have changed. Yes you can track this
and only call send_xxx when you are sure it is required. But I think
the is-info solution is friendlier here.

        Raimar

-- 
 email: i-freeciv-lists@xxxxxxxxxxxxx
  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]