• Advertisement

Archived

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

Simulating a network on one machine

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

I''m interested in developing some multiplayer software, and I''ve already created a simple chatroom in DirectPlay. My problem comes in testing. If I''m connected to the net or on a network I can created two instances of my chatroom on one computer and connect them to each other. However, without the network connect they cannot detect each other. Is there anyway I can configure my system to believe it''s on a network (?make multiple ips?make a program to bounce back packets?). Any suggestions would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
I dont know what to do about having only one system, but if you have two systems you might consider getting a serial cable and using the Direct Cable Connection program that came with windows. It simulates a network, and I found it pretty useful before I actually put in a real network.

--TheGoop

Edited by - TheGoop on 3/3/00 4:50:15 PM

Share this post


Link to post
Share on other sites
The only way I can think of configuring a single computer like that is to put two network cards in and bind them to different IP addresses and link them to each other. Obviously it''s a lot easier to just get two separate computers than to deal with that kind of weirdness.

Possibly you can write a device driver to emulate a network interface and pass events over loopback to other instances of itself, but that is probably outside the scope you''re considering.

Share this post


Link to post
Share on other sites
I do all my testing on just one machine. You know the address you want to connect to: 127.0.0.1 is the IP address, and the port is whichever port your program allocates.

Provided each instance of your program allocates a unique port (and can determine the other instance''s port) you should be right. (I''ve never tried running two instances of a program that allocates a set port so I don''t know what would happen, but I imagine the second instance would fail?).

You mentioned DPlay in a peripheral sense, so I''ll just add that I know nothing about it.

-Hotstone

Share this post


Link to post
Share on other sites
Hotstone: Directplay binds on interfaces rather than TCP/UDP ports, so you can''t use the normal IP loopback address for debug effectively. Oh and two sockets attempting to bind on the same port *will* cause the second call to fail.

Share this post


Link to post
Share on other sites
Well, at the moment I can do some limited testing with my p120 laptop hooked up to LPT1, but eventually my laptops lack of a 3D accelerator will render testing impossible. If anyone else has any ideas I would still be interested.

Share this post


Link to post
Share on other sites
The ideal way to test you software is with the actual hardware, i.e. two computers hooked up together, if you cannot afford this expense, then look at asking a few people to help you out with testing it.
Although you baffel me, why, having (as you have said) been able to make it work on a network, do you want to try running it twice on your own computer?
Oh well, the worlds a strange place.
And while we''re at it, I have 2 test machines here with all the kit, so if you are desperate I''ll test it for you if you sent it to me.

Take it easy, they''re only suggestions

-Mezz

Share this post


Link to post
Share on other sites
I debug my DirectPlay apps on the same computer, but I only use IPX, because that works fine on the same computer, but if you want to test performance/lag and more advanced stuff, you should let someone else test it.

Share this post


Link to post
Share on other sites

  • Advertisement