Skip to main content
GameDev.net gamedev.net
🔒 Locked

Beginning multiplayer programming

Started by Tank2k Sep 26, 1999 at 5:13 PM 1 replies 1.5k views
Original Post
Tank2k
Tank2k
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

Sphet
Sphet
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.

Tank2k
Tank2k
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.