Advertisement

How to manage ping, latecny etc issues in directplay?

Started by July 22, 2003 07:14 AM
7 comments, last by Ejaz 21 years, 6 months ago
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.
Advertisement
ummmm, how bout IDirectPlay8Server/Client::GetConnectionInfo ??
works foh me...
Note: I just said "foh"
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.
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;
Advertisement
*hint*

Ping = dwRoundTripLatencyMS

I know its obvious, but I''m just trolling around the board now it seems
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.
DirectPlay is one of those odd topics you really need to learn the intrecacies of yourself. There are a few good tutorials on the basics, but to really learn it you need to dig in deep and pour over the documentation (I tried to print it once.. came to over 500 pages).

This topic is closed to new replies.

Advertisement