[Freeciv] Client-side API
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi all,
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.
It looks like I'll have to do some work to get a decent framework for
people to write their AIs with as little overhead as possible. Ideally
the drop-in AI module would be on the client side, like this:
[UI code <->] AI <-> Client communication <-> Server
The UI code is optional. It would be nice to have it so that people could
use it to visualize what their AI is doing, but it's not essential. So I
see three possible ways to go:
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.
2) Figure out the network protocol used in client-server communication, and
write a library that speaks this protocol. Each team would then build
their AI on top of this library.
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? It doesn't seem to be too hard (mainly
code reorganization). Given that I'd like to have a stable release in the
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?
Thanks.
--Tessa
tlau@xxxxxxxxxxxxxxxxx
- [Freeciv] Client-side API,
Tessa Lau <=
|
|