[Kde-games-devel] [PATCH] Joining network-enabled games from the network view in Konqueror/Dolphin/Folderview

Friedrich W. H. Kossebau kossebau at kde.org
Mon Feb 23 01:40:06 CET 2009


Hi,

(no need to cc:, I am subscribed)

I am looking for some cooperation with regard to network-enabled KDE games.
Would you like to see open or ongoing games for KBattleship, LSkat, 
KFourInLine, KSirk and others listed in a network view in Konqueror, Dolphin 
or a Plasma Folderview? Also be able to connect to them by clicking on them 
and have the corresponding game program automatically started and connected 
to the clicked game? Then please read on :)

Currently I work on a kioslave* which lists the computers/devices and services 
in the network, based on DNS-SD and hopefully soon other service discovery 
services (build instructions below).

* http://frinring.wordpress.com/2009/02/13/browse-your-network/

One example used is KBattleship**. ATM more functionailty is added to the 
kioslave, like connecting to the service clicked. This works nice for all 
protocols KDE has kioslaves for, e.g. web browsing, filesystem listing, ssh, 
even vnc. But it does not yet work for the KDE games.

** http://frinring.files.wordpress.com/2009/02/network-ioslave.png

There are two blockers:
A) None of the network-enabled KDE games has support to connect to a remote 
server by commandline arguments (unless I missed it).
B) KIO looks for a kioslave which supports the protocol type of the link, even 
if the protocol name is just passed as part of a link/url in a commandline. 
So "kbattleship:/" does not (yet) work.

For A) I quickhacked a little patch for KBattleship (see attachment) which 
adds the option to start the program up with the dialog to connect to a 
server and having it filled with the data from the link. I would be glad if 
it could be reviewed, improved and applied, so I have a showcase. I would be 
even more happy if there could be similar patches to LSkat, KFourInLine and 
KSirk :)

To deal with B) as a temporary workaround I tricked a little by pretending 
that kbattleships uses http, while the code in the patch simply ignores the 
given protocol name. Will have to talk to the kio people how to deal with 
this in general. But I need running and killer usecases, that is why I am 
here first :)

The following should do it for building the network: kioslave. You can ignore 
the SLP dependencies, that backend is unused currently:

svn co yourprotocol://svn.kde.org/home/kde/trunk/playground/network/networkkio
mkdir build
cd build
cmake ../networkkio
make
make install
 
I hope you find this useful and we can do some work together here :)
So one day you and I can browse the network and e.g. join a game by simply 
clicking on it.

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: connectKBattleshipToNetworkGameFromCommandLine.patch
Type: text/x-diff
Size: 7223 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20090223/9c79d549/attachment.bin 


More information about the kde-games-devel mailing list