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."

8 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: 2, Interesting

      Of course, it could be as much as 500ms before that person dies, too (if both players have 250ms ping). The default for maxunlag used to be higher, too, which caused some really big problems (ie imagine 400ms + your ping between the time you duck behind the corner and the time you die).

      It's a good idea in theory, but in practice it tends to just irritate players that have good connections (even though it really has the worst effect on the people that have pings closest to the maxunlag).

      The biggest problem with it is simply that players can't react to the information on their screens (which is behind by their ping plus that of the player they're trying to react to). So, a sniper with high ping can be facing the completely wrong direction AND the target can duck around a corner and he'll still get hit by a sniper that was facing 90-180 degrees away from the target and around 1 or 2 corners.

      --
      -PainKilleR-[CE]
    2. Re:HalfLife by irc.goatse.cx+troll · · Score: 4, Interesting

      Which is why its optional (One of the few things Valve still lets admins control, bleh.)

      Most people I've personaly seen complain about unlag don't understand it and are just trying to make an excuse for why my friend(who used to be on dialup) could ace their entire team. (obviously not refering to you, just most people I remember). Personaly I dont mind the occasionaly unlag kill so much as i hate when people have high choke and look like theyre flickering around, you just have to spray and pray while they can stop and aim.

      The obvious solution to all of this is to lan, but overall I'd say halflife offers the best experience to dialup users.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    3. 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]
    4. Re:HalfLife by PainKilleR-CE · · Score: 2, Interesting

      heh, before VAC came out, one of my CD keys (I have 3 for various reasons, primarily because Sierra gives free games to message board moderators, or at least they used to) was banned with no explanation. I think it might be because it was being used by someone else (I'm guessing a CD key generator got it right), and I eventually went into the registry and changed my key (to one of my other keys) because it was in use so often during clan matches and practices. Anyway, I reinstalled HL and accidentally used said key, only to find myself banned from the auth servers.

      We used Punkbuster pretty heavily in TFC (I even ran a league for a while that used it from the start of the league's (short) life). Unfortunately, it had it's share of problems, but false positives were not high in my experience. We finally had to get rid of it when PB's developers stopped updating it for HL and it became very evident that it was easily hacked/bypassed by anyone that wanted to cheat.

      If I had to pick an ideal time to get out, it would've been the first time I took a break from the game, when CE stopped playing TFC (and moved to CS for a while). The game was much better then, before the netcode update, the rampant cheating, and the general whining about how the game should or should not be played (god forbid I shoot incoming offense; I can understand 'play nice' rules in pub games, and even uphold and support them, but in matches?).

      --
      -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.

  4. How Flight Sims Deal With Lag by breon.halling · · Score: 4, Funny

    They simply employ this =).

    Thank you, thank you. I'll be here all week. Try the veal.

    --
    "Yeah, well, Dracula called and he's coming over tonight for you and I said okay."