Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: Working on client APIs
Home

[Freeciv-Dev] Re: Working on client APIs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Working on client APIs
From: Jed Davis <jldavis@xxxxxxxxxxxxxx>
Date: Mon, 17 Jul 2000 22:43:57 -0400

--On Tuesday, 18 July 2000 12:08 AM +0200 Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Mon, Jul 17, 2000 at 04:56:35PM -0400, Jed Davis wrote:
This would also be very useful for client-side
scripting/automation/whatever.  However I'm not quite clear what a
callback  would involve here:

The term "control program" is misleading. My current idea consists only
of one process, which would be the interpreter of the scipting language.
The general layer is a dynamic library which will be loaded into the
process. There is a module/class in the scipting language which does the
loading of the library and mapping between the C interface of the general
layer and the module/class. So the execution starts in the control
program  and after some initiation it gives control to the network
handler of the  general layer.

Oops. I read "client-side AI" and for some reason thought "integrated into the GUI client", which is not the best idea for an independant AI (or IMHO the best idea for scripting, for that matter). It all makes a lot more sense now. (Of course, if one wanted to observe a client-side AI, or use a partial AI (i.e. scripting) multiple connections per player would be needed.)

I first thought that it would involve calling a C
function (which could dispatch the call to an embedded interpreter), but
the "written in any language" implies that these callbacks involve some
kind of IPC with the controller running as a separate process, which is
probably a better idea in the long run.  Since I'm sort of working on
(read: planning and trying in vain to find time for) GUILE scripting,
I'd  appreciate any information on this.

Never mind the multiple-process stuff; it was based on an incorrect interpretation.

--Jed



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