[jdev] [Standards] Using Jabber in a KDE game

Kleag kleag at free.fr
Fri Sep 5 02:18:31 CDT 2008


You convinced me to try telepathy :-)

Should telepathy-qt from kdesupport be enough to develop ? The build system of 
telepathy seems a bit complicated...

Gaël
On Friday 05 September 2008 03:09:18 Alban Crequy wrote:
> Le Fri, 5 Sep 2008 00:50:42 +0200,
>
> Kleag <kleag at free.fr> a écrit :
> > Guillaume, Alban,
> >
> > The telepathy solution seems quite fine, at least with an "invitation
> > use case". But for KsirK I think more to a solution where games
> > (wanting to run the game or connect to a waiting one) connect to a
> > room (viewed as a whiteboard) and discuss there to find their peers.
> >
> > Do you think that telepathy can be used in such a way ?
>
> Yes: you can offer a stream tube either to a specific contact, or to a
> chatroom. When a tube is offered to the chatroom, every member of the
> chatroom receives the offer (it uses the presence stanza). The tube can
> be accepted and then used by several member of the chatroom.
>
> player 1:
>        unix socket
> KsirK <============     Telepathy       <------\
>                     Connection Manager         |
>                             ^                  |
> player 2:                   | (through the     | (through the
>        unix socket          |   chatroom)      |  chatroom)
> KsirK ------------>     Telepathy              |
>                     Connection Manager         |
> player 3:                                      |
>        unix socket                             |
> KsirK ------------------------------->     Telepathy
>                                        Connection Manager
>
> The player 1 offer a stream tube on the chatroom. All members receive
> the offer. The player 2 and 3 accepts the tube. At this moment,
> connections made by players 2 and 3's KsirK to the Connection Manager
> will be relayed to player 1's KsirK.
>
> A chatroom can host several tubes and of course text messages can
> still be sent on the chatroom. There is only one tube per game on the
> chatroom. A stream tube can have several streams. In the previous
> example, there is 1 stream tube containing 1 stream between player 1 and
> player 2, and another stream between player 1 and player 3.
>
> If the protocol of KsirK was not based on TCP/IP but based on D-Bus,
> you could use D-Bus tubes on a chatroom. In this case, Telepathy routes
> the D-Bus messages between contacts' applications in a private session
> as dbus-daemon does between applications on a single desktop:
>
>
>       /----------> room at conference.jabber.org <---\
>
>       |                     ^                     |
>       |
>       |                     |                     | XMPP
>
>    Telepathy             Telepathy             Telepathy
> Connection Manager    Connection Manager    Connection Manager
>       ^                     ^                     ^
>
>       | D-Bus conn.         | D-Bus conn.         | D-Bus conn.
>
>     KsirK                 KsirK                 KsirK
>
>     :1.0                  :1.1                  :1.2
>
>    player 1              player 2              player 3
>
> Telepathy tubes (stream or D-Bus) on a chatroom can be used on any
> chatroom: it does not require the chatroom server to have any knowledge
> of Telepathy or the game. Telepathy tubes on a chatroom just use normal
> messages and presence stanza.
>
> > In fact, I have finished implementing a first Jabber only version
> > doing the first step as described in my initial mail. I will now
> > start to work on the second step and if telepathy is really a
> > possibility I'll look to it in more details.
>
> Maybe it is possible to have different backends: Telepathy and the
> Multi-User Gaming XEP? Abiword has a plugin for collaborative editing
> (Abicollab) and this plugin has a backend for XMPP and another backend
> that uses Telepathy.
>
> Alban
>
> > Gaël
> >
> > On Thursday 04 September 2008 14:48:13 Guillaume Desmottes wrote:
> > > Le jeudi 04 septembre 2008 à 12:31 +0100, Alban Crequy a écrit :
> > > > The advantages would be that your users do not need to setup the
> > > > jabber (server name, password) in your game because it reuses the
> > > > connection of the desktop. And that you keep your current
> > > > protocol, the Telepathy framework will be responsible to reach
> > > > the contact, avoid NAT problems, etc.
> > >
> > > Furthermore, the Telepathy framework provides a much deeper desktop
> > > integration. For example, your contact can receive a notification
> > > "Alice wants to play foo game with you. <accept> <decline>" and if
> > > he accepts the game is automatically launched and connected to you.
> > > See
> > > http://cass.no-ip.com/~cassidy/blog/index.php/post/2007/10/21/GTetrinet
> > >-thr ough-tubes for a similar demo using Gtetrinet.
> > >
> > > Last but not least, by using the Telepathy framework you are not
> > > protocol specific. Tubes are currently implemented in our XMPP
> > > (Gabble) and XMPP link-local (Salut) backends but we could imagine
> > > an implementation using, say, MSN. You won't have to change
> > > anything and your application will gain new protocol support
> > > automagically when a new backend gains tubes support.
> > >
> > >
> > >
> > > 	G.
> > >
> > > _______________________________________________
> > > JDev mailing list
> > > FAQ: http://www.jabber.org/discussion-lists/jdev-faq
> > > Forum: http://www.jabberforum.org/forumdisplay.php?f=20
> > > Info: http://mail.jabber.org/mailman/listinfo/jdev
> > > Unsubscribe: JDev-unsubscribe at jabber.org
> > > _______________________________________________

-- 
KsirK - a world domination strategy game 
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK

KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer




More information about the JDev mailing list