Jump to content
  • Advertisement

Archived

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

civguy

Heh, Sweeney's opinion on DirectPlay

This topic is 6507 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

In case you haven''t seen this: --------- Mark - Another question for ya. Same thing, Winsock VS DirectPlay8 I don''t know of any games using the new DirectPlay8 (Which was completely rewritten). Any news on that? Does DirectPlay actually use Winsock itself? Tim Sweeney - The answer here is much easier. DirectPlay is a bloated heap of junk kept alive by who-knows-what internal political forces at Microsoft. Everyone wishes they''d just kill the thing. Windows Sockets (the other Microsoft networking API, by the way!) is much better. All of the other DirectX8 components are excellent, though: Direct3D, DirectSound, and DirectInput.

Share this post


Link to post
Share on other sites
Advertisement
I am not surprised...

I have just begun looking into DirectPlay...

Just initialising the damn thing and selecting which service provider(TCP/IP) to use is a major pain in....something...

419 pages of crappy written documentation...

I´m probably switching to sockets...If I can find some good documentation on that...

Share this post


Link to post
Share on other sites
It took me only a couple hours to get DirectPlay going using dpconnect.cpp included with the SDK and then a few days to get it working efficiently. The basic source for DirectPlay hasn''t changed in months for my project and I can add message types as I need them. I think I''ve read a total of 3 pages out of the SDK manual.

I think it works great. To answer the question DirectPlay is pretty much just prewritten Winsock functions with some extras thrown in to make it more secure and a little easier to use.

Ben
http://therabbithole.redback.inficad.com



Share this post


Link to post
Share on other sites
Only 3 pages ? Thats amazing...!
Dpconnect must be a very advanced demo.

I have trouble finding out how to surpress the serviceprovider dialogs. The info is in there but I don´t think that is is very well written...

What I hate about DX in general is that when you look up some function it always has some unknown struct it wants passed. Then you look around the documentation for that struct. Oh dear in the unknown struct there is another unknown struct. Better go look that one up too.

About security...As DirectPlay is based on sockets how can the security be better in DP ??? Ok maybe is requires more work using sockets but I would assume that the same level of security could be achieved.



Share this post


Link to post
Share on other sites
quote:
Original post by granat
About security...As DirectPlay is based on sockets how can the security be better in DP ??? Ok maybe is requires more work using sockets but I would assume that the same level of security could be achieved.


Seeing how "secure" Microsoft''s server programs are, I wouldn''t trust on it as blindly as KalvinB does

M$ may be saying that DP is top security and super fast, but it''s bullshit according to those who have actually compared DP and Winsock.

Share this post


Link to post
Share on other sites
If I know the IP and port I can connect any client I want to your Winsock server. With DPlay you can''t even see my server unless you have the 128bit key. Sure you can set something like that up with Winsock but with DPlay it''s just there.

Then there''s guaranteed messaging. With DPlay it''s actually guaranteed to get there, in order and 100% in tact. How long does it take to set that up with Winsock?

BTW. dpconnect.cpp isn''t a demo. It''s a set of the standard functions already to go to initialize DirectPlay. It''s like D3DUtil.cpp and others. It allows me to not waste time reinventing the wheel.

The service provider dialogs are an MFC problem, not DirectPlay. Just by looking at the source in dpconnect I figured out how to make them do what I wanted. It''s really not that hard.

Have you compared Winsock to DirectPlay? I have and I went with DirectPlay because for me it''s a piece of cake to use and it''s fast. It''s only as bloated as you make it.

If you want as manual that isn''t long and describes every detail of the language go pick up a TI-85.

Ben
http://therabbithole.redback.inficad.com








Share this post


Link to post
Share on other sites
Having quite a bit of expirience in both WinSock2 and DirectPlay, here''s my 2 cents:

TCP in games in not a good idea, as TCP has a nasty habit going into a "lag" mode. Basically if it can''t send something from the first couple of attempts, it slows down. I am sure you all expirienced this behavior while browsing: you access a page, browser says "connecting..." and then stalls forever, you press refresh and voila - page is there. What happened is that TCP socket was in "lag" mode and refresh kicked it out of it.
Also, TCP is stream based which is not convinient for games.

UDP is fast, packet-based but unreliable. Enough said.

DP, on other hand, gives you reliable UDP (or fast, packed-based TCP - whichever way). This simply doesnt exist in Sockets.

Another neat feature of DP is enumeration of games, and yet another one is a connectivity to GameZone and such.

I believe, DP8 has built-in speach communication.

ETC.

Yes, DP is a bitch to set up and documentation is bad, but to be honest learning curve with Sockets is also very steep. I am not talking about blocking "ping" or "gettime". Once you have it set up it gives you tons of features that dont exist in Sockets.

I think Tim was a bit too harsh about DP and his opinion was probably based on DP3 or something.

Cheers!
Meduzza

Share this post


Link to post
Share on other sites
I learnt the basics of using unix domain sockets (sockets, as in winsock) with tcp/ip in, hmm, less than two hours. I haven''t tried DP but learning how to use sockets is a breeze. Having that said...

DirectPlay is not portable!!! Ek, so don''t even consider it I would have to run my server on...on a...*shudders* Windows server! hehe
While sockets port to pretty much any system, even Windows - only you gotta call WSAStartup and use closesocket rather than just close.

"DP, on other hand, gives you reliable UDP (or fast, packed-based TCP - whichever way). This simply doesnt exist in Sockets."

TCP is packet based, so is UDP. UDP is reliable in the way that if and I say IF the packet arrives at the destination it''s intact. TCP also ensures it''s going to arrive in the correct order, i.e. "Hello" "World" rather than "World" "Hello" (and of course you don''t have to bother ACK''ing everything manually ).
Now to the actual point - if you choose TCP/IP as your service provider (read not IPX, not modem, not serial/parallel) won''t it just sit on top of a socket? Right.
Secondly TCP is pretty much reliable UDP now isn''t it (I''m sure connections have their role here), if you make a new secure-udp protocol you''ll loose speed - there''s no doubt what so ever about it.


"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album

Share this post


Link to post
Share on other sites
I''m currently running a DPlay MMORPG server off my Win2k Pro box and there have been no problems. Apache is plugging right along as well.

It''s a 333mhz AMD k6-iii w 352megs of ram. It hasn''t crashed once since it''s been up. I started running it around February this year.

Ben
http://therabbithole.redback.inficad.com





Share this post


Link to post
Share on other sites
quote:
Original post by Meduzza

Having quite a bit of expirience in both WinSock2 and DirectPlay, here''s my 2 cents:

TCP in games in not a good idea, as TCP has a nasty habit going into a "lag" mode.

...

UDP is fast, packet-based but unreliable. Enough said.

DP, on other hand, gives you reliable UDP (or fast, packed-based TCP - whichever way). This simply doesnt exist in Sockets.




I think this is what you meant, but just to clarify, everything that is offered in DP is possible in sockets because DP is built on top of Winsock. It might take some work to implement, but it''s certainly possible to implement reliable UDP with sockets... or it wouldn''t be a feature in DP. However it''s quite true that things like reliable UDP aren''t an out-of-the-box offering of Winsock.

Share this post


Link to post
Share on other sites

This topic is 6507 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.

Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!