Complete.Org: Mailing Lists: Archives: freeciv: March 1999:
Re: [Freeciv] Client-side API

Re: [Freeciv] Client-side API

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Tessa Lau <tlau@xxxxxxxxxxxxxxxxx>
Cc: freeciv@xxxxxxxxxxx
Subject: Re: [Freeciv] Client-side API
From: Mitch Davis <mjd@xxxxxxxxxx>
Date: Thu, 04 Mar 1999 10:39:45 +1100

Tessa Lau wrote:
> I'm planning on using Freeciv in a class I'll be teaching.  I'd like to get
> teams of people to write AIs for a complex multiplayer game, and Freeciv
> seems like a good match.

We are very honoured you are interested in Freeciv.

One disadvantage of Freeciv is that there are many many rules,
and it's a steep learning curve for people.  There are other
games which are simpler which may be better for student AIs.

If I haven't dissuaded you, then read on!! :-)

> the drop-in AI module would be on the client side, like this:
>       [UI code  <->]   AI   <->  Client communication   <-> Server

> 1) Hack up the current server-side AI so that it calls into our own AI
> code, perhaps via some new protocol that I define.

At the moment, there is only one AI engine per game instance.
It is not possible to have some races governed by one AI engine,
and the rest by another.  One advantage of having client-based AI
is that different AIs become possible.

> 2) Figure out the network protocol used in client-server communication, and
> write a library that speaks this protocol.

This code is already there, and could be easily stolen.

> 3) Reorganize civclient so that students can plug in an AI: separate out
> the client communication code from the UI code, and add in hooks to call AI
> routines instead of waiting for human input.
> #3 seems to be already on your TODO list (the bullet labeled "Client-side
> API"), and I think it's the cleanest solution.


> How difficult would it be, given that no one has tried it yet?

If you want different AI engines, then I think #3 is going to turn
out to be the easiest.  (Oh, and it furthers Freeciv more, so we'd
like it better!! :-)

> next three weeks or so, should I start with the 1.7.2 codebase or hope that
> 1.8.0 will be stable by then?

I would suggest basing it on 1.8.  If you use CVS, and your
code doesn't change existing things too much, then you'll be able
to automatically get any updates made to the Freeciv codebase 
(using the "cvs up" command).

Having said all this, I'm not Mr. Freeciv anymore, so others
will have other ideas.  One advantage of Open Source software
like Freeciv is that you have an army of people who are willing
to help!!

I wish you all the best.

| mailto:mjd@xxxxxxxxxx       | Not the official view of: |
| mailto:mjd@xxxxxxxxxxxxxxxx | Australian Calculator Opn |
| Certified Linux Evangelist! | Hewlett Packard Australia |

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