Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: Scripting and client-side AI's
Home

[Freeciv-Dev] Re: Scripting and client-side AI's

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Bobby D. Bryant" <bdbryant@xxxxxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Scripting and client-side AI's
From: Marko Lindqvist <caz@xxxxxxxxx>
Date: Wed, 10 Jan 2001 09:13:28 +0200 (EET)

On Wed, 10 Jan 2001, Bobby D. Bryant wrote:

> does the script access the state?  Two obvious choices come to mind: (a)
keep track
> of the state within the script, and (b) keep track of the state within
the existing
> client, and let the script make callbacks whenever it needs more
information.
>
> I personally like (b) better, because it would make use of existing
client code for
> maintaining state.  That gets you back ahead in the maintainability
game, where most
> changes to the game would be made once, in the common client code base,
and you
> would only be forced to update everyone's AIs when you had game rule
changes that
> were so radical that they created new *kinds* of information, not
already supported
> by callbacks offered by the common client code.


 In fact, client currently knows, in some respects, less than player. This
was one of the reasons I gave up cazaic development. (but things are
improved since)

 For example:
 When city changes owner, server sends packet_remove_city for old city and
later packet_unit_info for 'new' one (with different city id). Client
can't be (always) perfectly sure that these two cities are in fact same
city. Any information collected is lost (whether diplomat have already
stolen from that city, original builder...).
 But as I said, things are improving. This changes any day now.


> Re the second, I'll just mention that (b) above would not need any new
caching,
> since the existing client code already stores a "model" of the player's
world.  The
> AI could just look at that model, and you wouldn't need any kind of new
caching
> system.



 Caz

--




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