Fairness gameplay over network latency in real-time multiplayer

Tips to hide and prevent network latency in real-time multiplayer for fair gameplay and better player experience

Chris Hong, CEO & Chief Developer @ ChosmoUniverse, 13.Jan.2024

Alright, you started playing the game on your mobile phone while on the bus home from work. You're participating in a party play that you and your guild friends have planned for a long time. However, today, the mobile network connection on the bus seems unusually bad! The network speed is either slow, constantly freezing, slipping, or flickering. Your friends keep complaining, and you start to get annoyed. Since it's difficult to play the game normally, you eventually end the game and call your friend, saying, "I won't play this game again!"

Nowadays, physical network issues are not common, but sometimes, even minor differences can be strongly felt. In urgent situations or critical moments, our brains and senses become more sensitive, making us notice even small discrepancies and getting frustrated if those differences ruin our gameplay. In fact, many things can happen in a fleeting moment, and that moment's difference can bring about significant changes.

Fairness Gameplay:

Why do we divide football matches into halves, switching sides for each team? Of course, there might be various reasons, but one reason I know is to give both teams a fair chance.

In reality, it's impossible for every situation to be completely identical or fair. Nevertheless, we try to create the fairest conditions possible within the established rules of the game. Even if it's not perfect, there's a level where everyone agrees it's fair enough, and efforts from those operating the game should ensure that this level is maintained.

Propagation Delay:

In theory, electric signals on the internet move at the speed of light. However, in reality, electrical signals passing through wires are slightly slower than light. Still, we can calculate it at the speed of light. In this case, light can travel about 300,000 km in one second, so it takes around 133.33 ms to orbit the Earth, which is about 40,000 km. Communicating with the opposite side of the Earth in a straight line would take roughly half of that, about 66.67 ms.

Considering that popular modern monitors and smartphone screens support around 60 Hz to 120 Hz, and high-spec games can even support frame rates of 144 FPS or higher, the speed at which electricity travels to the opposite side of the Earth might seem relatively slow. If you are using a high-performance 144 Hz monitor and the game is running at an average of 144 FPS, the data transmitted over the network could result in a minimum delay of 8-9 frames, making all the frames in between appear as if they are frozen. In the end, you might wonder if you've spent money meaninglessly.

Fortunately, all of this is just very specific mathematical calculations. Game developers have been researching ways to go beyond these physical limitations and provide a natural experience. Whether there's no limit to human capabilities or if human cognition is just inaccurate and limited on both sides, we've created remarkable methods to make everyone feel like they're playing in the same time and space within the game. (If it goes this far, we might deserve a Nobel Prize, who knows!)

Now, let me share some simple tricks on how this feeling of playing in a relatively identical spacetime is achieved.

Breath Before Sneezing:

First, let's look at an easily accessible method that is not technical or mathematical. I call this "Breath Before Sneezing." The actual action we want to perform (Target Action) is sneezing, but sneezing can only occur if you inhale. In other words, without the pre-action of inhaling, sneezing cannot happen. This indicates that there is a certain delay time due to the pre-action before sneezing, and by utilizing this time well, you can somewhat conceal the delay effect occurring on the network.

Let's consider a specific example in the game.

In this game, you want to attack the enemy by clicking the button on the screen. Then, 1. due to the network delay, the packet indicating that you pressed the attack button will reach the server after a certain time, 2. the server will process everything and send back the result after processing, and 3. after a certain time of network delay again, you will receive the result.

Do you have to wait for the time of 1+2+3 until you receive the result of the attack in the game? If this happens, the user will feel like time has stopped.

To overcome this, the game can provide a time delay effect that users cannot feel during the expected total delay time (or even longer). This can be achieved by using animations or special effects to make it appear as if the game is still progressing during this time. This not only ensures smooth progression on your screen regardless of network delays but can also have a significant effect on synchronizing animations and playtime with other players.

Other Tips to Overcome Latency:

In addition to the above, several additional methods can be used to overcome network latency.

If I were to explain all the content here, the text would become too lengthy. Therefore, I'll provide just one example for now. If you'd like to discuss more topics or have further questions, please feel free to contact me anytime!

my email is chris.hong@cosmouniverse.io, or you can find me on https://www.linkedin.com/in/cosmouniverse/

Here is an example of Exaggerated use of effects.

BEST F1 Sound exhaust V8 (PART 2)
https://www.youtube.com/watch?v=hpvuu5MfaSk

The left screen shows a scene where a character is firing a laser weapon. A significantly large laser has been fired. In reality, most weapons are very small, but in games, there is no need for them to be. Many FPS games represent very small bullets, but surprisingly, many games use images with a visible thickness to maximize effects. Although this is done for the artistic effect of the game, it also significantly helps raise the level of synchronization. If your bullets are 1 pixel in size, the collision judgment of the bullets must be accurate to that 1 pixel. This is not easy to judge on the local system. Therefore, if the process of sending and receiving packets through the network is involved, it is almost impossible to create complete synchronization in most cases.

However, if the width of the bullets or the target for collision judgment becomes larger, especially if the boundary is not very clear, as shown in the image, a slight error may not have a significant impact on the gameplay screen. Someone might consider this as a deceptive representation of the player, but it is a way to admit the incompleteness due to network delays and seek understanding from the players.

In some cases, when using a wide hit judgment, you can consider calculating damage in such a way that the center is 100% damaged and the outer parts have a lower percentage of damage.

The image on the right is for expressing sound. We already know that sound is slower than light, and we are familiar with the asynchronous situations of light and sound in reality, including the Doppler effect. For example, even if the opponent appears in front of you because the system extrapolates the calculated position, this may be during a slightly delayed time. In this case, sound can start a little later during this slight delay; during this time, the system may synchronize packet transmission in the network.

Conclusion:

Of course, this is not ideal, but these simple techniques aim to give our players a more sophisticated and well-thought-out feeling as they progress through the game. Nothing can be completely perfect. This is an unavoidable situation when considering our finite reality. Technically, this is an area that cannot be perfectly overcome. Therefore, employing various methods to give all users a sense of fair play is more important.