How To Start A Network Game

Join a game (client)

Contrary to popular belief, it is not necessary to set up port forwarding on your router, or to open up ports on your firewall, if all you are interested in is joining as a client on a multiplayer game.

Instead, start the simulation and select “Network” from the opening screen. Enter your initials or identity (up to four characters) on the page that first appears. Next, click the Client tab or button. At this point you will need information supplied by the host: the IP address and the port number. The IP address will either be of the form of four numbers separated by full stops (e.g. 82.147.22.17) or a name (e.g. www.simsig.co.uk). Don't try those examples: they won't work. The port number will usually be 50505, 50507, or 4321, but may be any number between 1 and 65535.

Once completing the information, a request will be sent to the host. The host will be informed of your IP address and your initials or identity. The host has the option of accepting or rejecting your request.

  • If he accepts then you will be sent the simulation states (what aspects the signals are showing, which tracks are occupied, etc) which may take a minute or two depending on the speed of the Internet connection. Do not try to do anything until the message “update from server complete” has been received.
  • If he rejects then you will be informed of this and returned to the starting screen.

Host a game (host)

Preparation

In order to host a multi-player game, the other players must connect to your computer over the internet. To do this they require two pieces of information. The first is your IP address, which is allocated to you by your ISP (BT, AOL, etc.): this allows the other player's computer to uniquely identify your computer. Secondly, they require a port number, which identifies what it is on your computer they wish to connect to (in this case, SimSig).

In the case of SimSig, the port number for some sims is configurable, for others it is fixed.
(*how to set/find port number*)

Finding your IP address can be more complicated. As a first step, visit www.myipaddress.com . This will identify the IP address of your internet connection. This is the address you will need to supply to the other players. In the good old days of dial up, this was usually the only address that mattered. These days, with broadband routers allowing you to connect multiple computers to your internet connection, there is often another step required. If your web browser is set up to use a web-proxy (or your ISP has a “transparent” web proxy) the address shown will be that of the proxy server and not your IP address. You will need to find your actual IP address in your router configuration page. You want (for now) the “external”, “WAN” or “Internet” address.

Hosting games using routers explains how to set up your router.

The reason that this is important is because when the other players initially connect to you, your router won't know which internal address to send the connection to - does it need to send it to your desktop computer, your laptop, your iPhone, your Wii, or your fridge? As a result you need to set up a “port forwarding” rule, to tell the router to accept all incoming connections to the SimSig port (identified above) which arrive addressed to your “external” IP address (also identified above) and forward them to the internal address of your PC.

The specifics of configuring your specific router or firewall to forward and allow, respectively, the appropriate connections is beyond the scope of this quick guide as each router is different, but as this is quite a common requirement there will usually be documentation describing how to do this.

If you are trying to host a SimSig game on a corporate network (e.g. at work, or using a Wi-Fi hotspot) it may not be possible, as you will not usually be able to make the necessary configuration changes to firewall and port forwarding rules.

Port Numbers

The newer SimSigs allow you to choose your own port number. The allowed range is 1 to 65535, however, two ports are predefined for ease of use: these are numbers 50505 and 50507. The logic behind this lies in the old bell codes sent between signalboxes - this article will leave it up to the reader to decipher them by replacing the zeroes with hyphens (5-5-5 and 5-5-7).

Older simulations had a fixed address of 4321.

TODO:
- SimSig port numbers
- dynamic IPS - dynamic DNS providers
- DHCP leases

Broadcasting IP addresses

There is a very small risk with advertising your IP address. If you have appropriate protection software such as Norton, AVG, or any other Internet virus and malware protection then you should be ok. Most hackers will test a range of addresses anyway, so advertising your particular address doesn't matter because they'll find it very easily anyway.

This is not to alarm you but to alert you to the potential risks of opening up ports. It takes a combination of events for anything bad to happen, and SimSig neither improves nor degrades that potential.

"Static" IP names

It is possible to host a website on your computer even if your Internet Service Provider (ISP) dynamically allocates you an IP address - in other words, your ISP can change your IP address from 1.2.3.4 to 5.6.7.8 without telling you. When you're browsing the Internet this process is invisible and irrelevant; however, if you regularly host SimSig games then you will need to check your IP address each time before offering to host a game - otherwise people will not be able to connect to your computer.

To solve this problem there are websites which offer a static domain name that automatically resolves to the correct IP address. For example, http://www.no-ip.com/ allows you to have a fixed name such as dave.no-ip.com which you can tell your clients and know that whatever IP numeric address you've been allocated, you IP text address will always stay the same. You need to run a small piece of software on your PC for this to work.

Chaining Sims

To chain two simulations together, both simulations need to be in “hosting” mode. Start the simulation as if you were starting a host game. Next, from the Multiplayer menu, select the “Connect to External Signalbox” option. This brings up a window allowing you to select which signalbox to connect to, its IP address (or name), and the port number.

As with clients connecting to a host, the Host of the other signalbox can reject your connection attempt.

/home/simsig/public_html/dokuwiki/data/pages/usertrack/ssrun/start_a_network_game.txt · Last modified: 2012/06/13 19:49 by peter_bennet
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki