[Kde-games-devel] Little KGame problem

Kleag kleag at free.fr
Sat May 5 09:04:34 CEST 2007


Hello,

I need an advice by a libkdegames/kgame expert. Andreas, maybe ? 

In the current version of KsirK, after starting a new game, player action are 
transmitted as necessary, see the first log below. But, when a game is 
loaded, the actions are not processed by KMessageClient. I suppose I made an 
initialization error, but I cannot find which.
Does this sounds familiar to you ?

Best regards,

Kleag

===============================================
Log 1 (New game, OK)

ksirk: DecoratedGameFrame::slotMouseInput()
ksirk: Player Baudouin 156
ksirk:  QEvent::MouseButtonPress
ksirk:  Left
ksirk:  Position: QPointF( 470 ,  413 )
ksirk: Mouse input done... eatevent=true
libkdegames (KGame): [virtual bool KPlayer::forwardInput(QDataStream&, bool, 
qu
int32)] : to game playerInput(sender=0)
libkdegames (KGame): indirect playerInput
libkdegames (KGame): [virtual bool KGame::sendPlayerInput(QDataStream&, 
KPlayer
*, quint32)] : transmitting playerInput over network
libkdegames (KGame): [bool KGameNetwork::sendSystemMessage(const QByteArray&, 
i
nt, quint32, quint32)] msgid=101 recv=1025 sender=0
libkdegames (KGame): [bool KGameNetwork::sendSystemMessage(const QByteArray&, 
i
nt, quint32, quint32)] receiverClient=1 receiverPlayer=1
libkdegames (KGame): [void KMessageClient::sendBroadcast(const QByteArray&)]
libkdegames (KGame): [void KMessageClient::sendServerMessage(const 
QByteArray&)
]
libkdegames (KGame): [virtual void KMessageDirect::send(const QByteArray&)]
libkdegames (KGame): [virtual void KMessageDirect::send(const QByteArray&)]
ksirk: [virtual void KMessageClient::processIncomingMessage(const 
QByteArray&)]

ksirk: [virtual void KMessageClient::processMessage(const QByteArray&)]
ksirk: [virtual void KMessageClient::processMessage(const QByteArray&)] 
message
ID=101
libkdegames (KGame): [virtual void KGame::networkTransmission(QDataStream&, 
int
, quint32, quint32, quint32)] : we=1 id=101 recv=1025 sender=1
libkdegames (KGame): message id 101 seems to be for a player 
(Ksirk::GameLogic:
:Player(0x8574bd8) ) recv=1025
libkdegames (KGame): player is here and active: transmit to it
libkdegames (KGame): [void KPlayer::networkTransmission(QDataStream&, int, 
quin
t32)] : Got player move KPlayer (virtual) forwards it to the game object
libkdegames (KGame): [virtual bool KPlayer::forwardInput(QDataStream&, bool, 
qu
int32)] : to game playerInput(sender=0)
libkdegames (KGame): direct playerInput
libkdegames (KGame): KGame: Got playerInput from messageServer... sender: 0
ksirk: GameAutomaton: Player input
ksirk:  =======================================================
ksirk: Player Baudouin id=1025 uid=0 : actionLButtonDown at QPointF( 470 ,  
413

===============================================
Log 2 (Loaded game, KO)
ksirk: DecoratedGameFrame::slotMouseInput()
ksirk: Player Baudouin 156
ksirk:  QEvent::MouseButtonPress
ksirk:  Left
ksirk:  Position: QPointF( 531 ,  470 )
ksirk: Mouse input done... eatevent=true
libkdegames (KGame): [virtual bool KPlayer::forwardInput(QDataStream&, bool, 
qu
int32)] : to game playerInput(sender=0)
libkdegames (KGame): indirect playerInput
libkdegames (KGame): [virtual bool KGame::sendPlayerInput(QDataStream&, 
KPlayer
*, quint32)] : transmitting playerInput over network
libkdegames (KGame): [bool KGameNetwork::sendSystemMessage(const QByteArray&, 
i
nt, quint32, quint32)] msgid=101 recv=1025 sender=0
libkdegames (KGame): [bool KGameNetwork::sendSystemMessage(const QByteArray&, 
i
nt, quint32, quint32)] receiverClient=1 receiverPlayer=1
libkdegames (KGame): [void KMessageClient::sendBroadcast(const QByteArray&)]
libkdegames (KGame): [void KMessageClient::sendServerMessage(const 
QByteArray&)
]
libkdegames (KGame): [virtual void KMessageDirect::send(const QByteArray&)]


-- 
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk

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


More information about the kde-games-devel mailing list