Game Development Giant

Chapter 831 Stuttering and Delay

After thinking about it for a while, I organized my next words.

Because what he is going to say next will be a little complicated, and it is very likely that it will be difficult for those without skills in this area, so Jester is thinking about how to say what he is going to say more clearly. Easy to understand.

Jester then wrote in a new reply.

What I'm about to say next will be a lot harder to understand, but at least if you think about it carefully, that's actually what it's about.

After talking about the simple concepts and terms above, let's look at a new concept. The proper name for this concept is 'interpolation frame'. So what is 'interpolation frame'?

Actually, interpolated frames are a technology used to smooth the movement of objects in the game, such as players. Essentially, interpolated frames are used to smooth the movement of an object between two points. Interpolated frames The delay is usually equal to 2 snapshots, but it can also vary - this may be a bit difficult to understand, but we can give an example to illustrate.

If a player runs in a straight line, he is at 0.5m at Tick1 and 1m at Tick2, then the interpolated frame will be displayed on the client, and he will move very smoothly from the starting point of 0.5m to The end point of 1m. But the server always and only observes that the player is at 2 positions, not between 2 points.

Does that make sense?

In other words, the server is processing a two-tick snapshot of IQ. Without interpolated frames, the game will become choppy because the client only knows the behavior of objects in the game after receiving updates from the server. .The interpolated frame behavior only occurs on the client side.

Interpolated frames essentially slow down the rendering speed of the entire game on your computer. This number is usually equal to 2 snapshots. This is generally true for all games, but some games allow you to change this, such as Counter-Strike. That's what people are referring to when they say rates. They're referring to update rate and interpolated frame latency.

This time Jesterbin did not write everything he wanted to say in one post, because it is not easy to understand now, so he is now explaining the relationship between stuck and non-stuck one concept at a time.

Let more players stop arguing about these trivial matters while half-understanding.

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

I mentioned interpolated frames before, so many people will be curious. Since there are interpolated frames, are there any extrapolated frames?

The answer is definitely that the world is inherently symmetrical. Where there is an inside, there will be an outside. The so-called extrapolated frame is another client-side technology used to compensate for delay. In essence, client-side extrapolation Object position substitution reduces overall client-side rendering. This approach is generally inferior to interpolating frames, especially for FPS games where player actions are unpredictable.

So, when discussing Counter-Strike, a standard FPS game, I won't introduce this concept in too much detail, because he is not the protagonist of the topic I want to talk about.

The posts written by Jester to introduce the terminology of what is a card and why it is stuck immediately attracted the attention of players, although some of them were difficult to read. However, they also gradually understood that the so-called stuck is actually a very complicated process, so Jester's post quickly received one or two hundred likes.

Of course, Jester wasn't done yet.

Then, there is a most important concept. We call it Hit-box internally. It can be simply explained as hit box or hit area. It seems that as the name suggests, the 3D model of a character contains some The area is used to determine the hit. The length, width and height data accurately describe an object in the 3D world. You cannot see the hit box, you can only see the player model. The hit box can be large or small, or it can be impossible to hit to some extent. , it all depends on how the game is written. In terms of hits and misses. Hit boxes can make a bigger difference than snap rate.

Another very important thing is called lag compensation, which may have completely different performances in different games.

Stutter compensation is a function on the server side, which is intended to reduce the intuitive feeling of client delay. If there is no stutter compensation, or the stutter compensation is not ideal enough, you will aim at a target and want to hit it. But because The client computer sees the delayed game world, and you don't hit the area you originally aimed at. Essentially, stutter compensation is interpreting actions received from the client, such as firing a gun, even though the action has already occurred . The difference between the server game world and the client game world, or what we usually call client delay, can be summarized as: client delay = (1/2*delay) + interpolated frame delay.

This is actually a very complicated mechanism. I originally wanted to explain it clearly in a few words, but I found that there is no way to do it. So I will simply explain in detail what lag compensation is or a more precise term. How does the lag compensation mechanism work?

Now I will describe the game scene of such a player in the game, and through this scene, I will briefly explain what lag compensation is.

The scene goes like this.

