First Start | Network Play | Configuration | FAQ | Bugs | Todo List | Changelog | Compilation

# Network Play

You can play Armagetron over a LAN or the Internet. It uses the UDP connectionless communication mode of the IP protocol, so make sure you have TCP/IP installed.

How does it work? The fastest computer in your network should act as the server. There, select your favorite game mode in the game menu and select the "Host Network Game" menuitem in the "Network Game" submenu. On the server, the game will run just as in single player mode.

The other computers will be the clients. On them, just enter the game menu and select the "Connect to Server" menuitem. Enter the IP adress (i.e. 192.168.42.1) of the server in the input field "Server Name" and select "Connect to Server". Alternatively, you can enter the server's hostname in "Server Name".

You are not limited to one player per computer as in other games; on each of them you can play with up to four people. In the precompiled version, there is a limit of 16 clients (=> max. 17 computers with 4 players each => 68 players! I wonder if this truly works...) ; if you compile Armagetron yourself, you can change that limit in the file "network.h". Just change the line

    #define MAXCLIENTS 16

to whatever you like.

If you are behind a (masquerading) firewall, you cannot act as a server. (Since your computer is then unreachable from the outside.) That is the only restriction; the clients may be behind a firewall. (I am, and I can connect to outside servers; of course, the firewall must not block Armagetrons network port 4532. The port will be configurable in one of the next versions.) Do expect heavy problems if you try to connect to a server through the same firefall with two computers at once (Note: it should work now, but I can't test it anymore...); if you need that, you will have to wait for version 0.2 wich will feature a proxy server for exactly that situation.

### The dedicated server

Following the model of Quake 1-3, there is a special binary version of the game available for download (or compile it yourself giving the option --disable-glout to configure) that has all input/output features disabled. If you start it, it will read the normal configuration file ~/.ArmageTronrc and set up a network game according to the settings in the game menu (Number of AI players, game mode and finish mode), and it will limit its output badwidth to the value set in the network game menu. A dedicated server takes input from the keyboard and interprets it just the way it does with the configuration files; additionally to the usual configuration files, the dedicated server will read the file `everytime.cfg` before each round; it may be comfortable to place quickly changing settings there. You can join the game on the dedicated server just the way described above.

The advantages of this solution are:

- there is no longer a "priviledged" player; all players are clients to the dedicated server.
- the dedicated server can use it's full computing power just to manage the game; it does not have to bother about input or 3d rendering. So, the game is a bit smoother for all players.
- the dedicated server should run on any UNIX; it does not need any special library installed (OpenGL, SDL, ...) that way, it is easy to set up public internet servers.
- The dedicated server uses very little CPU power: on my Pentium MMX 266Mhz Notebook it typically only needs 0.2 percent of the total CPU time, and it is content with about 4Mb main memory. So if you have a spare PC, no matter how old it is (a 386 with 8Mb total RAM should be enough), you can use it as a server.

I maintain a list of the dedicated servers I know of (usually: none) on this webpage.

### What the .... is Ping Charity?

This is the configurable part of my "equal ping" technology. In short, if you have low ping and your opponent has high ping (ping: the time it takes a message to travel from your computer to the server and back, usually measured in milliseconds), you can take over some of his ping to make the situation more equal, and stop your opponent complaining about your big advantage. So, if you have ping 60, your opponent has ping 160 and you set the ping charity to at least 50 (more does not change the situation), you will take over 50 ms of his ping, giving you both ping 110. If you set your ping charity to 20, you will end up with ping 80, your opponent with ping 140. Of course, you may be greedy and set ping charity to zero, leaving your world as simple as it is in other network games. I suggest leaving it at the default value 100.

Of course, there is a security problem; players may exploit this feature, using modified versions of Armagetron (perfectly legal thanks to the GPL; this is the point where other people's freedom can be annoying..), pretend they are poor ping 400 players (while in reality, they have a ping of, say, 90), and use your generousity to get as low as ping zero.
IF YOU PLAN TO DO THIS: Even a novice hacker will find out how in about 15 minutes, so noone wil congratulate you on your hack. PLEASE DO NOT SPOIL THE GAME FOR EVERYONE ELSE! Ahem... back to normal. If you suspect someone of cheating that way, try to talk him out of it. If that does not work, simply turn your ping charity to zero as long as you play with him. Maybe I will find a technical solution. Yep, found one that may make it a lot harder; so if this problem will appear someday, a simple server update should get rid of it in most cases...

How does that "equal ping" thing work? It is not that complicated, but for now, I rather keep the secret buried in the source code (too lazy to explain it right now...).

### Spectator Mode

In the player menu, there is the "Specator mode" toggle; If you just want to watch an internet game, connect to the server with spectator mode enabled. Note that you will be almost completely ignored in spectator mode: the other players won't know you are there at all, and you can't chat, the dedicated server will not bother to start a game if only spectators are online (all you are going to get is a black screen). Only the server administrator will get a message that a client connected.

### Scores

In a multiplayer game, every crucial action makes you gain or loose points; after

- a fixed number of rounds has been played
- a fixed time elapsed or
- a fixed score is reached

the player with the most points wins the match. If two or more players share the first place, the fight continues until there is a unique winner.
You can configure the score/time/rounds-limits in the file settings.cfg; scores and winners are logged in the file "scorelog.txt" on the server.

If you are the only person on a dedicated server, a special single player game is started (its parameters are determined in the SP_* variables in "settings.txt" on the server) to keep you busy until someone else connects; the highscores in this mode may be published by the server administrator.
The highest scores collected in a single player game are collected in the file "highscores.txt", the people with most won multiplayer rounds/matches are stored in "won_rounds.txt" and "won_matches.txt". A ladder (still experimental) is stored in "ladder.txt".

### BIG BROTHER

As in any software downloaded for free, you can't be completely sure whether Armagetron has secret functions that, for example, spy on your system internals, exploit known Windows bugs to get to your ISP's password, etc... and send this information to the author. Of course, Armagetron does not do such a thing, and you can check that in the sourcecode. You may even rely on the fact that someone else would find those hidden functions in the sourcecode, and I'll get into big trouble if that happens, so I it would be utterly stupid do do such a thing.
But Armagetron DOES send some information to me: If you connect to a server for the first time, Armagetron will send

- Your Operating system and Armagetron/SDL version
- the information the OpenGL system offers, telling me which graphic card you use
- if you are running Armagetron fullscreen or windowed

and nothing else, especially no personal information. I hope you understand that have a good reason to get this information. If you don't want to reveal these facts to me, simply edit your armagetron configuration file (artr.cfg or ~/.ArmageTronrc) and change
`BIG_BROTHER 1`
to
`BIG_BROTHER 0`
The information collected by the server is stored in the file "big_brother", so if you are running a dedicated server, I would be glad if you could mail me the contents of this file every once in a while.

### Internals

If you are interested in network programming yourself, you may want to read the network subsystem documentation.

This document was created by Manuel Moos.

Last modification: Fre Mai 11 19:47:14 CEST 2001

First Start | Network Play | Configuration | FAQ | Bugs | Todo List | Changelog | Compilation