Archived

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

Salec

Dplay 8 vs. custom tcp/ip or udp

Recommended Posts

Hello, I am just curious as to what would be the better path to take? Should I use DirectPlay 8 or write my own custom routine using tcp/ip or udp? This is for an engine that my group is creating. This engine can be used in a wide variety of ways. This engine is not focused for just role playing games or first person shooters..or even games for that matter. It would help alot if someone could list the pros and cons of using dplay vs using something else. This engine is not just for windows also. It will be ported to many other Operating systems and even game consoles. Thanks alot -Salec

Share this post


Link to post
Share on other sites
If you are going to be porting your code to other platforms including consoles then the answer to your question is pretty clear. Use tcp/udp since this is a cross platform API. If you use directplay then you are stuck to windows and the directx api.

henry

Share this post


Link to post
Share on other sites
Thats pretty much what I figured. Do you know where I can get some more information on UDP and creating a protocol similar to it? It seems everywhere I look, there is only information on tcp/ip.

Thanks alot

-Salec

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
what about if you are only sticking to windows? Is it better to use Dplay or your own custom? What would be the pros and cons?

Share this post


Link to post
Share on other sites
Um, why are you wanting to use UDP? I thought they were unreliable? At least that is the impression I get from all these Winsock tutorials. Why don''t you use TCP, stream sockets, or is that only for internet? (Well, it makes sense that TCP/IP is for internet, IP meaning internet protocol, but is there anything else that is TCP...as in TCP/___?)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
this was an older thread. I just wanted to know what was better for network code for windows. (for tcp or udp) Is it better to use dplay or your own custom code?

Share this post


Link to post
Share on other sites
UDP is part of TCP/IP. TCP, UDP, & ICMP are protocols (among others) within the TCP/IP suite.

DirectPlay offers a priority queue, UDP based, selectably garuanteed packet delivery. It also lets you make your game ''lobbable'' for use on things like GameSpy (not that they likely to add your game to their list).

If your porting I won''t consider DP. It''d be more trouble than it''s worth.

Magmai Kai Holmlor
- Not For Rent

Share this post


Link to post
Share on other sites
If i were you i''d go the hard way and do it TCP and/or UDP. Its just much more fun than Dplay. You''ll learn alot of basics that will help you if you later on want to try Dplay instead.

Share this post


Link to post
Share on other sites
Taile,

You would use UDP because it will be far faster than TCP. The guaranteed nature of TCP makes it much slower by comparison. Also, even on Windows, I would avoid DP and go for a custom Winsock library. Consider the advantages of IOCP and other new features of Win32. These features don''t scale well to UNIX platforms, but there are some tweeks that allow similar performance. Your code will not be portable either way.

Share this post


Link to post
Share on other sites
FYI: The underlying DirectPlay service providers for TCP/IP and IPX/SPX use IOCP when available.

I used Directplay for my network library because I have no desire of portability.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Im only developing for windows, but i''ve tried programming UDP before. It was fine at first but it became pretty hard when it got to the message throttling and a bunch of statistical things. Ill just tell you, directplay 8 in my opinion is much easier and since theyve rewritten the sucker, its just as fast. Besides, most people play games on windows so why even worry about porting?

Share this post


Link to post
Share on other sites
For me, I am going with my own Network engine. I plan on porting my code to UNIX( SUN Solaris) and Linux(Playstation 2 Linux.) about TCP vs. UDP. As stated earlier, you''ll want to use UDP for a game because packets are delivered faster, but you can get severe packet loss of course. With TCP, your packets are garanteeded to be delivered, but this could slow down performance. Even under windows, I prefer to write my own network engine using sockets. You''ll learn more about network programming and theory that way. As I stated earlier, UNIX is actually my main developement OS over Windows XP(well, it getting there), so portability is important to me.

Edem Attiogbe

Share this post


Link to post
Share on other sites