Page 1 of 1

Distance Lag - What Is It?

Posted: Mon Feb 14, 2011 9:39 pm
by Scarecrow
Distance lag is something that I've tried to preach for online formation flying for years. It is a special type of delay that is only present in YSFlight due to it's network code and how it is set up. We refer to it as Distance Lag, however the "Lag" term doesn't refer directly to jumpyness or bouncing across the map.

When flying in formation on a lead in YSFlight as a wingman, you may be tucked right onto the lead's wing or being exceptionally tight ("tight" referring to the tightness of the formation). What you see on your screen, is the formation of where you are at. However, from everyone else on the server, it does not look the same.

Let's say for example you are flying line abreast from another aircraft. (Figure 1) That means you are right next to, or parallel to the aircraft next to you. What you see is a nice, perfect formation right next to your partner. However, on his/her screen, you seem to be just "on the wing". This is because the distance lag displaces you farther back than where you really are. (Figure 2).



This means all of your formationing are always farther back (from the views of everybody else on the server) than where you really are. For example, if you're flying a wing position (Figure 3), the lead and other users on the server will see you farther back (Figure 4).



For those who know that when flying a wing position it is best to try to balance yourself with the other wing to make a more balanced formation. If you try doing that online, from your screen you will look balanced, but you are actually even farther back. This means if both the wings and the slot pilot fly as close as they can, the outcome would be a balanced formation. It won't be as tight as you will see it, but the outcome for everybody else will look good.

If you're flying a delta formation, the outer wings (such as aircraft 5/6) should fly close enough to lead but allow room for an "invisible" inner wing (such as aircraft 2/3).

Let's say for Slot, you want to get youself behind lead and right behind the two wings of the left and right wingmen (such as aircraft 2/3). For flying online formations, you should try to tuck as close to lead as you can, and even though you will look like you are flying an arrowhead formation, the distance lag will displace you far back enough that it will look like a balanced diamond formation.

From your point you'll never see a perfect formation, but for everyone watching, everything will look just fine.

Hopefully this answers some questions.

Re: Distance Lag - What Is It?

Posted: Mon Feb 14, 2011 10:22 pm
by Airbourne
i wonder if it is fixable?

Re: Distance Lag - What Is It?

Posted: Mon Feb 14, 2011 10:51 pm
by Scarecrow
I don't think so, I think it's just the network code. I'm not 100% positive, but it might happen in LAN flying as well.

Re: Distance Lag - What Is It?

Posted: Mon Feb 14, 2011 11:36 pm
by Shutter
From what I understand, distance lag occurs because of delays between one user to the server to the other user. YS makes any aircraft continue onwards with the last input that your copy of ys detected from that player, so the aircraft continues with that input until you receive more information from the server about that player indicating otherwise. This means that while you may have adjusted for that input you see, the other player may have made a new input that is different from the last one you received and is therefore elsewhere than you understand. Much of ys network lag can be blamed for this function in its network code. Formation flight and especially dogfights appear to be prone to this sort of lag because the proximity of the aircraft to one another seems to demand more from the server. Formations are work of great precision, so it is understandable that if the slightest shift in another formation member's input occurs, if it is not detected the results can be pretty awful looking. As for this happening on lan, I don't believe it's very likely unless the network consists of slower computers.

Distance Lag - What Is It?

Posted: Wed Jun 03, 2015 11:26 am
by miodek1987
Interesting stuff. Learned a lot from it. Thanks:)

Distance Lag - What Is It?

Posted: Wed Jun 03, 2015 2:14 pm
by Flake
To add to this, this happens on all networks. It's a latency issue.

If your ping is 30ms between the server and your aircraft is travelling at 400 knots, for example:

400 knots == 205 meters per second.

205m/s * 0.030 (30 ms) = 6.15 meters behind.

If you are on the other side of the world, like me: 180ms (ping best case scenario) -> 36.9 meters behind.

So if, in theory, you had a lan with ms ping between consoles, then your distance lag is 0.

EDIT: One "solution" to minimise the distance lag, is to fly slower!