How to manage ping, latecny etc issues in directplay?
Hi All,
I''m trying to develop a multi player module for a game using DirectPlay. I want to keep track of network latency, player lagging, pings, but I didn''t see anything in the DirectX SDK tutorials (atleast till yet).
I would like to know how to tackle these issues. Any help in this matter will be highly appriciated & thanx in advance.
Regards,
Ejaz.
Well just send packets, and time each client ACKnowledgment.
Darkhaven Beta-test stage coming soon.
ummmm, how bout IDirectPlay8Server/Client::GetConnectionInfo ??
works foh me...
works foh me...
Thanx for the reply guys,
Dear Programmer Four, I found the API u mentioned last night, the only thing relavent to connection status in directplay. Anyways, I used that and get some other guys to review my code.
Dear Cahaan, I guess ur method is also fine, but that would be good with winsock, I mean at a more lower level then direct play.
As I''m a newbie to directplay, so I don''t know is there anything else beside GetConnectionInfo(...) to manage player/connection status. If there is anyother way, kindly let me know.
Any help in this matter will be highly appriciated & thanx in advance.
Regards,
Ejaz.
Dear Programmer Four, I found the API u mentioned last night, the only thing relavent to connection status in directplay. Anyways, I used that and get some other guys to review my code.
Dear Cahaan, I guess ur method is also fine, but that would be good with winsock, I mean at a more lower level then direct play.
As I''m a newbie to directplay, so I don''t know is there anything else beside GetConnectionInfo(...) to manage player/connection status. If there is anyother way, kindly let me know.
Any help in this matter will be highly appriciated & thanx in advance.
Regards,
Ejaz.
What''s wrong with GetConnectionInfo? Look at all the beautiful information it gives you:
typedef struct _DPN_CONNECTION_INFO {
DWORD dwSize;
DWORD dwRoundTripLatencyMS;
DWORD dwThroughputBPS;
DWORD dwPeakThroughputBPS;
DWORD dwBytesSentGuaranteed;
DWORD dwPacketsSentGuaranteed;
DWORD dwBytesSentNonGuaranteed;
DWORD dwPacketsSentNonGuaranteed;
DWORD dwBytesRetried;
DWORD dwPacketsRetried;
DWORD dwBytesDropped;
DWORD dwPacketsDropped;
DWORD dwMessagesTransmittedHighPriority;
DWORD dwMessagesTimedOutHighPriority;
DWORD dwMessagesTransmittedNormalPriority;
DWORD dwMessagesTimedOutNormalPriority;
DWORD dwMessagesTransmittedLowPriority;
DWORD dwMessagesTimedOutLowPriority;
DWORD dwBytesReceivedGuaranteed;
DWORD dwPacketsReceivedGuaranteed;
DWORD dwBytesReceivedNonGuaranteed;
DWORD dwPacketsReceivedNonGuaranteed;
DWORD dwMessagesReceived;
} DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
typedef struct _DPN_CONNECTION_INFO {
DWORD dwSize;
DWORD dwRoundTripLatencyMS;
DWORD dwThroughputBPS;
DWORD dwPeakThroughputBPS;
DWORD dwBytesSentGuaranteed;
DWORD dwPacketsSentGuaranteed;
DWORD dwBytesSentNonGuaranteed;
DWORD dwPacketsSentNonGuaranteed;
DWORD dwBytesRetried;
DWORD dwPacketsRetried;
DWORD dwBytesDropped;
DWORD dwPacketsDropped;
DWORD dwMessagesTransmittedHighPriority;
DWORD dwMessagesTimedOutHighPriority;
DWORD dwMessagesTransmittedNormalPriority;
DWORD dwMessagesTimedOutNormalPriority;
DWORD dwMessagesTransmittedLowPriority;
DWORD dwMessagesTimedOutLowPriority;
DWORD dwBytesReceivedGuaranteed;
DWORD dwPacketsReceivedGuaranteed;
DWORD dwBytesReceivedNonGuaranteed;
DWORD dwPacketsReceivedNonGuaranteed;
DWORD dwMessagesReceived;
} DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
*hint*
Ping = dwRoundTripLatencyMS
I know its obvious, but I''m just trolling around the board now it seems
Ping = dwRoundTripLatencyMS
I know its obvious, but I''m just trolling around the board now it seems
![](tongue.gif)
Thanx guys,
I did that as u suggested and it worked last night. I was just wondering that is there anyother way to do that as well in directplay, since I''m new to directplay and honestly speaking, I didn''t find much resources on directplay.
On other topics like OpenGL/Direct3D & bla bla bla, I get a hell of information, but when it comes to DirectPlay, everythings seems to vanish.
So, thats y I was asking that is there another way or not. Although the job has been done.
I really appriciate all the help that u guys have provided.
Thanx & regards,
Ejaz.
I did that as u suggested and it worked last night. I was just wondering that is there anyother way to do that as well in directplay, since I''m new to directplay and honestly speaking, I didn''t find much resources on directplay.
On other topics like OpenGL/Direct3D & bla bla bla, I get a hell of information, but when it comes to DirectPlay, everythings seems to vanish.
So, thats y I was asking that is there another way or not. Although the job has been done.
I really appriciate all the help that u guys have provided.
Thanx & regards,
Ejaz.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement