How to improve the quality of the network, why lag online games and why it is better not to use Wi-Fi or 4G for streams?

Lags in games are for many reasons, but two main, as a rule: not enough powerful computer and problems with the network in the case of online games.



What prevents to play normally, why does frisite / lag and how to improve the situation? Universal tips for players through the cloud platform , and in principle for fans of online games on the PC - in the educational program from Alexei Lykov.



Alexey Lykov, technical director of Playkey : A bit of materiel. Any traffic consists of packets sent over the network. And depending on the quality of the network, some packets may be lost.



In the package is a certain signal. When a packet is lost, two nodes interacting with each other (for example, two network switches: on the player’s side and on the server’s side of the online game) should solve the problem of information loss. Figuratively their “communication” looks like this:







The more losses, the more such requests from the recipient to the sender.



And what is the result? Suppose a frame consists of several packets. 10 out of 10 packets arrive at the computer, the frame is collected and displayed. The user is cool. But if out of 10 packets came 9, then the picture can not gather.



Or, perhaps, she will gather with some artifacts. We call this “scattering” pictures . Here is how it looks in one of the worst cases:







What happens on the net?



Suppose the recipient sends a request: "Give me this 10th frame!", The sender will send it. Of course, this takes time. And in those precious milliseconds that are spent on it, there is a lag .



If you play an online game with 30 FPS (frames per second or frames per second ) with a ping of 10 ms, the packet will take about 10 milliseconds ( ping to the server ) + 30 milliseconds ( interframe ). Total we get 40ms . At 60 FPS, this is even less noticeable, because the interframe spacing is already 15 milliseconds, for a total of 25ms (10 ms + 15ms). But the more such delays, the more “unpleasant” the picture, some jerks, friezes are felt.



The same with management . In World of Tanks, when you press the "forward" button, the tank should go.



But how can you understand that he really does it? The tank is considered to be “gone” forward when it received this command on the server. All calculation of the interaction of the players takes place there (otherwise cheaters would fill up everything).



So that the user does not feel lags when synchronizing actions with the server every second, in client multiplayer games they use pre-rendering: when you press the “forward” command, the tank immediately executes it. But, in fact, this is not yet the actual future for other users. If you played World of Tanks, you could see the tanks fly into the air or crash into the rock. This problem occurs when a lag occurs on the network - the signal goes to the server, and there is no confirmation that the tank really left.





Here, the tanks just fly at the very beginning of the video



At what stage does the bulk of packet loss occur?



A.L .: Problems are different:



1. The provider cuts traffic at the rate;



2. The standard router of the provider leaves much to be desired. For example, cheap Wi-Fi points - the “waffle” among the people - can give ~ 2 Mbps speed at a rate of 100 Mb / sec and generally provide a poor-quality signal;



3. The servers accessed by your computer are geographically far. Players from Siberia dream of online games reacting to their actions as quickly as Muscovites. Although we have personnel who are playing from Vladivostok and cannot rejoice;



Most of the loss occurs at the client's home and, primarily, due to the Wi-Fi access point.



There is almost no loss with cable: compared to Wi-Fi, this is 1 in 1000.



If the router is behind the wall, the signal deteriorates, this is a property of ordinary radio waves. Also, any other devices that emit radio waves affect the wireless signal.





How does the microwave affect the Wi-Fi



Another problem with home Wi-Fi is the problem of multiple access points in apartment buildings or offices. They also "interrupt" each other. In this situation, it is necessary at each point to reduce the signal power, and then the speed of all will increase. However, usually everyone goes the opposite way, set the power to the maximum, and as a result, Wi-Fi does not work immediately for everyone in the house.



And if the apartment has other devices connected to the Internet? This refers to smartphones, other laptops, ottoman for a cat with built-in Wi-Fi. Do they affect?



A.L .: It is not the number of devices that is important here, but in general the traffic that they consume. If other devices are running in the background, that's okay. Normal Internet surfing on other computers also has little effect.



