Archived

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

Tank2k

Beginning multiplayer programming

Recommended Posts

Sphet    631
Tank2k,

Almost all implementations of TCP/IP have a loopback address. This address is most commonly "localhost", or 127.0.0.1. Give it a try; ping localhost, and it should work fine. This is the best tool for testing on single machines. I don't know what the issues involving testing DirectPlay might be, but for those of us who write network applications, localhost works great. You can run the server, and then run multiple clients and connect to localhost:port, and it works fine. As for multi-player games that operate without a server, but open connections to each of the other players, you'd have to be able to set each instance of your program to be able to use a different port. It isn't hard. Don't forget though that the packet speed is going to be much slower in real-world implementations.

As an aside, the loopback mechanism was used (and still is) for inter-process communication in some applications.

Share this post


Link to post
Share on other sites
Tank2k    122
I would like to know what options are available for a person
who wants to start to learn multi-player programming, but only
has access to one computer?

Is there something available that can emulate networking or
perhaps loop back information on one computer?

-Tank2k

Share this post


Link to post
Share on other sites
Tank2k    122
Thanks! This is turning out to be easier than I expected,
even though I spent about an hour trying to figure out how to
download the winsock2 update from Microsoft's website.

It's here if anyone wants it: http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/default.asp

You know it worked when you see WS2_32.DLL in your Windows
Systems directory. It's only for Windows 95, BTW.

-Tank2k

Share this post


Link to post
Share on other sites