Player A saw player B heading towards a corner. Player A fired a shot. The client sent the shooting action to the server. The server received the data after Xms. X is player A, latency (delay) Half. The server now looks at what happened in the past (during memory loading) and finds the position of player B when player A fired. In the basic example, the server will return (Xms + player A's interpolated frame delay) to the point when player A sees player B, but other numerical factors may be determined by how the game programmer wants lag compensation to work.

The server determines whether the gun fired by player A hits. For the gun to be counted as a hit, it must hit the hit box of the player model. In this example, the server considers player A to hit player B. However, Player B's screen may have seen that he is behind the wall, but the difference between the time when player B sees himself behind the wall and the time when the server thinks player B is hit is equal to: 1/2 player A's delay + 1/ 2 player B’s delay + time since last snapshot.”

In the next snapshot, the server updates the data on the clients of players A and B. Player A sees the hit target position X, and player B sees his health reduced or dead.

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

After Jester finished writing this, he wanted to send the post out. But he suddenly remembered an issue that players often argue about, and he could use this opportunity to explain it, so he wrote immediately below the post: I suddenly remembered an issue that FPS game players often argue with each other. The classic problem is that I fired at the same time as another player. We both hit the same target. Why is the other player fine even though I am dead?

Because this is the reason why different games have different settings. In some games, such as Counter-Strike, if the first shot kills the target when it reaches the server, then all subsequent shots will reach the server. Fires that hit the target on the side will be ignored by the server. In this case, there can be no simultaneous kills, because 2 players fired at each other in 1 snapshot and both died.

However, in other games, such as Team Fortress that some people have tried, joint killing is feasible. There is something called weight that affects the progress of the game.

If you use the Counter-Strike model, the player has a clear advantage with good latency, and at some point it might be like 'Oh, I shot him before he died, but he didn't die! ' situation. You'll even hear the shots you fired before you died. But still no harm was done.

If you use the current Team Fortress model, the small difference in response time doesn't mean a lot. For example, if the server snapshot burst rate is 64, if player A shoots 15ms faster than player B, but they both If this action is completed in a snapshot of 15.6ms, then they will die together, and the whole process is actually that simple.

If Caton overcompensates, the result will be that I shot after him but still killed him.

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

If you just look at this, anyone will think it is very simple. But if you take it apart, it will be very complicated, and what I just said is just a little superficial. In fact, I am not a professional network engineer. This, I only know a little bit about.

Many people may ask, I have no interest in what you are talking about. I want to know what I should do if I get stuck. Is there any way I can solve my stuck problem?

Jester posted this post while writing this, and then opened another post.

He decided to talk about this issue in detail 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. It may be some problems such as server load, etc., which make you feel that the game I am not fluent, but this has nothing to do with you. If you are sure that everyone else is fluent but I am not fluent, then what I will say below may help you a little, but of course, it may not.

First and foremost, your network connection. The lower the latency, the better. Also, too much tap on any connection to your home network will cause lag. Stutter compensation can help in 'what are you firing at?' This helps partially, but if you have poor latency you're more likely to experience 'I ran behind the wall but still got shot' or 'I shot first, but I still died'.

If your client's frame rate is low, if it's lower than or less than your monitor's refresh rate, this will increase the perception of lag and be more noticeable and frequent than different snapshot burst rates.

Modify interpolated frames, 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 will not freeze On the client screen. If your network link is good and there is 0 packet loss, then you can definitely set the interpolated frame time to be exactly equal to the interval between 2 snapshots, but if 1 packet is delayed, you You will see a break. Taking Counter-Strike as an example, this is much different than changing from a 20-snapshot server to a 64-snapshot server. If you set this value very low, it will cause intermittent graphics.

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

Jester said a lot of things like this, and finally he concluded: In short, there are many ways to solve some problems, but they cannot solve all problems, such as lag, why should I post it? Several posts stated that the reason for these problems is simple, because I found that too many people do not understand what network code is, or even know nothing about the problem, but they are always complaining about being killed behind the wall.

Sometimes, when you are shot to death behind the wall, it is not only because of the server, but also because of some problems with your own machine or network broadband.

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

Many people are thanking Jester for replacing the development team and answering questions for players despite his busy schedule. Of course, these are for the development team of Counter-Strike and are not like some other Mars Entertainment games. , a complaint that often haunts the player community. However, Jester's explanation for this is that different development teams have different styles, and he does not insist on this.

He likes to communicate with players in the player community, but this is not required for all development teams.

But there are still many people saying that Jester is obviously blaming him for his server problems. Of course, these mindless trolls were sprayed by so many players who volunteered that their mothers don’t even know them anymore. (~^~)

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like