Chapter 831: Stuttering and Delay

After thinking about it for a while, I organized the next language by the way.

Because what is going to be said next will be a little more complicated, and it is likely that it will be a little difficult without this technology, so Jester is thinking about how to make what he is going to say more understandable.

Jester then wrote in a new reply.

"I'm going to say a lot more difficult to understand, but at least if you think about it, that's exactly what happened."

"With the above simple concepts and terms out of the way, let's look at a new concept called 'interpolated frames'. So what is an 'interpolated frame'? ”

"Actually, interpolation is a technique used to smooth out the movement of objects in a game, such as the player. Essentially, interpolated frames are used to smooth out the movement of an object between two points. The latency of an interpolated frame is usually equal to 2 snapshots, but it can vary - which can be a bit confusing, but we can illustrate it with an example. ”

"If a player runs in a straight line, he is at 0.5m at Tick1 and 1m at Tick2, then he moves very smoothly from the starting point of 0.5m to the end of 1m after interpolating the frame and showing it on the client side. But the server always and only "observes" the player in 2 positions, not between 2 points. ”

"Understandable, right?"

In other words, if the server processes a snapshot of the IQ two ticks, without interpolated frames, the game will become choppy, because the client will only know the behavior of objects in the game after receiving an update from the server. Interpolated frame behavior occurs only on the client side. ”

"Interpolated frames inherently slow down the rendering of the entire game on your computer, and this number is usually equal to 2 snapshots. Generally this is true for all games, but there are some games that allow you to change these, such as Counter-Strike, and these are what people refer to when they talk about rates, and they refer to the update rate and interpolated frame delay. ”

This time, Jester Bin didn't write everything he wanted to say in a single post, because it wasn't easy to understand right now. So, he is now a concept of a post to elaborate on the relationship between cards and non-cards.

Let more players not argue about trivial things that seem to be understood or not.

After interpolating the frames and sending out a post explaining the concept, Jester started a new post, continuing the topic above.

"I talked about interpolated frames before, so many people will be curious, since there are interpolated frames, then there are any interpolated frames?"

The answer is yes, the world is inherently symmetrical. There is an inside and there is an outside, and the so-called extrapolated frame, which is another client-side technique used to compensate for latency. Essentially, the position substitution of the extrapolated object on the client degrades the rendering of the entire client. This approach is generally inferior to interpolated frames, especially for FPS games where the player's actions are unpredictable. ”

"So, I won't go into too much detail about the concept when discussing Counter-Strike, a standard FPS game, because it's not the main topic I'm going to talk about."

Jester's post, which explains what a card is and why it is a card, immediately caught the attention of players, although some of them were difficult to read. However, they also gradually understand that the so-called stuck in the card is actually a very complicated process. So, Jester's post quickly got one or two hundred likes below.

Of course, Jester wasn't finished yet.

"Then, there's the most important concept, which we internally call Hit-box, which can be simply explained as a hitbox or a hit-box. As the name suggests, a 3D model of a character contains areas to judge hits. The length, width and height data accurately describe an object in the 3D world, you can't see the hitbox, you can only see the player model. The hit box can be large or small, or it can be unhit to some extent. It all depends on how the game is written. In terms of hits and misses, a hit box can make a big difference than a snapshot rate. ”

"Another very important thing is called stuttering compensation, which can behave completely differently in different games."

"Stutter compensation is a feature on the server side that is intended to reduce the intuitive feeling of client latency. If there is no lag compensation, or if the lag compensation is not ideal, you will aim towards a target and want to hit, but due to the delayed game world that the client computer "sees", you will not hit the area you were aiming at. Essentially, stuttering compensation is interpreting an action received from the client, such as firing, even though the action has already occurred. The difference between the server-side game world and the client-side game world, or what we usually call client-side latency, can be summarized as: client-side latency = (1/2 * latency) + interpolated frame delay. ”

"This is actually a very complex mechanism, I originally wanted to explain it in a few words, but I found that there is no way to do it, so I will simply explain in detail what is called lag compensation or more precisely, that is, how does the mechanism of lag compensation work?"

"Now I'm going to describe a game scene where such a player is in the game, and I'll briefly explain what lag compensation is through this scene."

"Here's the scenario."

"Player A sees Player B moving towards a corner, Player A fires 1 shot, and the client sends the shot to the server. After the server receives the data after Xms, X is half of the latency of player A. The server then looks at what happened in the past (in memory loading) and finds the location of player B when player A shoots. In the basic example, the server will return (Xms + Player A's interpolated frame delay) to the point in time Player A sees Player B, but other numerical factors may be determined by how the game programmer wants the stuttering compensation to be implemented. ”

