Winsock vs. DirectPlay for professional games.

Started by
20 comments, last by Kinslayer 22 years, 9 months ago
Forgive me for making a post about the oldest and most flogged subject in the forums . I''d like to assemble everybody''s thoughts in one coherent thread (please no off-topic posts). Please bear in mind that I am not trying to generate the general differences between these two methods of network communication. What I think is more interesting is a discussion on which is a better choice when developing a professional game where issues of accessibility, compatibility, security and also developer-friendliness are major issues.
Advertisement
DirectPlay is far more developer friendly than Winsock. Those of you who can''t get it going...I got it going in 2 hours having never used it before. Winsock would have taken months to develop libraries that DPlay has prewritten.

Accessability? Not sure what you mean.

Compatability is a loaded question. Most people who have Linux also have Windows so it''s not an issue consumer side. If you care about compatibility then you have to use Winsock.

Security in games is a prorgamming issue not a WinSock or DPlay issue. Though DPlay allows enxrypted packets with no additional programming.

Ben
http://www.icarusindie.com
I''m curious how the DP client/server scales.

It''s the same old story, if you can live with the limitations of existing code then use it; if you can''t then, well, it''s a long road to make your own so make sure you can''t live with those limiations.

DP features:
Standardized Lobby Support
Packet reliability settable per packet
Priorized Packet Queue
Multi-threaded network handlers
Voice Chat support

Winsock features:
Works on non-windows machines


Some time ago, the guys working on DP kicked around the idea of opening up the protocol so that servers could be made for other OS''s, but I don''t think it ever materialized.

I had a winsocket connection in about 20minutes. It took several hours with DP. For how easy it makes the other features, you''d think connecting wouldn''t be a big deal...
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
The scaling is the only thing I''m not sure about. I had 12,000 NPCs running around using a single connection and it handled fine. It took about 16 seconds to get them all updated. That''s about 53KB per second. 72Bytes per character * 12,000 / 16

I doubt that''s a DPlay limit. WinME blows for CPU intensive apps which the NPC client was running on. I should be able to update all 12,000 within 5 seconds. Which would allow me to split the work onto 5 computers which is acceptable.

I''m going to do more testing but that basically shows that bandwidth won''t kill you.

I still need to test connections though as more are added there''s no real decrease in server speed.

I think the connection limit is based on the speed of the processor and the amount of memory as well as how intensive the server program is.

2 hours to get a DPlay connection isn''t too bad considering once you have the connection there''s really nothing left to do. Figuring out how to do dynamic size messages took only an hour or so and that was it. I havn''t touched DPlay since.

Ben
http://therabbithole.redback.inficad.com
KalvinB ? Do you have a working small DirectPlay example I could have a look at ?

-------------Ban KalvinB !
I don''t have anything I can show you but it''s all derived from the SimpleConnect demo included with the DX7 SDK. You just have to follow the source to figure out how it works and how to build on top of it.

Ben


Jump Down The Rabbithole
In a past thread "Heh, Sweeney''s opinion on DirectPlay", the thread creator (civguy) quoted Sweeney from an interview. Anyone have a link to the full interview?
That article is only an opinion, which I think is incorrect. and besides, DirectPlay8 can''t be compared in any way to previous versions

Almar
www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>
The DX 7.0 version of DirectPlay had security measures and support for message encryption etc... I can''t find any mention of these features in DirectPlay 8.... are they still implemented in the API?
No, I searched for it today, and couldn''t find it myself. I''ve searched for some nice encryption methods, like RC4, TripleD, BlowFish, TEA, and choose one that performed best for me without making the packetsize too big... I''ve just let it run over the byte buffer that DP8 uses (-in VB)
www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>

This topic is closed to new replies.

Advertisement