Archived

This topic is now archived and is closed to further replies.

Why doesn't DPlay scale?

This topic is 5271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was reading a couple winsock vs. DPlay posts (this is not one) and several times people mentioned that DPlay is unsuitable for games with more than 30-ish players and to support more than that, you really need to write a custom lib that uses UDP with IOCP. So my question is - what aspect of DPlay is it that limits scalability and to what extent can I design around it with with a good messaging system (in a realtime game)? Have people shown that DPlay actually does tap out around 30 connections? I''ve been doing a lot of reading of the DPlay docs (just about all of them) and the library seems to be designed well. In fact, I''ve been reading about how one would write their own high performance network lib, and DPlay seems to nail every key point. Maybe posts I''ve read about DPlay not scaling are only relevant for earlier versions (I know it didn''t change too much in DX9). The DPlay9 docs claim DPlay will use IOCP on 2000/XP machines transparently. Does the new DPlay8ThreadPool object help performance? I haven''t quite figured out how it works (documentation is spotty), but it seems to enable the same kind of message processing setup that you would have if you were writing a large server with IOCP. I''ll admit that my understanding of network issues isn''t particularly lucid - I''m just looking for clarification on this point.

Share this post


Link to post
Share on other sites
I think that the new directplay library from Microsoft would handle a MMOG just fine.

The real question is whether you want to use a windows box as your server, and whether you want to tinker with the nuts and bolts of your messaging protocol. A lot of people who design games want to be able to tinker with this, and with directplay you aren''t going to be able to.

Share this post


Link to post
Share on other sites
quote:
Original post by Telamon
The DPlay9 docs claim DPlay will use IOCP on 2000/XP machines transparently.


Could you tell me where you found that reference? I couldn''t find anything in the docs that said that. Granted, I use DX8.0 rather than 9 (I''m not *quite* ready to give up on the Win95 users yet, hehe), but I also thought there wasn''t much substantial change between 8 and 9 as far as DPlay goes.

I''m one of the people who have been bandying that 20-30 person limit around. I have no direct experience with it, it''s a number I''ve seen in more than one place, so I took it as fact. I''d be interested to know if DPlay can indeed handle larger numbers than is commonly thought. If DPlay indeed uses IOCP on WinXP+ machines, it should be able to handle quite a bit more than that.

quote:

I think that the new directplay library from Microsoft would handle a MMOG just fine.

Depends on the number of people, I suspect. Even *if* DPlay can do IOCP, I suspect it''s limit is much lower than a traditional Winsock IOCP server. I could be wrong But I know that DPlay does a whole hell of a lot of stuff in the background that you don''t get with Winsock, and that has to take a toll.

Share this post


Link to post
Share on other sites
> Could you tell me where you found that reference? {...} I use DX8.0

Here''s an extirp from the DirectPlay 8.0 reference manual:

"By making use of overlapped I/O, almost all calls can be made asynchronously and multiple transactions can be outstanding at any given time. The use of NT I/O completion ports allows DirectPlay to increase its efficiency by using a limited number of threads to service I/O operations."

> Does the new DPlay8ThreadPool object help performance?

It''s an interface used for tweaking the multithread performance. Some people can favor singly-threaded behaviour for their application and thus turn off threading altogether and explicitely call an interface function to poll the socket.

> what aspect of DPlay is it that limits scalability and to
> what extent can I design around it with with a good
> messaging system

The P2P configuration is inherently limited because of the n*(n-1)/2 peer connections that need be maintained. The Client/Server configuration is what you should be aiming at.

DPlay never was very good with garanteed delivery and in-order messages, both on the reliability and on the performance issues. Also, handling of NAT was poor. There are, however, strong indications that those issues have been addressed in DirectPlay 9. Small messages (marked as reliable or not) can be coalesced into bigger payloads if specified, and there are a better set of algorithms to handle in-order and reliable messages.

> I''m one of the people who have been bandying that 20-30 person limit around.

Microsoft claims: "In version 8.0, DirectPlay is designed to scale up to the most ambitious massively multiplayer projects."

I suspect the 30 person limit has been pushed, but I''ve yet to find an independent benchmark on this. Best to try it yourself in a small app.



-cb

Share this post


Link to post
Share on other sites
This is where I got that bit about IOCP, straight from the horse''s mouth.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/play/understand/callbacks/callbackandmultithreading.asp

"DirectPlay maintains a thread pool to service callback indications, and your callback is invoked on a thread from the pool of threads maintained by DirectPlay. The size of this thread pool is configurable on a per process basis in Microsoft Windows 2000 and Windows XP. Also, DirectPlay will use I/O completion ports when running on Windows 2000 and Windows XP."

Having read a lot of the docs for DPlay 9, it seems like there may have been more changes to the DPlay 9 internals than Microsoft advertises on their "What''s New in DP9" page.

I myself have little interest in spending months writing an IOCP-capable network library (so many issues to worry about...) before even starting to code my game, so I''m going to jump right in with DP9 and see how many connections I can support - if I can get anywhere between 100 to 300, that''ll probably be plenty and save me a lot of work. As for those poor bastards still using win95, they probably don''t have a 3D card either - so whether they can connect to the game server is kind of a moot point. win98 is still supported, right? I can''t say that I like the lack of backward compatibility in the newer versions of windows. Most DOS programs refuse to run in winXP no matter what I do :-(.


----------------------------------------
Let be be finale of seem, seems to me.
----------------------------------------

Coding:
http://www.stanford.edu/~jjshed/coding

Miscellany:
http://www.stanford.edu/~jjshed

Share this post


Link to post
Share on other sites