Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Question about attributes
Home

[Freeciv-Dev] Re: Question about attributes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Teemu Kurppa <tkurppa@xxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Question about attributes
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 17:44:37 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Jan 08, 2002 at 02:51:30PM +0200, Teemu Kurppa wrote:
> This question is mainly meant for Raimar, but I send it here anyway. 
> 
> Attributes (attribute.c and attribute.h) are persistent client side
> data. Server stores them, but it doesn't have to be aware of their
> meaning. 
> 
> We discussed about them on #freeciv yesterday. I asked, when should I
> update client side data structures, that are using the attribute facility. 
> You answered that maybe I should redesign my code, so that it uses
> attributes directly. 
> 
> Basically this means that I have to query data with attr_get_* every time
> I want to access it. Did you mean that ? 

Yes.

> This makes coding a little bit cumbersome compared to solution, in
> which persistent data is restored to client side data structures,
> when client reconnects.

Can you save the client side data structures directly in the
attributes?

> After that we can normally use client side data structures, and only
> when we modify them, should we dump/save them to the attribute
> facility.

Attributes are only used by the not yet committed agents. So you are
the first real world user. We can add hooks for transformations if
this is needed.

> Another concern: I think that a client should flush attributes to a
> server, when a player decides to disconnect. Currently it flushes them
> only at the end of turn.

Same as above: attributes aren't yet used. I agree. Note that you can
also manually flush them.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "On the eigth day, God started debugging"


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