Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Chat Functionality with Jabber
Home

[Freeciv-Dev] Chat Functionality with Jabber

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Chat Functionality with Jabber
From: Adam Theo <theo@xxxxxxxxxxxxx>
Date: Thu, 13 Jun 2002 05:00:40 -0400

Freeciv is a client/server system.  There is no connection between clients.

Correct, I just wasn't conveying what I understood evry well, sorry  :-)

Yes, games over Jabber are already starting up, and not just for the chat functionality. Take a look at the Vista Jabber client by i3connect [http://www.i3connect.com/vista.html]. It allows the users to play chess and other games over the Jabber platform, by routing the gama data instantly and reliably (and of course securely) between players.

Vista turns out to be trivial to install and configure, and it looks
great (fast!), but I don't have any "buddies" to try chess with.

I'll ask around on the Jabber lists to find someone who plays chess on Vista, to give you and others an opportunity to test the performance out. Unless, that is, people from here want to try out Vista as well? I would, but I run Linux, not Win32. Vista: http://www.i3connect.com/vista.html

Freeciv is real-time.  In online games several moves are transferred
per second.  The amount of info going the other way is bigger.
A lag of over 300ms kills the game.

This is true with FreeCiv? I understand that real-time games like EverQuest and similar games transfer alot of data at an instant, but FreeCiv doesn't seem to have as heavy requirements as EQ. Sending a single Jabber message once a second (when there is activity, nothing when there isn't) with all the game data for that second seems quite adequate. From my playing with FreeCiv in the past, I don't see any problems with the amount of data needing to be transferred, as long as you don't expect Jabber to behave like a real-time binary protocol used by EverQuest and other 3D adventure games. Besides, we are talking about the human chatting right now, unless you want to jump into using Jabber as the data transport as well (hey, I'm all for it, I think Jabber can do it just as well as the current protocol, and bring in some side benefits to boot).

Is chess in Vista playable with a timeout of half a second per turn?

I don't know if the Vista client has a short timeout like that, I don't think so, but short timeouts like that are easily done in the client code.

As long as the game data is text-based and not in binary format, Jabber can do it. Even the binary aspect will be soon solved in a matter of months,

The Freeciv protocol is binary to save on transmission volume
and parsing overhead.  It's no big deal to convert it to XML
or whatever else as long as performance isn't hurt.

Yes, Jabber is in XML, and performance isn't hurt any more than XML normally does. Jabber is designed to be very lightweight and fast, despite its XML foundations.

Understood. One of the great things with using Jabber as I said before is that there are already many libraries and developer tools to make using Jabber a snap. Is FreeCiv primarily written in C? If so, then I'm sure I can qiuckly find many good GPL'ed libraries and codebases to use.

It's all C.  Be sure to use libraries that run on all Unix variants,
Amiga, and Windows.

Should not be difficult since Jabber is an XML protocol with no UI or processing elements. Any platform that can do XML can do Jabber equally with every other platform.

Check out JECL [jecl.jabberstudio.org] and Jabberoo [jabberoo.sf.net] for starters.

Both C++.  Freeciv would benefit from being in C++, but it isn't,

JECL requires Java (for Ant) to build.  I don't know if Amiga users
are quite prepared for that.  Jabberoo doesn't seem to exist yet.

Hmm... quite true, now that you point it out. Sorry about that. I must remember there is a major difference between C and C++ (I'm from a Perl background, never touched C before). I've just sent off an email about other code bases I've found that are In C, and GPL-compatible. Additionally, there is a C wrapper for C++ libraries written by Justin Kirby at Openaether <http://www.openaether.org> as part of his project there. I'll get directions to the wrapper itself on the site if you cannot find it.

Also browse through www.jabbercentral.com and www.jabberstudio.org (Note: browsing the CVS shows alot more projects than are on the index page) for some other good Jabber projects.

Well, the search engine there is broken, and Google doesn't find
anything either.  But Googling for Jabber,chess gives a wealth of
hitrs.  The first is jtunnel.  That looks like a good starting point
for experiments with Freeciv Jabberization.

You are talking about Rob Norris' jtunnel in Perl, correct? Yes, it is a nifty program used to tunnel standard input/output from consoles over Jabber to remote computers. He created it to play GNU Chess over Jabber.

And on the search engine, /me slaps his head. I should have mentioned that, since the thing has not worked for some time. Like many free software/open source project websites, Jabber.org lacks a real search engine.

* Ability for XHTML formatting, if you want it. And the good thing is, *not* having XHTML doesn't have any of the bloat of the XHTML protocols, if that makes any sense.
>
Protocols?

What would it format?  Chat messages?  Freeciv would like to have a
good online help function with (optionally?) HTML output.

I just meant the XHTML spec, and yes, it would format the chat messages (bold, italics, red, yellow, etc...), as well as help messages and server output for easy/fast reading.

* Ability for IRC-style commands like /me and /topic, although you should note these are strictly client-side issues, the protocol itself doesn't get bogged down in extranneous things like this. But there are plenty of clients that can provide good examples of how to impliment these sorts of things.

Freeciv's chatline functionality has been kept very limited because
instead of adding chat fuinctionality feature by feature, it makes more
sense to interface with existing chat technology, like Jabber.

Yes, good. One of the great things about Jabber is that it is a mature chat protocol now, and is well designed to be quite future-proof, so what is coded now will still be 100% Jabber 2+ years down the road.

* Soon, the ability for themeable, cross-client emoticons and "genicons" in Jabber clients. Meaning emoticon graphics can be shared and traded by users of different Jabber clients like WinAmp and XMMS skins [www.theoretic.com/?Emoticons_And_Genicons]. If you want this sort of thing....

I don't, but prospective Freeciv users may like to see it.
I don't think it is related to Freeciv though.

Nope, not really. Just one of those little things that could be implimented in FreeCiv to make the user experience a bit better.

* Non-chat commands can be easily added to FreeCiv by using Jabber's X-Tag and X-Namespace extensions. This helps make FreeCiv future-proof, so the developers don't have to seriously re-vamp part of the code base everytime a major feature is added to the protocol. More time can be dedicated to the code implimentation itself.

There are practically no Freeciv developers, so the overhead imposed
by Jabberization must be zero, except to the person doing it.

No permanent developers that work on the project regularly, you mean? Everyone is pretty much a freelance contributor handing over patches here and there? That is fine, once the change to Jabber is made, there will be no overhead. As said above, what is coded now will still work fine even in the greater Jabber world 2+ years from now. Jabber was made to be simple and future-proof.

If you can think of any other features or issues which FreeCiv might like, tell me and I'll reply with whether Jabber can help or not.

A rating system like the one they use on ICS, that is, you'd get to
select players by their current rating and have the rating of
participants updated when a game finishes.  In the case of Freeciv,
the ratings database and update algorithm would be on a special
ratings server (that can speak Jabber).

That's a good idea. There will be a reputation system in Jabber in the coming months, and something could be hacked up easily until then using the JUD component and a Jabber X-Namespace with jabber:x:data. (If you don't understand, no worries, just for those people who know Jabber out there)

Also, another idea I had was presence. FreeCiv could let Jabber handle its status and presence as well. Specifying and keeping track of availability, away/busy status, etc... There are many opportunities for presence in a real-time strategy game like FreeCiv.

Now then, who is availble/willing to code Jabber into FreeCiv's client and server? If no-one here, then I might be able to pull some people from the Jabber project to help out here :-)

--
    /\  Adam Theo, Age 22, Tallahassee FL USA
   //\\   Email & Jabber: theo@xxxxxxxxxxxxx
  //  \\  (Boycotting AOL, therefore no AIM or ICQ)
=//====\\=  Theoretic Solutions: http://www.theoretic.com
//  ||  \\     "Bringing Ideas Together"
    ||      Jabber Protocol: http://www.jabber.org
    ||         "The Coolest IM on the Planet"
    ||  "A Free-Market Socialist Patriotic American
    ||      Buddhist Political Philosopher."



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