🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectPlay or Winsock?

Started by
3 comments, last by yungivan 22 years, 8 months ago
Which one is better for beginners? Which one is easier to learn? Is it a easy way to use winsock in a multiplayer game?
Advertisement
Winsock is hands-down the easiest to use when doing the basics. When you want to start implementing game rooms, etc you''ll spend more time coding boiler-plate code using Winsock. DPlay provides this functionality for you.

Personally, I like writing the boiler-plate code You''ll also have more of a chance porting a Winsock application to a *nix platform than porting a DPlay application.



Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
I really think you are wasting your time with WinSock altogether. Unless you 100% know you will be porting to some other OS that Dplay is not available on. AND if you design your software correctly, you should be able to abstract out the Dplay8 portion of the code enough such that if you ever did want to port the code or utilitize winsock directly you could then at that point do the code.

So basically, Dplay8 is saving you a TREMENDOUS amount of time. Also, according to MS docs, it utilizes overlapped I/O with I/O completion ports win running on Windows 2k. I havent done any massive perfomance testing yet on my machine, but in theory it should REALLY REALLY scaleable.

Which brings another point. If you think you will write a MMORPG on a windows machine without using I/O completion ports, you are mistaken. And using completion ports is going to pretty much make it non-portable. So, imho you can forget about writting a portable game server, thus just use DirectPlay.
quote: Original post by Anonymous Poster
AND if you design your software correctly, you should be able to abstract out the Dplay8 portion of the code enough such that if you ever did want to port the code or utilitize winsock directly you could then at that point do the code.

Yes, but the applications with the DirectPlay code won''t be able to interact with the applications with the non-DirectPlay code. The DirectPlay protocol is proprietary, and it is illegal to reverse engineer it. I''d just go with the WinSock code, most of it is exactly like the BSD sockets code (anything that doesn''t start with WSA). It will save you a lot of trouble if you ever decide you need to port it. It will also teach you more that you''ll be able to use later on.

[Resist Windows XP''s Invasive Production Activation Technology!]
...plus implementing I/O completion ports is relatively simple.

BTW There is a *nix project to implement IOCP in the kernel. I''m not a *nix fan so I haven''t looked into this too much.





Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com

This topic is closed to new replies.

Advertisement