![]() |
Throughout the 24 hours, the game is divided into six 4 hours long campaigns. Each campaign is a series of trade-battle pairs. During the trade phase, players can buy and sell weapons and tools that they can use in the next battles or sell in the next trade phases. Money and inventory are persistent along battles and trade phases, but are reset before a new campaign. Number of trade-battle pairs may vary from campaign to campaign, depending on how fast players finish with trades and battles.
When a phase is over, a new phase starts exactly when the server broadcasts a phase command.
In case of a tie, the points for the first shared rank are used (e.g. if the 2nd, 3rd, 4th places are tied, all three teams get points for being the 2nd; the 5th placed team gets points for being the 5th).
If a team ends up with less money in a campaign than they initially received, they get 0 points for the campaign, regardless of their placement.
|
|
A transaction is established if:
Besides the teams, there may be merchants and manufacturers trading - although they won't participate in battles. Team IDs for these players start with an underscore character.
Before a new trade phase, the offer database is purged and the phase starts with no offer. The number of offers a player may place is limited, but the player may cancel older offers to free up slots. The player may offer to sell something that is not in the player's inventory or may place an offer for buy goods for cash the player doesn't currently have - these offers can be placed and are broadcasted but transactions based on these offers are not established until the player happens to have the required goods or cash.
Most often the command is to fire a ballistic missile in a given angle with a given initial velocity. Angle, velocity, the trace of the missile and the effect of the missile are all reported to all players. Different missiles act differently, but there is a common feature: after a predefined timeout, the missile initiates a self-destruct procedure (explodes wherever it is, even mid-air). NOTE: teams should carefully evaluate these information, since the value of gravity and wind speed is not reported to the teams.
Each tank has a given amount of health points (HP. A nearby explosion or falling down after the landscape changed below a tank decreases the HP of the tank. When HP is less then or equal to zero, the tank is considered dead - it is removed from the battle and is not queried anymore. Teams with dead tanks still can monitor the battle (they still get all information from the server). However, from the next trade phase the team can play again. The HP of tanks is set to 100 before each battle.
To avoid infinite long battles due to idling tanks, at the end of each turn, a battle specific predefined amount of points are subtracted from each player's HP, or in other words tanks are aging.
There is a lower layer of the surface that is so hard that available weapons can not damage it. This layer is always at least R meters above the center.
Above the current surface of the planet there is non-stationer air. Wind blows in different directions with different speed on different altitudes. Wind may change between turns, but not during a turn. Wind affects different weapons in different ways and the effect can be modified by tools.
There is a single game server run by the organizers and client programs run by the teams.
To simplify protocol description, from now on, the following notations will be used:
A message from the server to the client can be of any length. A message from the client to the server shall never be longer than 512 bytes.
Clients may join and leave (by closing the connection) any time. Any attempt for overloading the server by excess traffic may result in disqualification. If a team does not have a controlling client at the time the server sends the query for the team in a battle or during the trade phase, the tank/team keeps idling (in trade phase until the end of the phase, in battle until command timeout).
When a client connects, the following information are sent:
message | description |
---|---|
cmdtimeout I | I is the command timeout in seconds |
tradetime I | I describes how long a trade phase lasts in seconds |
offers I | a player may have no more than I active offers simultaneously |
slices I | I describes how many slices a planet has, angular coordinates will be given in terms of slices |
flood I | if the client sends more than I messages in a second, the client is disconnected with EFLOOD. |
phase S | if S is "B", a battle is going on, if S is "T", a trading phase is going on. Hint: phase command should reset all offers, landscape and player position information stored on client side. The server will update the client with the necessary information after a phase command. |
NOTE: as a general rule, any information that is not sent by the server in messages should be measured or guessed from evaluating all available information by other messages.
message | description |
---|---|
cash S I | S is the name of the team, I is the amount of cash the team has |
message | description |
---|---|
inv S I | S is the name of the weapon or tool, I is the amount currently owned |
message | description |
---|---|
planet | indicates a new planet is being described |
message | description |
---|---|
trade I | I is the remaining time of trade phase in seconds |
message | description |
---|---|
activate S | player of team S is the active player - when this command is received, the active player has command timeout seconds to issue a command (see later). There is no "deactivate" or "end of activity" command, a new "activate" command cancels the previous. |
trajectory S S I;I ... | arguments are: player ID (who shot), weapon name and a series of slice;height information. Note: the server may send multiple trajectory messages for a single shot (for example in case of using cluster bombs). |
height I;I | slice I (first number) currently has height I (second number) |
plpos S I;I | player S is on slice I (first number) at height I (second argument) |
HP S I | player S has HP I |
message | description |
---|---|
sell I S S I I | sell offer, unique offer ID I (first argument) by player S (second argument) for weapon S (third argument), I for amount and I (last word) for price |
buy I S S I I | Buy offer, unique offer ID I (first argument) by player S (second argument) for weapon S (third argument), I for amount and I (last word) for price |
trans I I | transaction between the two orders (sell first) is established; both orders are deleted. (NOTE: cash command is also sent about both players, inv commands are sent to the two affected players) |
cancel I | cancel offer ID I |
message | description |
---|---|
sell S I I | place a sell offer for weapon S (first argument), I for amount and I (last word) for price |
buy S I I | place a buy offer for weapon S (first argument), I for amount and I (last word) for price |
cancel I | cancel offer ID I (only if the offer is from the player) |
message | description |
---|---|
shoot S I I | shoot weapon S in direction I (in degrees) with velocity I. |
message | description |
---|---|
control | take over control of the player; if another client is already having control, control is taken from that client and ENOCONTROL is sent to that client immediately. |
login T | log in with password T. |
message | description |
---|---|
EPHASE | client tried to issue trade command in battle phase or battle command in trade phase |
EFLOOD | excess flood (too many messages from the client in too short time) - disconnecting client |
ENOCONTROL | client does not control the player (client is read-only) |
ETOOMANYCONN | too many client connected for the team |
ETOOMANYOFFER | too many offers are placed by the player |
EINTERNAL T | internal server error (also reported on server console, the organizers should already know about it) |
ECANTCANCEL I | the client can not cancel offer I (most probably the client does not own it) |
ECANTSHOOT | the client could not shoot the weapon (most probably the weapon is not in inventory) |
ENOTURN | last client command is ignored as this is not the team's turn |
ESYNTAX T | syntax error - usually missing or bogus arguments for valid commands |
ELOGIN | need to log in before issuing command or already logged in when a new login command is received |
message | description |
---|---|
ILEFT I | time left is i seconds (for trade in trade phase or for the active player to give a command in battle phase) |
IYOUARE S | your current team ID is s |
IIAM T | information about the game server (arguments include arbitrary number of words); first command sent by the server to the client |
IEXPL I;I I | explosion at slice;height with radius I |
IEND | campaign has ended |
IGAMESTATE S | inform the player about new game state S; states are:
|