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

13 comments

  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 irc.goatse.cx+troll · · Score: 1

      The reason I said the thing about it being optional like that is if you've noticed, Valve likes to enforce their new changes. Most league gamers would much rather cs be more like beta7, or atleast 1.0, but instead you're stuck dealing with the features that most hate (delay in jumping, awp to the leg not killing, pistols being practicly worthless in air, etc).

      You actually broke your halflife addiction? You should make a 12 step program so I can join-- Playing counterstrike is like being in an abusive relationship, you know you shouldnt but you keep coming back.

      The screen tilted sideways with 0 health bug is well hidden, but i've seen it pop up in the mod Natural Selection before. A similar screentilt bug is in hltv still, if you're first person when they die you're stuck screen-tilted until you first person someone thats still alive. really annoying in the middle of watching a good lan match live.

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

      The reason I said the thing about it being optional like that is if you've noticed, Valve likes to enforce their new changes. Most league gamers would much rather cs be more like beta7, or atleast 1.0, but instead you're stuck dealing with the features that most hate (delay in jumping, awp to the leg not killing, pistols being practicly worthless in air, etc).

      Yeah, I pretty much figured that was your point, as Valve is just as notorious on the TFC side for changing things without giving people any options to change it back. There was even a whole movement (and there may still be a small league for all I know) to create a league for pre-TF1.5 gaming (ie the servers and the clients would all be on the version previous to the netcode update which brought in the unlag feature, and a mess of other new features for TFC). There are a couple of FAQs out there on how to setup HL so that you have two concurrent versions you can switch between to accomplish this, as well.

      You actually broke your halflife addiction? You should make a 12 step program so I can join-- Playing counterstrike is like being in an abusive relationship, you know you shouldnt but you keep coming back.

      12 steps:
      1. Move across the country
      2. Make sure your computer breaks in the move
      3. Make sure it takes you a month to get the cable modem up and running after you buy a new motherboard/case/CPU/RAM to fix step 2
      4. Make sure the power supply that came with new case above is not powerful enough to allow you to boot up the computer with the CPU from step 3 above
      5. Make sure the league you play in is playing shitty maps for the first 6 weeks after you finally resolve the issues from steps 2 through 4 above
      6. Find out after 7 weeks that the place you thought you'd be living in for the next year has had the lease revoked on the grounds that the owner needs a place for a relative to live, and the lease was month-to-month, so they were being nice in giving you the option of staying another 2 months
      7. Find a place at the last minute so you can move for the 2nd time in 3 months
      8. Another 3 weeks to get a cable modem up and running
      9. Find out the league played the best maps while you were down, and they're starting another 6 weeks of shitty maps
      10. Quit
      11. Move again after ~4 months in the place from step 7, this time into your girlfriend's place
      12. Watch all of your time for HL disappear since you now live with your girlfriend. I also found out that the clan I was playing TFC with broke up (about 6 weeks after it happened), and don't really care to spend the time on pubs getting back up to the point where I could join a clan that I would feel comfortable with (and actually feel comfortable with the idea that they're playing me instead of someone else)

      The screen tilted sideways with 0 health bug is well hidden, but i've seen it pop up in the mod Natural Selection before. A similar screentilt bug is in hltv still, if you're first person when they die you're stuck screen-tilted until you first person someone thats still alive. really annoying in the middle of watching a good lan match live.


      The best part about it in TFC was that I regularly played medic, and the screen would go back to normal when the regeneration kicked in and put me back up to 2 health. If people only knew how many flags I'd stolen after being at 0 health they'd probably be pretty pissed about that little bug.

      --
      -PainKilleR-[CE]
    6. Re:HalfLife by irc.goatse.cx+troll · · Score: 1

      Yeah, I figured the TFC players would be just as upset, I recently watched the movie Open_Your_Mind.avi which shows some tfc trick jumps, and I had no idea TFC actually had real concs before switching to those puny things it uses now. (I'm originaly a qw/TF player).

      You lost me at step 11, sigh. a girlfriend would make a much more enjoyable timesink, but theyre not nearly as easy to find.

      Yeah, I feel the same way about those long standing bugs. In counterstrike (and I assume other halflife modes) if you duck under a low roof and have someone stand on top of you, then they jump and you stand you can push them through the roof. Not only did they not fix the bugs, they didnt even fix the low roofs in some maps where the bug is very exploitable. In my oppinion, anything that isnt fixed after this long is a feature.

      I still hate valve with a passion, Even have a fake clan (just friends occasionaly wearing the tag to search for eachother) called 'fu@Valve!'.
      It sounds like you got out just in time -- before they introduced Valve AntiCheat. As any slashdot reader knows it is impossible to make something entirely secure, VAC is no exception. There are plenty of false negatives and false positives, No one in their right mind would put it into production with as bad a ratio as it has.. long story short, I know a few people who would never cheat, yet they're banned until some time in 2006 because of a bug in VAC.

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

      What happens if someone fires a shot, then dies because they were killed 250ms ago? Does the shot still fire?

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