Improving real close formation flight

From FlightGear wiki
Jump to: navigation, search
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

If you like doing refueling stuff, aerobatic patrols, or some close formation flight in terrain following, there's big chance you should have noticed some of FG hindrance in those practices:

Rubber band phenomenon
You see your buddies doing "yoyo" and that makes following them impossible.
Lag
When you manage to make a perfect refueling, the tanker's pilot see you 50 m behind, same when trying a diamond formation :(
Stuttering/freeze when loading 3D stuff
Never frozen 20s because of the F-16 loading? you were lucky till now, or got a damn beast of a PC.

We will try to provide answers answers to what can be done to have a smooth and reliable formation flight, without doing hard stuff like making FG multithreaded. :)

Video

To start, some videos, showing WIP:

diamond formation flight
F-4 training in TFFG
more recent refueling

The formation is made by recording successive planes, and replaying the previously recorded session, by using network tools like wireshark and tcpreplay.

Now is time to talk about the "hindrances" and some ways to deal with :)

Lag and jitter

Lag

In a real flight, you are in your plane, and your buddy is in his plane too, so that you can see yourself directly if your distance is 10 m, you see it be 10m. That's not how it works in FG world .
In FG world, you are in your FG dedicated room, the same for your patrols members, but at some 10,1000,20000 km distance. You don't see the other where it really is, but where it were some times ago, the time for FG to send the packet, for it to travel through the internet wires and switch, ISP filters, be received by fg, and displayed. The lag is the fact the mp pilot are late in your FG session relative to their position in their FG session.

Jitter

What happens when the lag value varies? that's called "jitter", Depending the internet links between you, the lag can have nearly allways the same value, in case you see the mp pilot quite stable, or the lag value can be varying a lot, this make the mp plane lagging and surging, called the yoyo or rubber band phenomenon.

Medicine

The fist step to have a clean formation flight is to be on the same mp server, to reduce lag and jitter, and to try the different mp server, to pick the one giving the smoothest experience. Note that the best can change depending the day time, the month, the moon ...

Once a good mp server is picked, it's time to use the Mp Patch wich allow you to compensate the lag, and smooth a lot the rubber band phenomenon (beware, WIP)

Transmission rate exemple

Just to give you exemple of how bad a mp transmission can be, you can see on this page a wireshark analyse, showing the mp packet rate for different mp pilots, from a recorded mp session.

Freezing on 3D loading

You just started a diamond formation barrol, and a f16 joined and ruined the figure?
What we need the most in close formation flight is a stable fps, with as few freezing time as possible, here are some tips to achieve this:

Reduce 3D load

  • Fly in a private mp server: this way you won't have to load others unwanted joining planes, but nobody will be able to see your pilot skills, quite disappointing for you!
  • Just keep in the aircraft folder the plane you are going to use, with the needed generic and instruments folders: sounds better, now you will be seen, and only blue gliders (or even something invisible if you change the default) will appears with nearly unnoticeable loading time.
  • Remove the stuff killing your fps, this can include 3D clouds, ai traffic, shaders options : improve framerate.
  • Choose carefully your training field, a deserted island with only sea all around give better fps than a crowded san Francisco :) . If the scenery put too much load for you, take a previous and less accurate one, or remove the objects from the scene, but you will lack the hangar you need to park in the end.

Texture tweak

  • Make change to the textures used, most of them are of png or rgb format, that's fine, as long as we don't need to load them the fastest way possible.

You can consider using compressed dds mipmapped textures, or/and a downsized size of texture. This will have to be adapted to your machine spec and driver's capability, to obtain stable and comfortable fps.
The on load mipmap generation is really giving me stuttering problems, and once using dds textures, there was really an improvement in the smoothness of the flight.

Training / debriefing

Flying very close needs some practice, (and practice, and practice :) ) and the time you can flight for real with mp pilots are not that long, so here are a few tips:

  • Depending your place in the formation, and the figure you are doing, you will need to turn the view to see the leader, and that's not that easy if you never trained. So for practice, choose a target (an ai model, the callable ai tanker or a mp pilot, and try to fly on the left, on the right, under, reversed etc, each time with a view showing the target.
  • Once you've got an aerobatic program, you can practice it by recording the flight, and replaying the others planes as more or less detailed here. This will even allow you to do a nice film with a recorded session to show your skills.

Recommended planes

Here comes the choice of your beast, things to consider are visual clearance from the cockpit (i bet you want to practice for real, not in external view!) and the FDM particularities, like how does it slow down when you cut the throttle, how smooth are the joystick command applied etc.

Related content