Jump to content
  • Advertisement

Archived

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

SpaceDude

DirectPlay vs TCP/UDP ?

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

Sorry if this question has been asked 1 million times before... But how would you rate DirectPlay against TCP/UDP? I''ve previously written a realtime game using the TCP/IP protocol, I remember there was a fair deal of manual work involved screwing around with multi-threading and what not. And i wasn''t entirely satisfied with the results (was a little laggy at times). I''m working on a new game, and i''m almost at the stage where i would like to implement multiplayer functionality. This time, the realtime aspect is not so critical, since its a 3D pool type game and each player takes turns. I would still like the actions of one player''s shot to be visible for the opponent but it doesn''t matter if there is a 1 second delay for example. I am considering using DirectPlay, but i haven''t found a lot of tutorials on it. And it doesn''t seem like its a very popular thing. So whats the deal? would i be better off managing the connections manually using TCP/IP or UDP rather than DirectPlay?

Share this post


Link to post
Share on other sites
Advertisement
TCP/IP is a suite of protocols which includes IP, TCP, UDP, etc. Your thinking of TCP(not TCP/IP) and UDP.

To answer your question, go with TCP or UDP, not both. If you require semi-reliable transport then make your own wrapper for UDP. Forget DirectPlay.

synth0id

Share this post


Link to post
Share on other sites
Ok, I wasn''t planning on using both UDP and TCP. What i meant was, i see DirectPlay as being one level above UDP and TCP. So i was grouping UDP and TCP as being on the same level. So the original question was should i go with DirectPlay or go with TCP or UDP (not TCP and UDP).

I understand the differences between TCP and UDP, but what i''m really interested in is knowing how good (or bad) DirectPlay is for network gaming. If it means i can spend less time coding and get virtually the same performance out of it then i guess its worth it.

Why do you say forget DirectPlay? have you used it before and didn''t like it?

Share this post


Link to post
Share on other sites
I''m going to change my tune a little with this response:
spacedude - first, this question has been beat to death on this forum, check the FAQ, and use search to find more info that you will want to read.

Second, I''d say it depends what area of gaming you want to focus on. If you are not working on a commercial game, and prefer graphics programming over tinkering with the network specifics, then I''d say use DirectPlay or some other high level wrapper. If you plan to work on commercial multiplayer games, you need to understand networking and the BSD socket interface at some point. I''d suggest learning socket programming using the BSD interface (i.e. don''t use the windows specific IO models). Once you understand the low level networking concepts, then go ahead and look into asynchronous IO models, or whatever you want to do. If you are just working on hobby stuff that doesn''t require insane performance, go with DirectPlay.

Share this post


Link to post
Share on other sites
I''m not understanding this - why the ''use TCP or UDP but not both'' statement? I''ve read it in a few places, but never any actual explanation as to why. Also, when I mentioned it I was told by someone who seemed to know what they were talking about that there was no reason not to use both simultaneously.

So, what gives?

Share this post


Link to post
Share on other sites
I have used DirectPlay7 for my last game: a first person shooter. One time, I have play with ten of my friends without very-hot-lag.

Share this post


Link to post
Share on other sites
Thanks fingh for answering even know it has been beaten to death... admitedly i didn''t do a search before posting :x. I saw a lot of posts when i did though, i''ve read through the most relevant ones... They all seem to date back a few years tho so its good to know whats changed since then.

I''m having a tough time deciding... Networking is not the most important aspect of the game for me, but i don''t want it to let the rest of the game down, i''m pretty happy with how things are going at the moment. I''m mainly interested in the physics side of things, graphics second. Then ai, sound and networking is something i see as a bonus to tack on at the end

I''m a little bit reluctant to use DirectPlay after seeing this post:

http://www.gamedev.net/community/forums/topic.asp?topic_id=45843

but then again a lot of other ppl on the forum said they love DirectPlay in other threads.

This is just a hobby for me really, i already have a job in engineering that involves a lot of programming but who knows maybe someday i''ll try make some money out of it.

I think i''ll go with DirectPlay since i''ve already done TCP before... then i''ll be able to decide for myself what i like better at the end.

Sorry for rambling on..

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!