Maps

General description of the battle maps

The battle map is the location of tank battles. Several maps with different terrain patterns will be available in the game. Each map is designed for different game styles: a defense game, a hide-and-seek game, a game on “islands " and an open game. Each battle map is a unique NFT.
Map generation is a mechanism for displaying a map according to a given coordinate grid. Each map will include a certain pattern of obstacles and landscape, which will allow players to choose a different style of play for themselves and take the best and most convenient positions on the map.

Technical description of the map

Map size - the standard size of 16x16 squares will be implemented for all maps. This field will allow players to simultaneously see all the tanks on the field. Increasing the size of the map can complicate the game process from mobile devices, since a 1x1 square will look very small and it will be more difficult for the player to consider resources and enemies on the map.
Technical description of the task for creating maps:

Server

  1. 1.
    Implement a game battlefield, the field size is 16x16 squares;
    1. 1.
      Each square can include several states that can change during the gameplay.
    2. 2.
      A 1x1 square is a standard cell of the field, which is divided into additional cells. Dividing the cells will allow you to move and change game objects more smoothly, such as tanks, shells, bonuses and destructible objects. A preliminary value for one square is 16x16 cells;
    3. 3.
      A 1x1 cell is the minimum unit of space on the playing field. Note: these cells allow tanks to move more smoothly on the maps, play from behind the shelter in the floor of the hull.
  2. 2.
    Implement a coordinate system on the playing field. The coordinate system will be used later in the construction and location of game objects on the field. The coordinate system is divided into 2 types of coordinates: the starting values of the fields are 16x16 and the cells are 256x256.
    1. 1.
      The starting values of the fields 16x16 are the fields in which the objects are initially located in the initial state (the whole object). The starting values will be specified:
      1. 1.
        Locations of respawn of players;
      2. 2.
        Locations of game obstacles;
      3. 3.
        Locations of game bonuses.
    2. 2.
      The 256x256 cells are the coordinates of the movement of tanks and shells. The available cells for moving tanks change depending on the destruction of obstacles. Example: if initially the field in coordinates 1.1 was placed a destructible object and occupied 16x16 cells (these cells are impassable), then after the shot, the object is destroyed and allows the tank to occupy the space destroyed after the shot;
  3. 3.
    Implement a system for transmitting data about the state of the playing field;
    1. 1.
      Information about the initial location of game objects;
    2. 2.
      The current state of the game objects. Game objects are destructible and the degree of destruction of objects is different. A detailed description of the destructibility of objects (obstacles) will be described in paragraph 3.1.3;
    3. 3.
      Information about location of the players. This information is required for the algorithm of automatic respawn of the players on the map, depending on the current position of the opponents. The mechanics of respawn will be described in paragraph 3.2.3;
    4. 4.
      Information about the location of game bonuses that are currently active on the map. The mechanics of game bonuses will be described in paragraph 3.2.5;
    5. 5.
      Information about projectiles. Mechanics of the projectiles will be described in paragraph 3.2.4;
  4. 4.
    Implementation of the map API, for the admin panel. The API includes a constructor for building level maps.

Client

  1. 1.
    Implementation of the game space of 16x16 squares, for further construction of the map from the json file sent by the server. An example of the appearance of a game map is shown on the "Image Map", a screenshot from the classic Battle City game shows a 13x13 field;
  2. 2.
    Implementing a system of 256x256 cells, this space is designed for moving such game objects as tanks and shells;
  3. 3.
    Integration of the network API for client server communication about the state of the map;
  4. 4.
    Implementation of parser of the game objects (a detailed description of game objects will be described in paragraph 3.1.3).
  5. 5.
    Implement a system of object levels:
    1. 1.
      Level 0 - empty space, earth;
    2. 2.
      level 1 - an object that is located under the image of a tank/projectile, if these objects intersect;
    3. 3.
      Level 2 - the main level where all the destructibles and bonus objects of the game are located, such as: tanks, shells, bonuses, walls (obstacles);
    4. 4.
      Level 3 - an object that is located above the image of a tank/projectile, if these objects intersect.