But if someone from your home shakes torrents, and the second one watches the video in high quality on YouTube, then a limit can be reached via the channel, and the online game remains a small piece of cake.



For a better distribution of traffic across devices, we recommend routers that support the 5 GHz frequency band . The 2.4 GHz standard supports fewer channels - 13, and several devices can work on each of the channels, then they start competing with each other. Those who are interested to know all the details, can read all the details in the publications on HabrĂŠ .



In this regard, when we have a public point, 2.4 GHz can work very badly there. Therefore, for those who play online and use Playkey, 5 GHz channels are recommended. Hertzovka Wi-Fi is a great advantage for wireless communication.



How to find out the loss from yourself?



AL: You can quickly diagnose using the free utility MTR



First, connect the cable to the computer to verify that the problem is not on the side of the router. Type in the line ya.ru and note the column Loss% .



In general, there should be no losses, but this is the exception rather than the rule. 5% loss on any of the nodes is not critical.



If the cable is good, connect a router. Perhaps, for example, such a picture:







100% loss at one of the nodes



It is desirable to have on hand a couple of routers to check: if one packet is lost, and the second is not, then it will be clear that the problem is on the side of a specific router. Perhaps you need to update its firmware.



If losses occur on all tested routers, then it is necessary to ask questions of the technical support of the provider.



So, ok, what else can you do to improve the signal quality?



A.L .: 1. Configure prioritization at the router



If, say, you are constantly playing Witcher 3 or something else, you can simply go into the settings of the router and set the game to the highest priority. This should help so that the game does not “lag” if someone else uses the Internet in your apartment.



2. Try restarting the router



Routers, especially cheap ones, can accumulate various errors, create losses and delays. Therefore, restarting the router resets some kind of internal part: memory, connections. That is, everything starts from scratch. And it can help. For cheap routers, which have poorly written program code, there are different firmware, even non-native ones, which can solve this problem.



3. Tell antivirus that the online game client (or Playkey client) is a good program.



Antiviruses that check the Internet scan all traffic coming to the computer. For this, both the computer and the antivirus need some time.



Because of this, there may be noticeable delays. Sometimes even half a second, depending on the antivirus. Therefore, it is necessary to set the “trustworthy” status of a specific program in the settings of the protection software.



Maybe you, for your part, do something, and not rely on the technical knowledge of each player



AL: We do, of course. First, we have a scheme for sending packets using both the TCP protocol and UDP.





As a result, we decided to use UDP traffic - speed plays a significant role in streaming games. The problem with packet loss during UDP is solved, but it requires a greater channel width - that is, you have to send more traffic.



And here a situation arises: when a packet is lost due to the fact that the client has restrictions on the channel - for example, the provider gives 10 megabits of speed. We have to send even more traffic through the bottleneck. Therefore, we have developed an algorithm that gently raises and lowers the bitrate, tracking the user's network diagnostics.



If you want to check your internet connection right now and see how Playkey can handle it - use the GeeksOnline promotional code for free 300 minutes of the game (it works 24 hours from the moment of activation and only for new users ). Use health here .



And if you play via 3G and 4G?



A.L .: It is more and more difficult with them - when using 3G / 4G networks, even more powerful packet recovery algorithms are used, that is, the redundancy is very large (not ours, but at the protocol level). Initially, it was implied that unmeasured quantity of packets was lost.



Any radio signal works the same. Redundancy algorithms came from radiophysics. When we, for example, drive into a tunnel, the signal gets worse. But if some percentage of the radio signal packet is gone, we can still hear the presenter’s voice for a long time.



To say that the 3G / 4G network can not be used for online games - of course, impossible. But there is still a lot of work to be done. In general, it is more promising to immediately look in the direction of 5G-networks. If they cope with the promises of a speed of 25 Gb / s, and they can also reduce data transfer delays by 50 times, then this will open all the doors for Playkey, as for all online gaming, all at once.



All Articles