Game Development Community

unable to get network client/host working

by Donald Teal · in Torque 3D Professional · 11/03/2010 (11:08 am) · 2 replies

I am either forgetting something major or something simple but her goes.
in 1.1 b3 using the full template I have created a new project for testing
and need to have networking functioning. not trying to use dedicated server yet.
just Client as the host over network not just over LAN. the only thing I remember doing before was in
/core/scripts/gui/chooseLevelDlg.cs changing LN14

createAndConnectToLocalServer( %serverType, %mission );

to what it was in 1.0.1

// createAndConnectToLocalServer( %serverType, %mission );
   createServer(%serverType, %mission);
   %conn = new GameConnection(ServerConnection);
   RootGroup.add(ServerConnection);
   %conn.setConnectArgs($pref::Player::Name);
   %conn.setJoinPassword($Client::Password);
   %conn.connectLocal();


any advice on this would be great.

EDIT: the client/host load and runs while sending and receiving heartbeat from master server.
then try to connect to if from another machine with query master and get no servers found.
Although it does show up with query LAN.

#1
11/08/2010 (8:20 pm)
just a little update on this. the networking is working but when I use 2 machines on the same network the match only shows up on LAN. Is there a reason for this?
#2
11/14/2010 (6:51 pm)
Taking a stab in the dark here--networking has a lot of dependent variables and everyone's situation and setup is different.

The clients external to your LAN need to know where to look for a master server which knows about the game host running on your LAN, presumably on an internal IP address valid only on your LAN and invisible to the outside world at large.

I found it easiest to learn how to run my own master server on my LAN, then hook a domain name up to the static IP which represents my network to the outside world.

One has to configure the client and server preferences files to look at that domain when looking for a master server. Game hosts fired up on my LAN point to it and register themselves as servers on the internal IP addresses generated by the router.

Having a static IP helps a lot with this, but if you don't try this handy dynamic dns infomatic at Wired for some hints how to get around it.

Clients fired up outside my LAN resolve the domain name to the IP of my network, and my router is port-mapped to send traffic arriving from the outside world on the master server's port to the master server itself on the internal network IP.

By searching here on the Torque site, one can find information on a variety of master server implementations. If you aren't ready to run a master server, Sean Rice kindly offered his servers here recently.