"The server decides whether player A's gun hits or not. For a shot to be counted as a hit, it must be in the player model's hit box. In this example, the server thinks that player A hits player B. Still, Player B's screen may have seen himself behind the wall, but the difference between the time Player B sees himself behind the wall and the time the server thinks Player B was hit is equal to: 1/2 of Player A's delay + 1/2 of Player B's delay + time from the last snapshot. ”

In the next snapshot. The server updates the data on the client of players A and B. Player A sees where the hit is aiming at X, and Player B sees his health decreasing or dying. ”

"After reading this process, do you have a completely different and clear definition of what is called lag or delay?"

After writing this, Jester wanted to send the post out, but he suddenly remembered a question that players often argued about, and he could use this opportunity to explain. So he wrote immediately below the post: "I suddenly remembered a classic problem that FPS gamers often quarrel with, that is, I fire at the same time with another player, and hit the same thing, why am I dead but the other person is okay?" ”

"Because this is the reason why different games have different settings, in some games, such as Counter-Strike, if the first shot hits the server and kills the target, then any subsequent shots that hit the target on the server will be ignored by the server. In this case, there can be no simultaneous kills. Because 2 players shoot at each other in 1 snapshot and both die. ”

"However, in other games, such as Team Fortress that some people have already tried out, it is possible to kill together. There's something called weights that affects the course of the game. ”

"If you go with the Counter-Strike model, the player has a clear advantage with good latency, and at some points there may be 'Oh, I shot him before he died, but he didn't die!' situation. You'll even hear your gunshots before you die. But no harm was done. ”

"If you use the current Team Fortress model, the small difference in reaction time doesn't mean much. For example, if the continuous shooting rate of the server snapshot is 64, and if player A shoots 15ms faster than player B, but they all complete the action in the snapshot of 15.6ms, then they will both die, and the whole process is actually as simple as that. ”

"If the jamming compensation is excessive. It will show that I shot after him and still killed him. ”

"If the lag is not compensated enough, it will show that I need to move the crosshair a little more to hit him."

"Anyone would think it's simple just by looking at this, but when you take it apart, it's very complicated, and what I'm just talking about is just scratching the surface. Actually, I'm not a professional network engineer, and I only scratch the surface of what I know about it. ”

"Many people may ask, I have no interest in what you said, I want to know, what should I do if I get stuck, what can I do to solve my stuck?"

Jester sent the post out when he wrote this, and then opened another post.

He decided to elaborate on the issue in a new post.

"If you want to significantly improve your latency, then first of all, you have to make sure that the lag you feel is not caused by the game provider, there may be some problems such as server load and so on, which makes you feel that the game is not smooth, but this has nothing to do with you, if you are sure that everyone else is smooth, but I am not smooth, then what I said below may give you a little help, of course, it may not."

"First and foremost, your internet connection. The lower the latency, the better. At the same time, any excessive offload that is even in your home network will cause latency. Stutter compensation can help with the 'what are you firing at' section, but if you have poor latency, you're more likely to experience 'I've run behind a wall and still got a shot' or 'I'll shoot first, but I'm still dead'. ”

"If your client's frame rate is low, as long as it's lower or lower than your monitor's refresh rate, this adds to the perception of latency and feels more noticeable and frequent than the different burst rates of snapshots."

"Modify the interpolated frame, if the game allows it. Most games have a default interpolated frame time, which is at least 2x the snapshot interval. The reason for this is that if a single packet is lost, the player's actions are not frozen on the client screen. If you have a good network connection and zero packet loss, then you can set the interpolation frame time to exactly equal to the interval between 2 snapshots, but if 1 packet is delayed, you will see a break. In the case of Counter-Strike, for example, this is even more different than going from 20 to 64 snapshots. If you set this value very low, it will cause choppy images. ”

"This is also the packet loss that many players often talk about when they talk about the problem of lag, in fact, this is the problem of interpolated frames."

Jester said a lot more and so on, and finally he summed it up with a sentence: "In short, there are many ways to solve some problems, but they can't solve all problems, such as stuck, and the reason why I am making a few posts about these problems is very simple, because I find that too many people don't know what netcode is, or even know nothing about it, but they always complain that they are killed behind the wall." ”

"Sometimes, you're shot behind a wall, not just because of the server, but also because of something wrong with your own machine or internet broadband."

When Jester finished writing the entire post, he found that hundreds of replies had already appeared in his single post.

A lot of people are thanking Jester for taking the place of the development team and answering questions for players in their busy schedules, but of course, these are all complaints that the development team of Counter-Strike is not like some other Mars Entertainment games, which often haunt the player community. However, Jester's explanation for this is that different development groups have different styles, and he doesn't force it.

He enjoys talking to players in the community, but he doesn't have to be with all the development teams.

But there are still a lot of people saying that Jester is obviously throwing the blame for his server problems, of course, these brainless sprays are of course sprayed by many self-volunteering players, and their mothers don't know them anymore. (To be continued......)