[Kde-games-devel] Re: Re: Re: Incomplete Information and KGame

Martin Heni kde-games-devel@mail.kde.org
Sun, 16 Feb 2003 11:07:04 +0100


> Looking at the diagram there, there are three connections to the server.
> Two are remote, one is direct.  Let's assume the direct connection is
> Player A, and the remote connections are Player B and Player C.  I want to
> ensure Player A's secret information is only made available locally, never
> sent down either socket.  I also don't want Player B's information sent
> down Player C's socket, nor do I want Player C's ifnormation sent down
> player B's socket.
>
> Can I do that within KGame?

I am not fully sure here, as I did not implement the low level network
functions. I think that if you use the sentMessage() I mentioned earlier
and use as "receiver" the player of your local game 
(createPlayerId(player,game)) that the message is not sent to anybody else. I 
am not sure however because there are a lot of "broadcast" commands in the 
network code and I do not know where to it is broadcasted. However, the 
underlying network system definitely does support a direct addressed client. 
I am just not sure whether this connection is made between the KGameNetwork 
functions and the underlying KMessageIO/Client/Server modules. In the worst 
case you could try to directly access the KMessageIO/Client/Server objects 
provided by the KGame object to later on integrate this function into the 
KGame library.
Unfortunately, this low level network code is beyond my understanding ;-)
Burkhard.Lehner@gmx.de or Andreas Beckermann <b_mann@gmx.de>
could help here I suppose.

Nevertheless, I would recommend you to try to use the library and
incorporate improvements directly into the libray and not only in
your game because in this way the whole of KDE and all games
can profit from the code.