Advertisement

The best process to server send msgs to players with DirectPlay?

Started by July 24, 2004 12:34 AM
2 comments, last by cbenoi1 20 years, 6 months ago
I am creating a server for a game(MMORPG) using the DirectPlay and I would like to know which best mode to process the messages received for other users? And also if any flag that I to add in the SendTo it uses UDP? The performance of DirectPlay is equal of the UDP?
Programming is my life!
> {...} which best mode to process the messages received for other users?

Mode? Please give more details here.

> And also if any flag that I to add in the SendTo it uses UDP?

DirectPlay uses UDP already.

> The performance of DirectPlay is equal of the UDP?

Yes and no. DP8 implements a reliability layer atop UDP for messages flagged for guaranteed delivery. There is thus some overhead in the message itself as well as the resending mechanism when networks conditions are unfavorable. If you were to use UDP through Winsock instead, either you would have to implement your own reliability layer or provide some internal game mechanism to account for lost packets.

-cb
Advertisement
Regarding the SendTo of the DirecPlay as I can know when I am using the standard async or sync?

In the case which would be the best algorithm so that the server treats the received messages, former: to use one linked list so that the server processes each message one for one, or to use multhread etc...

Thanks!
Programming is my life!
Messages sent with the DPNSEND_SYNC flag will pause the SendTo() call until the message is acknowledged at reception. Only use this flag when there is a dire need for this.

In the general case, DP8 is multi-threaded and the callback you've specified in the Initialize() call can be called from multiple threads at the same time.

Actual data messages that are send by peers are received through the DPN_MSGID_RECEIVE message; it's from this message that you can decode your peer's data.

-cb

This topic is closed to new replies.

Advertisement