Jump to content
  • Advertisement

Archived

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

Azrael

What to do first?

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

If you don't have any experience with Winsock, I think your best bet would be to start with DirectPlay. It will give you a chance to understand the methadology behind multiplayer gaming (ie. game packets, latency, messaging, etc). Once you have that done, you can look at Winsock (Windows) and BSD Sockets (*NIX). HTTP is a protocol that works over TOP of TCP/IP (Winsock/BSDSockets), so it should be left for later. It is relatively simple once you know how to handle TCP/IP.

I would try doing something simple with DirectPlay (not a game, just some chat code, or something) and then try to build it from scratch using Winsock. You'll see the pitfalls, but also see how nice it is to be able to tailor your work. (Also affords you portability if you don't use any of Winsocks WSA_ calls [except init and shutdown]).. anyways, good luck!

Share this post


Link to post
Share on other sites
Advertisement
I don't see any particular advantage in DirectPlay (I'm currently using it in my DX based game, but if I were to do it over again, I would use std sockets). The + in DirectPlay is supposed to be the "transparent" support for multiple protocols. Only problem is, it is not transparent (and besides, who cares about anything but TCP/IP these days?)... On top of that, all the nifty features such as latency calculcation works like sh*t...

Just mho.

/Niels

Share this post


Link to post
Share on other sites
I think one of the easiest ways to get started with network programming is to do TCP/IP socket programming in Java. Java has a very simple socket interface and there are a ton of samples out there.

Once you get a handle on the concepts you can move to Windows sockets or BSD sockets in C++/C. The concepts are generally the same, its just a more complicated syntax.

I would NOT recommend DirectPlay for someone just starting out. It is probably the worst designed interface of all the DirectX components, and the documentation is bad.

------------------
-vince


Share this post


Link to post
Share on other sites
Hmm just gonna add my opnion about directplay. You really want to spend the time writting tcp/ip,upd(not hard ive done it in winsock myself)IPX(very popular i hear winsock 2.2 can maybe do it? But then again win95 doesnt ship with 2.2..)Modem (still popular),and finally Serial(very popular for ppl that want to bring over there comp and play a quick game ect.)

So even though dplay might have some pitfalls i say its very usefull.

Share this post


Link to post
Share on other sites
I agree DPlay has advantages over pure socket programming, but I don't recommend it to someone who is just starting out with network programming. The docs stink.

I stand by Java sockets as the easiest way to get started with network programming - moving on to other things such as DirectPlay can be done later.

------------------
-vince


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Java Sockets? That sounds great! I already know a bit about java programming, where can I find more info about them? how do they work?

Share this post


Link to post
Share on other sites
Just a footnote: Any object reference in Java IS a pointer (you just don't get to do all the dangerous stuff with it, that you do in C++ )

/Niels

Oh, and garbage collection rules !!

Share this post


Link to post
Share on other sites
Garbage collection is nice, but that's just because we don't expect Java to be high performance. If we didn't expect C++ to be high-performance, we'd just new memory (or malloc) and never bother to delete/free it. The operating system would clean up for us When we get to high performance apps, we want to control our garbage collection explicitly, because there are times we can afford to clean up while other sutff is running concurrantly.

- Splat

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!