Armagetron Advanced: Documentation
Author: Manuel Moos
Date: 2019-04-22T14:25:52+01:00

First Start | Installation | Network Play | Configuration | FAQ | Redistribution

# Configuration

All the normal user settings of Armagetron Advanced are configurable in the menu system. Since it is quite easy to get lost, here is a (not always up-to-date) map of all submenus (the menu items have an auto help display below if you don't touch any keys for some seconds, so to let you keep the overview here, I omit the simple items):

#### Main Menu

- Game (start and setup a game)

- Local Game (Starts a local game)
- Network Game (Connects to or creates a network game)
- Game Setup (Sets your favourite single player game mode: number of AI opponents)

- Player Setup (Player customisation: keyboard input, camera setup, multiplayer mode on one computer)

- Player 1-4 (the settings for this player)

- Input Configuration (keyboard and mouse setup)
- Camera Input Configuration (keyboard and mouse setup for camera controls)
- Camera Setup (camera mode options)
- Instant Chat (things you can say with one keystroke)

- Assign Viewports To Players (which player sees himself on which part of the screen)

- System Setup (Configure sound)

- Display Settings (screen resolution and graphic details/preferences)

- Screen Mode (resolution and windowed/fullscreen selection)
- Preferences (things that depend more on your personal taste)
- Detail Settings (things that affect visual quality and depend on your system's OpenGL power)
- Performance Tweaks (settings that increase graphics speed, but may not work on your system)

- Sound Settings (sound quality)
- Misc Stuff (things that did not fit anywhere else: Moviepack, console text output, menu wrap option and global keyboard configuration)

- Global Keyboard Configuration (keyboard setup for player-independent functions (console, scores))
- Language settings (Choose the language of Armagetron Advanced here)

### Game Rule Settings

Some of the maybe less obvious game settings in "Game Setup" available since version 0.2 are explained here:

- The AIs come in various intelligence grades. Select it in the "AI IQ" menu item.
- Explosions can blow away walls. Select in "Blast Radius" how much destruction they bring.
- Cycle walls can be of finite length (a la snake). Choose in "Wall Length" how long they should be.
- The delay between the a cycle explosion and the disappearing of its wall can be configured in "Wall Delay".
- Arena size and overall game speed can be adjusted in "Arena Size" and "Speed". Note that the setting here is logarithmic; that means that by increasing the value by 2, you double the arena size/game speed. by increasing the value by 6, you multiply the size/speed by a factor of 8.

Only important for multiplayer games:

- Limits on the number of teams and the number of players per team can be set in the "Min/Max teams/players per team" settings.
- You can control team ballance with the "Max imbalance" and "Ballance with AIs" settings.

## Debug Recording

Armagetron Advanced supports recording whole program sessions for debugging and performance tuning.

### Usage

To record a program session, use the command line parameter `--record <filename>`; this will store the recording in the file `<filename>` in the current directory. A suggested file extension would be `.rec`.

To playback a recording, use the command line parameter `--playback <filename>`. If you want to skip ahead to the interesting part, you can do so by giving the additional parameter `--fastforward <time>`. While playing back a client session, the current time will always be displayed in the upper right corner of the screen.

During playback, input from the keyboard is not disabled. You can use it safely for nonessential input, like controlling the camera or toggling the score display. However, issuing cycle turn commands is likely to break the playback. It is possible to combine both playback and recording arguments on the command line; this gives you rudimentary recording editing possibilities.

The command line switch `--benchmark` plays the recording back frame by frame as it was recorded and give performance statistics at the end of the run. Without this option, the playback will try to match the real speed.

On MS Windows, to give the Armagetron Advanced command line arguments, open up a command console (aka dos box) and type (if you have installed Armagetron Advanced into E:\Program Files\armagetronad):

    E:\
    cd E:\Program Files\armagetronad
    ./armagetronad <command line arguments>

But you don't have to go through that hassle; there are three start menu entries that record to a file on your desktop and play it back normally or in benchmarking mode.

### Background

Recording works by storing all external input (keypresses, time measurements, file reads and network traffic) in a file and feeding the stored input to the program on playback. Due to the purpose and the implementation, there are limitations: It is unlikely that a recording done with one version will play back on another version. It often happens that even with the same version, different builds (Windows vs. Linux, different GCC versions used to compile, PC vs. Mac, Debug vs. Optimized) produce incompatible playbacks because of subtle differences in the way numbers are treated by different processors, compilers and operating systems.

### Protect Your Passwords

Since all network traffic is logged and the ingame admin password is currently sent unencrypred, it is not a good idea to publish server recordings where you or anyone else logs in as admin. The same holds for a client session recording where you log in anywhere; remember that all your keypresses are recorded without exception.

### Primary Use: Bug Reports

Sometimes, when you report a bug, the team may ask you do send a recording of the bug happening. It is then most useful if you do your recording while you have VSYNC enabled in your video driver settings (so your framerate and the rate of recording is limited by your video refresh, which makes the recording smaller and faster to fast forward through) and spark rendering disabled. Please try to make the bug happen as soon as possible. Because of the limitations of the recordings, we'll also need to know the exact version and build you are using. A screenshot or even a series of screenshots edited by you that show us what you think is wrong also helps greatly; if you make them while playing back your recording, we have the added benefit that we see the timestamp and know where to fast forward to.

### Secondary Use: Demo Recording

If you want to use a recording to show off, it is best to do record it on the client in a network session even if you just want to demonstrate your superior AI killing ability. This increases the chances for compatibility greatly because all game physics decisions are made on the server and stored in the recording in the form of the network traffic. Keep the limitations in mind, though; it is not a bug if this recording does not play back on anything but your own machine and the exact version it was recorded with.

## Advanced Configuration

Take a look at the files settings.cfg and settings_dedicated.cfg for the dedicated server (best save all your changes to autoexec.cfg if you don't want the next release of Armagetron Advanced to overwrite them). They contain a lot of settings inaccessible from the menu system. All relevant settings are synced from the server to the connected clients. You can place comments preceeded by `#` anywhere in these files.

The settings that affect only the visual appearance (`FLOOR_*` ...) are not transferred; It stays a matter of taste if you want the floor red or yellow.

### Game Physics

#### Speed

The game is too slow for you? Then play a bit with `CYCLE_SPEED` and all the other nice variables and see what happens. Not all possible setting items are included in these files, you can add everything you find in this unsorted document.

The base acceleration in an open field is

    (CYCLE_SPEED-current speed) * f

where f is `CYCLE_SPEED_DECAY_BELOW` if the current speed is smaller than `CYCLE_SPEED` resp. `CYCLE_SPEED_DECAY_ABOVE` if it is bigger. The effect is that the cycle's speed will approach `CYCLE_SPEED` over time. The bigger the constants, the faster the approach.

The acceleration caused by the wall at distance `D` is

    acceleration=CYCLE_ACCEL * F(D)

with

    F(D) = 1 / (CYCLE_ACCEL_OFFSET + D)
         - 1 / (CYCLE_ACCEL_OFFSET + CYCLE_WALL_NEAR)

if the wall is closer than `CYCLE_WALL_NEAR`. the stuff in the second line just makes sure that the acceleration is 0 if `D=CYCLE_WALL_NEAR`, so there are no "jumps". Depending on the nature of the wall (whether it belongs to you, your teammate, your enemy or is the arena rim), the acceleration gets multiplied with `CYCLE_ACCEL_SELF`, `_TEAM` resp. `_ENEMY` or `_RIM`. If your cycle is stuck between one of your walls and a wall of any other type, your total acceleration by walls gets multiplied by `CYCLE_ACCEL_SLINGSHOT`. If you drive between two walls that are not your own, your acceleration gets multiplied with `CYCLE_ACCEL_TUNNEL`.

Furthermore, to make the overall speed feeling configurable without disturbing the tuning of the values with respect to each other, `CYCLE_SPEED` and `CYCLE_ACCEL` are multiplied by exp(`SPEED_FACTOR`*ln(2)/2), where `SPEED_FACTOR` is the value accessible as "Game Speed" in the game settings menu. On single player games on a dedicated server, the value of `SP_SPEED_FACTOR` is taken instead.

#### Turning

Cycles are not allowed to make arbitrarily fast turns; mostly, this is to take away the advantage the AI opponents would have over you, and to avoid flooding a server with fast turn commands. The minimum time between turns is determined by `CYCLE_DELAY`.

It may be desirable to modify the minimum time between turns based on the cycle's speed; that's what the setting `CYCLE_DELAY_TIMEBASED` does. If it is at the default value of 1, the cycle delay works as described in the above paragraph. If it is increased, the time between turns gets longer the faster you go, if it is decreased, the time between turns gets shorter the faster you go. At 0, two fast consecutive turns will approximately have the same distance from each other.

At every turn, your cycle loses a bit of speed; how much is determined by `CYCLE_TURN_SPEED_FACTOR`. At every turn, your speed gets multiplied with this value. Set it to 1 to disable the turn slowdown.

When you turn away from a wall, your cycle can get an instant speed boost or speed drain from it. The formula for your speed after the break is

    speed_after=speed_before + (F(D)/F(0)) * ( CYCLE_BOOST_? + ( CYCLE_BOOSTFACTOR_? - 1 ) * speed_before )

where ? is, as for the different acceleration effects of walls, either SELF, TEAM, ENEMY or RIM for your own walls, teammates' walls, enemy walls or rim walls that you break away from, and F(D) is the same function that is used in the wall acceleration formula.

In words: If you break away from a wall after grinding it really hard, your speed gets multiplied with CYCLE_BOOSTFACTOR_?, then CYCLE_BOOST_? is added. If you're not really close, the boost is scaled down with the same profile as the continuous wall acceleration.

#### Rubber

The `CYCLE_RUBBER` setting is a niceness thing, especially useful in an internet game where player prediction is poor: if you hit a wall, you are not directly deleted; you are stopped for a short time and your supply of "rubber" is decreased. If you manage to turn fast enough, you won't die. Rubber has three aspects: how close you can get to walls, how fast you do so, and how long long you survive.

How close you can get to a wall is determined by the `CYCLE_RUBBER_MINDISTANCE` family of settings. All contributions are summed up. The basic one is `CYCLE_RUBBER_MINDISTANCE` itself: you won't be able to get closer to a wall than that. `CYCLE_RUBBER_MINDISTANCE_RATIO` is there to avoid trouble with inexact internal calculations: The lenght of the wall in front of you is multiplied by this value, then added to the effect of `CYCLE_RUBBER_MINDISTANCE`. The next two contributions influence gameplay: `CYCLE_RUBBER_MINDISTANCE_RESERVOIR` gets multiplied with the rubber you have left to burn. If your rubber meter shows no rubber used, the effect is in full force; if your rubber meter is almost full, there is virtually no effect. `CYCLE_RUBBER_MINDISTANCE_RESERVOIR` makes grinds where you use up all your rubber deeper. `CYCLE_RUBBER_MINDISTANCE_UNPREPARED` gets added if your last turn was only a short time ago; if you turn right into a wall, it is at full effect; if your last turn was more than `CYCLE_RUBBER_MINDISTANCE_PREPARATION` seconds ago, the effect gets weakened approximately inversely proportional to the time since the last turn.

All these `MINDISTANCE` settings get overridden if your last turn was already very close to a wall (like the maneuvers known as 180s and adjusts), your cycle is allowed to get closer to the wall by the factor `CYCLE_RUBBER_MINADJUST` before they kick in.

How fast you are allowed to approach a wall is determined by `CYCLE_RUBBER_SPEED`. It's a logarithmic speed; you will be able to make half the distance to a wall in no less than T=ln(2)/`CYCLE_RUBBER_SPEED` seconds, make the next quarter in another T seconds, and so on; you never reach the wall completely. Rubber usage gets activated only if your current speed is larger than the speed determined by this (<distance_to_wall>*`CYCLE_RUBBER_SPEED`) at every moment). On 0.2.7.0 and earlier, the corresponding code was dependant on your framerate; the new code behaves approximately like the old code at `CYCLE_RUBBER_SPEED`/ln(2) fps. ln(2) is about 0.7.

The main variable that determines how long you survive is `CYCLE_RUBBER`. In network games, your ping (in seconds) is multiplied by `CYCLE_PING_RUBBER` and added on top of that. How much rubber is used is based on the distance you would have covered had the rubber not stopped you or slowed you down. If you use up all your rubber, it loses its effect and usually you die. Your reservoir gets refilled slowly over a timescale determined by `CYCLE_RUBBER_TIME` (defaults to 10 seconds).

Since rubber is based on distance, it is used up faster if you go faster. You can change that with `CYCLE_RUBBER_TIMEBASED`; set it to 1 to base the rubber usage on time instead. You can also set it to 2 to make rubber even more effective as you go faster, or -1 to make it more ineffective than usual when you go fast. Intermediate values are also allowed.

How would you call it if you drive parallel close to a wall, then turn towards it? I'd call it stupid. To punish this stupidity, the rubber efficency can be modified for a short time after each turn (so more rubber is used than usual). To activate this, set `CYCLE_RUBBER_DELAY` to a positive value. For `CYCLE_RUBBER_DELAY`*`CYCLE_DELAY` seconds after every turn, the rubber efficiency gets multiplied with `CYCLE_RUBBER_DELAY_BONUS`. Values smaller than 1 will increase rubber usage, a value of zero deactivates the rubber protection completely for that time.

Summary: You're certainly confused about all these settings for such a simple feature; the most important ones to play with first are `CYCLE_RUBBER`, `CYCLE_RUBBER_SPEED` (set it to something low to feel its effect) and `CYCLE_RUBBER_TIME`. They determine how long you survive, how fast you grind, and how fast your rubber replenishes (in that order). An alternative description can be found in this forum thread.

### Camera Modes

A special feature are the `CAMERA_FORBID_*` settings; if you think for example that using the free floating camera is cheating, simply set `CAMERA_FORBID_FREE` to 1 on your server; none of the clients will then be able to use the free camera. (Of course, it is possible for a modified client to cheat at this point, using the forbidden camera perspectives anyway.) Try a match with all but the internal camera disabled :-)

Likewise, you can override the glance settings with server defined glance settings with CAMERA_OVERRIDE_CUSTOM_GLANCE 1 for all cameras or just for the server defined custom camera with CAMERA_OVERRIDE_CUSTOM_GLANCE_SERVER_CUSTOM 1. You can forbid custom glancing settings alltogether with CAMERA_FORBID_CUSTOM_GLANCE 1. Note that only relatively new clients (0.2.8.3 or later) respect these settings.

### Maps

New in 0.2.8 is the possibility to select an arena to fight in. It is still a bit experimental (not because the arena code itself is buggy, but because the AI opponents have not been adapted), and to stress this, it is not yet possible to choose the map in the menu. Also, apologies for the quite strict rules server administrators need to follow (see below), we're working on automating some of the administrative overhead.

To change the map, set the `MAP_FILE` variable to the path to the map. Maps are searched in the resource folders. There are example setting lines for all the included maps in settings.cfg, you just have to uncomment the appropriate lines.

If you want to override a map's number of driving directions, you can do so with `ARENA_AXES`.

If you want to create your own map, you should read the Maps HOWTO.

#### Automatic downloading

Maps will be automatically downloaded from the internet if they are not available locally. First, the URI given in the setting `MAP_URI` is tried; if that fails, the URI `RESOURCE_REPOSITORY/MAP_FILE` is used.

Important for server administrators: MAP_FILE needs to follow strict rules since it determines the position the map will be stored under for all clients that connect to your server. Not following these simple guidelines will mess up your clients' automatic resource directory and they'll blame the development team for not providing a mechanism that magically puts maps into the right place (and they are right with that, but that's another stroy). Anyway, the guidelines: `MAP_FILE` should be of the form AuthorName/[SubDirectory/]ResourceName-VersionNumber.aamap.xml, and usually, the attributes of the Map tag will tell you what you should use for AuthorName, ResourceName and VersionNumber and, if the author chooses to be organized, the optional SubDirectory part as well. If the map you want to use does not give you enough information to uniquely derive `MAP_FILE` from it, ask the author. There is a python script called `sortresources.py` that automates putting the resource files into the right place.

Also, it should be noted that maps need to be versioned: no two files with different content and the same VersionNumber must exist. Ever. Really confused clients would be the result.

## The Console

All the settings you alter permanently in the .cfg-files can be tested temporarily if you enter them at the console. To enter a line to the console, you have to bind a key to it (in "Misc Stuff/Global Keyboard Configuration") and press it, of course. The line you enter will be interpreted just as if it was read from a config file. if you type in an incomplete name, you'll get a list of settings that contain that name. Just typing the name of a setting will print the current value.
If you run a dedicated server, everything you type will be considered console input.

#### Special Console Commands

`x` always is a real number, `n` an integral number, `b` a boolean value (0=false,1=true) and `s` a string (all the rest of the line will be read).

`START_NEW_MATCH` | reset the scores and start a new match in the next round
`DEDICATED_IDLE x` | Only used by the dedicated server: after running for x hours, the server takes the next opportunity (when no one is online) to quit.
`QUIT or EXIT` | shuts the server down
`KICK s` | Kicks player s from the server
`CENTER_MESSAGE/CONSOLE_MESSAGE s` | Prints a message for all connected clients at the center of the screen/on the console
`SAY` | Dedicated server only: let the server administrator say something

#### Other Console Commands

`CYCLE_SPEED x` | basic cycle speed (m/s)
`CYCLE_START_SPEED x` | cycle speed at startup
`CYCLE_ACCEL x` | acceleration multiplicator
`CYCLE_ACCEL_OFFSET x` | acceleration offset (higher means lower acceleration)
`CYCLE_DELAY x` | minimum time between turns
`CYCLE_WALL_NEAR x` | when is a wall near?
`CYCLE_SOUND_SPEED x` | sound speed divisor; the speed at which the cycle sound is played at normal speed
`CYCLE_BRAKE x` | brake strength
`CYCLE_RUBBER x` | niceness when hitting a wall
`CYCLE_PING_RUBBER x` | niceness when hitting a wall, influence of your ping
`FLOOR_RED/GREEN/BLUE x` | floor colour (without moviepack)
`FLOOR_MIRROR_INT x` | floor mirror intensity(if enabled)
`GRID_SIZE x` | distance of the grid lines
`CAMERA_FORBID_SMART b` | forbid smart camera
`CAMERA_FORBID_IN b` | forbid internal camera
`CAMERA_FORBID_FREE b` | forbid free camera
`CAMERA_FORBID_FOLLOW b` | forbid fixed external camera
`` |
`SCORE_WIN n` | points you gain for being last one alive
`SCORE_SUICIDE n` | points you gain for every stupid death (race into the rim/your own wall); should be negative
`SCORE_KILL n` | points you gain for everyone racing into your wall
`SCORE_DIE n` | points you gain for every time you race into someone's wall (should be negative)
`` |
`LIMIT_SCORE n` | score limit (all limits for one match)
`LIMIT_ROUNDS n` | maximum number of rounds to play
`LIMIT_TIME n` | maximum time (in minutes)
`MESSAGE_OF_DAY_1/2/3/4 s` | message lines sent to the clients upon connection
`` |
`COLOR_STRINGS b` | draw strings in colour?

Settings for single player highscore hunt on this server:

`SP_SCORE_WIN n` | points you gain for being last one alive
`SP_LIMIT_ROUNDS n` | max number of rounds to play
`SP_LIMIT_TIME n` | max time (in minutes)
`SP_AIS n` | number of opponents you will face

Ladder league constants:

`LADDER_PERCENT_BET x` | percentage of your score to be put in the pot
`LADDER_MIN_BET x` | minimum credits to be put in the pot
`LADDER_TAX x` | percentage the IRS takes from the pot
`LADDER_LOSE_PERCENT_ON_LOAD x` | you lose this percentage of your score every time the server is restarted
`LADDER_LOSE_MIN_ON_LOAD x` | but minimum this value
`LADDER_GAIN_EXTRA x` | the winner gets his ping+ping charity (in seconds) times this value extra

## Complete List

A complete list of all available commands is available here.

## Resource Path

The directories searched for resources are the explicit resource path given by the `--resourcedir` command line argument and the resource subdirectories of the systemwide data directories and user data directories. The included subdirectories of these resource directories are searched as well, but you should not put files in there, they are reserved for resources we include in our distribution.
Lastly, there is a directory reserved for resources automatically downloaded from the network; usually, it is the directory called resource/automatic under the user data directory, but falls back to the same subdirectory of the system data directory and can be overridden by the `--autoresourcedir` command line argument. The automatic subdirectory of the explicit resource path given with `--resourcedir` overrides the default automatic resource path as well.

This document was created by Manuel Moos

Last modification: Apr 22 2019

First Start | Installation | Network Play | Configuration | FAQ | Redistribution