Update 9.16 will include the optimization of the visibility system, which is an important component of the game. Now, spotted vehicles will be displayed much more quickly on screen. The difference will be particularly noticeable when spotting enemy vehicles at a distance of more than 300 meters.
In this article, we will explain how we managed to achieve such a result and how it will affect the game.
Vehicles that spot enemies from a long distance will have a little more time to take a shot right after spotting an enemy vehicle.
Spotted vehicles will have a harder time crossing short open areas, since they will be immediately displayed on the screens of their opponents. They will have to either perform active maneuvers to disrupt the aiming of enemy vehicles or to choose other paths of travel instead.
Achieving this improvement to the spotting system required solving two problems: reworking server calculations and speeding up the display of spotted vehicles in the game client.
Our server programmers re-wrote the visibility system code keeping all previous operating rules. The migration to a more effective programming language allowed them to reduce the server load, while increasing the performance of the visibility system. In other words, the system began working more effectively while using the same rules and consuming less resources.
The interval between visibility checks depends on distance: checks are more frequent at short distances. As distance increases, the interval increases as well. The optimizations allowed us to increase the number of visibility checks two-fold at nearer distances and add additional simplified checks for further distances, leading to a three-fold increase in the total number of visibility checks in comparison to the previous version. The increased frequency of visibility checks in turn allows us to reduce the delay of displaying spotted vehicles.
Client-related improvements have saved about 60–70% of time required for rendering a vehicle model. Now, when entering a battle, vehicle models are all loaded in together with map objects. This solution allowed us to reduce rendering time upon spotting, as well as the possibility of “freezing” when enemy vehicles are spotted.