Slashdot Mirror


How Flight Sims Deal With Lag

mnemonic writes "How are hundreds of air, ground and sea units simulated in a multiplayer flight simulation with high fidelity, all the while maintaining a smooth framerate for dialup users? Two network protocols, a hybrid server-client peer to peer architecture (the latter of which is reportedly used by Doom 3) are only some of what it takes to keep Falcon 4.0, a beast of a game, playable online."

4 of 13 comments (clear)

  1. HalfLife by irc.goatse.cx+troll · · Score: 4, Informative

    HalfLife has a nice feature to deal with lag called 'unlag'. The server has a setting (sv_maxunlag) for how long it should remember positions, default of 250ms.

    When you fire a shot, the server checks your ping and looks up where everything was when you fired, so if you shot someones head right before they ran behind a corner and you have 250ms ping, they'd make it behind the corner behind unlag kicks in and they die.

    --
    Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    1. Re:HalfLife by PainKilleR-CE · · Score: 4, Informative

      Which is why its optional

      heh, it's nice that Valve put in the option, but the simple fact is that finding a server that doesn't use it is nearly impossible, and it's required in most competition configs (though the actual value tends to be different between leagues).

      People complaining about lag or unlag in game are generally just making excuses. If it's that bad, they would've left to find a better server. However, with unlag you have a situation where the player is forced to deal with an artificial component of the game for which they can not compensate. Those of us that started playing online FPS games with Quake, or even earlier, on dial-up (at a time when an LPB was someone under 400ms) learned at that time to compensate for our latency with various techniques to predict the opponent's movements and shots (basically doing the compensation in our heads that Valve is using server-side code to do now). When people complained about lag, they were told to learn to deal with it by other players, or find another server. Now the developers have taken it into their own hands to enforce lag on players that have paid to reduce it, or on players that have learned to compensate for it themselves.

      Overall, the option given to players is either to allow the server to compensate for their shots and movements, or not allow the server to compensate. The players have no control over the 'shooting around walls' effect except to try to find the rare server that has turned off unlag completely, or the choice to prevent their own shots from doing it to others (which essentially means taking away something from yourself that every other player is given).

      Half-life already had some of the best network code available before they added in the unlag feature, and they did this by reducing the amount of traffic to nearly a bare minimum, and implementing things similar to what is mentioned in the article about Falcon's netcode, things like retransmission and ordering of UDP packets with significantly less overhead than TCP packets (and there are options in Half-life's console commands to control how many resends you will receive (if any) and things of that nature).

      Things like getting shot around corners were already standard for people with high ping anyway, and they actually happen to these people more often under the unlag code than before, but they're also the least likely to notice the change, except when it's in their favor. The people that tended to notice the change the most were those that had gotten high-speed connections to counter this problem, and the unlag code just brought it back to them.

      Fortunately, though, I no longer play the game, so I don't really have to deal with it any more. I've considered going back to it a few times, but Valve's tendency to mess with what's right (the network code, and a few other issues specific to TFC, like grenade loadouts and effects, class speed, etc), and not fix what's wrong (have they killed the 'running around with your screen tilted sideways at 0 health' bug yet? That one was in HL at launch 4 years ago), not to mention not finishing and releasing a game they promised to us 4 years ago as a mod/patch/seperate game (TF2), has led me to looking for better things to spend my time on.

      --
      -PainKilleR-[CE]
  2. Cool and by coday · · Score: 3, Informative

    It is certainely and interesting read but to be quite honest the solution is not ground breaking, it is just a well thought out design. my 2 cents.

  3. A documented 3 Layer Net Subsys by C0deJunkie · · Score: 5, Informative

    The guys who are developing the great Armagetron are dealing with this, as you can see in their Network Subsystem Documentation.
    The main issue covered seems to be the need to "level" the different users (in terms of their "ping times"), expecially when one of them is hosting the multiplayer game.