Installing a network-capable version of The Ur-Quan Masters
Netplay is still in the testing phase, and there hasn't been a release yet which includes netplay. So to play netplay, you need the more recent developer sources. If you know how to compile the game yourself, you can just download the latest sources from CVS and compile as usual.
If you're a Windows user, there is an easier way to go:
- First, install the 0.5.0 release of the game as normally. Do not install any melee-altering add-on packs unless your opponent has them installed too. Otherwise the two parties would lose synchronisation and the game would be aborted. Audio packs should be ok though.
- From the CVS snapshots page download the latest precompiled binary (either release or debug; the debug version may give more information to help the developers if a bug occurs; the release version will be faster), as well as the latest content update.
- Unpack the downloaded file (you will need a program such as WinZip for this). You will end up with an
- Find the
uqm.exefile that came with 0.5.0, and replace it by the extracted .exe file (if you have
uqm-debug.exerename it to
uqm.exe). If you installed The Ur-Quan Masters in the default location, you'll find it in
C:\Program Files\The Ur-Quan Masters\).
- In the folder where you found the
uqm.exefile, there's another folder named
packages, which contains the file
uqm-0.5.0-content.uqm(and possibly other .uqm files for alternative music). Put the downloaded content update .zip file in here. DO NOT UNPACK THIS FILE!. The game knows how to read the files from inside the archive.
If you later want to upgrade, just remove the old content upgrade .zip file and redo steps 2 and onwards.
Setting up the network
Network experts can skip to the section "Settings Summary". For the others, read on, everything will be explained.
Every computer on the internet has an internet address, consisting of 4 numbers seperated by periods, like
18.104.22.168. Information sent over the internet is split up in packets, each packet labeled with the destination address.
A computer may also have a host name, like
uqm.stack.nl, to make refering to it a bit easier to read for humans. When information needs to be sent to a computer known only by host name, its address will first be looked up.
A computer may run many programs simultaneously which want to receive information from over the network. To direct packets to the correct program, the address will include a number known as the port number or port for short. The Ur-Quan Masters accepts packets sent to port 21837.
The little box which comes with most modern internet subscriptions is a router. A router is a device which passes packets to other computer.
Several computer may be connected to a single router, but usually there's only one internet address for one router (the public address). To be able to address the different computers connected to the router, the router gives them all a local address. Special ranges of address are reserved for use like this (192.168.x.x, 10.x.x.x and 172.16.x.x through 172.31.x.x); these addresses are not accessible directly from the internet.
When a local computer sends a packet over the internet to another computer, the router will replace the return address (which was the local address) with the public address, and send it along. And when a packet arrives from the internet, the router will change the destination address (which was the public address) to the address of the local computer for which it was destined. This relabeling is usually called NAT (for Network Address Translation).
And this is where the problems begin. How is a router to know for which local computer a packet is destined? The packet only comes with the public address and a port number.
When a local computer sends packets first, the router can look at the originating address and port and remember them, so that when a reply comes to the same port, it knows for which computer it is meant.
But if packets arrive from a computer over the internet out of the blue, the router does not know to which local computer it should direct them. (Even when there's only one local computer, most routers will just throw such packets away.) In this case, you need to tell your router explicitely where packets that match a specific pattern need to be sent to. For instance, you could tell it that packets that arrive for port 21837 should go to the computer with local address 192.168.0.2.
A firewall is a program which selectively blocks packets.
Many programs will have some sort of network functionality, more than you're probably aware of, some which are part of Windows itself. When packets arrive these will happily respond to them. But while you may want to share your files with another local computer, you may not want your neighbours to see them. And every program that is accessible could also contain a bug that could compromise your system.
This is where firewalls come in. They have rules which govern which packets are allowed to pass through unhindered, and which are blocked. And because it's better to be safe than sorry, firewalls usually block everything they don't know.
So when you're running a program that needs to access the internet, you'll need to tell your firewall to allow it. A firewall may be running on your local computer (Windows XP has one built in), but your router may also have one. And frequently both will. Both may have to be instructed to allow your packets to get through.
Finding out what your local address is
- from the start menu, select "Run..."
- type "cmd /K ipconfig" (on Windows 2000 and Windows XP), or "command /K ipconfig" (on older Windows versions)
- the line saying "IP address" will contain your local address. You can ignore the rest.
Finding out what your public address is
As your public address is sent as the return address everywhere you go on the internet, you just need to visit a web site that reports it back. http://www.whatsmyip.org/ will do. You'll see your public internet address in big letters on the top of the page.
Note that your ISP may give you a different public internet address each time your router asks for one (after a reboot of the router perhaps). Check, if you aren't sure.
Finding out what your hostname is
First, find out what your public IP address is. Then on Windows:
- from the start menu, select "Run..."
- type "nslookup" (the nslookup tool will start and prompt you with ">")
- type "set type=PTR"
- type your public IP address
- when the DNS server reponds, you will see something like
22.214.171.124.in-addr.arpa name = www.ibm.com
- the part after
name =is your publicly visible hostname.
If you're logged in on IRC (see [#Finding someone to play against]), you can use the command
/whois to find out what your hostname is. If your public internet address has no hostname, this will show your local address.
Telling your router to forward UQM packets
There are many different routers, so this section will not contain specific instructions. You will need to find your router's manual, or find information on the internet. Typically, you use a web browser to connect to your router's own local internet address. Often http://192.168.0.1/, http://192.168.1.1/, or http://10.0.0.1/. You'll probably need a password too.
When you're logged in, look for a section with a name like "NAT", "IP masquerading" (another word for NAT), or "port forwarding".
You'll need to tell it to forward packets addressed to port 21837 to port 21837 on your local address (see #Finding out what your local address is).
If the router configuration doesn't work with single ports, but instead takes a range of addresses to forward, just use the range "21837-21837".
If it wants to know a specific protocol (a class of packets) of packets to forward, use "TCP" (but The Ur-Quan Masters might use "UDP" in the future).
The Ur-Quan Masters will probably also use port 21836 in the future, so you might as well forward it too.
Telling your router's firewall not to block UQM packets
In the router's configuration menu (see above), look for a section named something like "firewall" or "packet filtering".
To allow incoming UQM packets, add a rule to pass packets from any address, from any port, to the public address, to port 21837. If it wants to know the protocol for the packets too, use "TCP" (but "UDP" may be used too in the future).
Your router will likely allow any outgoing packets, so you probably won't have to add a rule for that, but if you do, it would look like this: pass packets from the public address, from port 21837, to any address, to any port.
Telling your computer's firewall not to block UQM packets
This varies per firewall software.
Using Windows XP's own firewall (be sure you have the latest Windows XP service pack installed), you will get a popup dialog when a program first tries to send packets, or begins to listen for incoming packets. Just start UQM, try to establish an incoming or outgoing connection as normal (see below), and when you get the popup, allow the incoming or outgoing connection attempt, and you'll be set.
Ports used by The Ur-Quan Masters:
- TCP port 21837
- (reserved for the future) UDP port 21837 (not currently used)
- (reserved for the future) TCP port 21836 (not currently used; for the meta-server)
Alternative: Using Hamachi
Hamachi is a program which can usually obviate the need to do all the network settings above. It is also the best way to play against someone on another network if you router does not have port forwarding.
The disadvantages are that you can only play against other Hamachi users and the increased network latency (and so the need for a higher netdelay)
When you run hamachi, you will be given a private IP address that you can use as if it was a direct connection. It also comes with a chat feature, so you can chat with other hamachi users. For netplay, use this room:
Network Name: UQMultiplayer1 Network Pass: Fwiffo
If that room is full, use this one:
Network Name: UQMultiplayer2 Network Pass: Fwiffo
Finding someone to play against
The IRC channel #uqm-arena on irc.freenode.net is a good place to find people to eat your flaming plasma death.
Running the game
Starting a netplay game
When it's not working
If you cannot establish a connection
This is usually caused by a routing of firewalling problem. See above.
If you are disconnected with a "version mismatch" error immediately after connecting
This will happen when the local and remote versions of The Ur-Quan Masters aren't compatible with eachother. Both players should upgrade to the latest version.
If the game aborts immediately after starting the battle
This usually happens if one player has installed some melee-affecting add-on, while the other player has not.
It can also happen if one player isn't using the latest content upgrade to go with the UQM version he is using.
Netplay is still in the testing phase, so don't be surprised by the incidental crash or disconnect because of loss of synchronisation. See #If you've found a bug.
If you've found a bug
Bugs should go to the project's Bugzilla bug database. Be verbose.