DirectPlay vs WinSock
Which one is better and faster to use Winsock or DirectPlay. I''m developing a multi-purpose engine that will be used for all kinds of 3d/2d games.
-- Ivyn --
It''s been said that DirectPlay is good for small scale games and has too much overhead.
Writing your own routines using Winsock provides better support for what you might specifically want to do, including MMORPG''s.
But don''t consider me a guru on the subject.
Writing your own routines using Winsock provides better support for what you might specifically want to do, including MMORPG''s.
But don''t consider me a guru on the subject.
It's not what you're taught, it's what you learn.
The best thing you could do is searching on this forum for "directplay vs winsock" or "winsock vs directplay". The topic passes like once every month
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/>
Dplay is built upon Winsock. So I guess Winsock IS faster if you can program correctly.
So if you are a programmer who like to know what he''s doing, you would probably go for Winsock. (And don''t think Dplay is easier, I''ve learned both and I can tell you Winsock is easier like OpenGL is simpler than D3D).
BTW I''ve never seen any serious commercial game which used Dplay.
Even Asheron''s Call from Microsoft doesn''t use DirectPlay :-)
So if you are a programmer who like to know what he''s doing, you would probably go for Winsock. (And don''t think Dplay is easier, I''ve learned both and I can tell you Winsock is easier like OpenGL is simpler than D3D).
BTW I''ve never seen any serious commercial game which used Dplay.
Even Asheron''s Call from Microsoft doesn''t use DirectPlay :-)
Darkhaven Beta-test stage coming soon.
Well ofcourse there is great difference between the two (speed). While DirectPlay provides simplicity of use (well not really), winsock is much faster. You ask why? Well winsock is the high level (better said ring 3 level) wrapper for windows communication resources, so as that it provides access to TCP stack, UDP frames and ofcourse the allmighty IP protocol. The system communicates with hardware and it makes the little packages for you just pass in the data to send and connect disconnect. If you wanted even more speed you''d have to use raw sockets but then you''d have to be a hardware driver programmer, right? Winsock achieves quite nice speeds and almost all web based windows applications use it. DirectPlay compared to winsock is like programming you multiplayer in Internet Explorer because it provides one level of abstraction. So you end up with an abstraction of abstraction of abstraction ( protocols are also abstractions but necesary). For all my internet needs I use winsock with combination of assembly for huge speed. trust me winsock is the way to go but keep it low on objects it''s better to leave it as it is (if possible.
<>
<
<>
Thanks for the replies. Especially mcweddo who answered my question is superb detail.
-- Ivyn --
Actually, RTS games are notorious for using DirectPlay. On the other hand, I have yet to see a serious FPS or MMORPG that uses DirectPlay.
This is probably related to the fact that FPS and MMORPG heavily rely on dedicated servers while RTS don''t. Of course, many people feel more comfortable running a non-Windows OS on their dedicated server, especially since they provide so powerful remote administration capabilities.
cu,
Prefect
This is probably related to the fact that FPS and MMORPG heavily rely on dedicated servers while RTS don''t. Of course, many people feel more comfortable running a non-Windows OS on their dedicated server, especially since they provide so powerful remote administration capabilities.
cu,
Prefect
Widelands - laid back, free software strategy
quote:
Original post by Prefect
Actually, RTS games are notorious for using DirectPlay.
I know Age of Empires and Age of Kings used DPlay, but they switched to straight UDP for Age of Mythology. Something about poor performance in DPlay... Keep in mind those games were funded by Microsoft. Do you know of any other specific RTS that uses DPlay? Those are the only ones I have read about using it commercially (but there may be others).
[edited by - fingh on August 7, 2002 2:32:25 PM]
As for speed, Direct Play is plenty fast from my experience. The only performance issue I am aware of is its optimization for broadband connections (it was built based on modem connections.) Microsoft is aware of this though and should be addressing it in the future.
Even if you use Winsock you are still going to have to implement the things DPlay does for you, such as packet handling, connection handling, timeouts, ordering, UDP, TCP/IP, etc. DPlay isnt really any "fatter" than fully functional Winsock code would be after you added in everything needed for game development. ** NOTE ** I realize you can make thinner code, that is not the basic point of my message.
As always, I suggest you try both methods for your development and make a determination on your findings. That is the only true way to answer the question of "which is better."
LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming
Author, Strategy Game Programming with Direct X 9 (Not yet released)
Even if you use Winsock you are still going to have to implement the things DPlay does for you, such as packet handling, connection handling, timeouts, ordering, UDP, TCP/IP, etc. DPlay isnt really any "fatter" than fully functional Winsock code would be after you added in everything needed for game development. ** NOTE ** I realize you can make thinner code, that is not the basic point of my message.
As always, I suggest you try both methods for your development and make a determination on your findings. That is the only true way to answer the question of "which is better."
LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming
Author, Strategy Game Programming with Direct X 9 (Not yet released)
LostLogicwww.GamerOutfit.comXBox 360 Community Games Reviews and NewsExisled - 2D/3D Shooter for XBox 360
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement