Third programming contest – Moving

Moving in the game

At the start of the game each player is randomly placed at a free field on the map and is looking north. In each round you can decide in which direction you want to move (sidewards and diagonally) and look. The map will start at position (0,0) in the top left corner. The moves and views will be defined by the points of a compass. It is possible that you neglect your movement, but you need to look somewhere.

If a player is positioned at field (3,8) and is moving in direction northeast (top right), the target field would be (4,7). At least if the field exists (the map is large enough) and is empty (no wall or other player occupy the field).

A picture paints a thousand words:


Possible movements.

In the picture you can see walls at position (0,0) (top left), (3,1) and (1,2). The player is positioned at (2,1) and can move in the following directions:

  • to west (1,1)
  • to northwest (1,0)
  • to north (2,0)
  • to south (2,2)

As you can see, it is not possible to walk through walls. You must walk by them. (Catching blue players is possible around such blocks, see above.)

The order of the movements of all participants is important if two players want to visit the same field. The player that has first sent the movement to the engine (the server) will “win” the move (see below). The other player will not move at all in such a situation.

At the end only the game engine will decide if a player can move to some field. So all participants should not suppose that their movement will be done correctly. You should always listen to the server on which field it will position your player. It is not possible to stand on walls (a hash # on the map).

After each movement the toxic value of the current field will be subtracted from the life energy of the player. If the energy is 0.0, a blue player will change to the red team. An already red player is not affected. The toxic value of each field varies between 0.01 (mostly harmless) and 0.2 (highly toxic). It is important to know that not moving will increase the toxic value of a field. So in the first round the value is Y. If you do not move, the value will be 2*Y the next round and then 3*Y and so on. If you leave the field and visit it later, the toxic value will be the default Y again.

Both the toxic value of a field and the life energy of a player will be sent to each participant after each round.

previous page next page