Long Games Cause Lag...

telemanntelemann Join Date: 2002-11-07 Member: 7621Members
<div class="IPBDescription">Why is this?</div> This is mainly my curiosity, but if the problem can be fixed through configuration it is all the better. I have observed that lag gets progressively worse during a single game that lasts too long. The longer the game, the worse the lag increase. Yesterday, for the first time, I played a VERY long game that did not experience this problem. I have a couple of questions…

1) What causes this?
2) Can it be fixed through configuration or did they just have a better machine than me?

Comments

  • taboofirestaboofires Join Date: 2002-11-24 Member: 9853Members
    The longer the game is, the more entities (players, buildings, etc.) come into existance. Buildings are the primary culprit, esp. turrets. The more entities a server has to deal with, the slower it will run.

    The only part of this that is fixable is making sure that buildings completely exit memory when they exit the game. If you command, you'll notice leftover dots all over the mini-map from buildings that just won't unload. This is not something you can fix yourself.

    So, basically, there is nothing you can do about the server getting laggier as time goes on. It's gonna happen. Changing maps fairly often helps (two long games in a row would mean twice the lag). Otherwise, the best you can hope for is reducing the starting lag, so that even when it goes up it won't be so bad.

    Some maps are laggier than others, because they have more entities in them, which is probably why you don't always experiance it. Hera is bad about this.
  • telemanntelemann Join Date: 2002-11-07 Member: 7621Members
    You have done a good job of explaining in plain English, let me programmer-jargon it up to make sure I understand completely.

    There is increased load due to the addition of buildings. This is particularly bad due to the buildings that must detect players nearby due to the order(MN) nature of that detection (unless fancy programming tricks are used).

    There is also increased load due to some sort of “leaking” in ns. This is manifested to the user in the form of those dots that won’t go away in commander mode and such. This also is a cumulative always-increasing source of server load. The leaking does not get cleaned up until there is a map change.

    Hmmmm. (My mind is currently wandering off trying to apply fancy algorithms to the turret-player-detection problem. Stupid being a bored-out-of-work programmer. I wonder if a modified BSP tree algorithm could be used to change the order.) Ok.

    Sounds to me like efficiency tweaks such as controlling how many blood splats are kept track of won’t matter much compared to the load created by adding turrets.

    Out of curiosity, does any one know the nature of the leaks? What is leaked? Why does it stay between map changes?

    Note: I am in no way inferring that NS is a badly designed mod or that the developers should hurry up and fix the bugs. I think it’s a great mod and that the dev’s are doing a great job so far, especially since I get the game for free. I’m just curious and bored and I like writing games.
  • verboseverbose Join Date: 2002-11-25 Member: 9968Members, Constellation
    <!--QuoteBegin--telemann+Mar 17 2003, 03:26 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (telemann @ Mar 17 2003, 03:26 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->There is increased load due to the addition of buildings.  This is particularly bad due to the buildings that must detect players nearby due to the order(MN) nature of that detection (unless fancy programming tricks are used).<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    This is the logical assumption we're operating under. Flayra has neither confirmed nor denied this to my knowledge. He has said that he's identified a major source of high CPU usage, down to the line of code, but that the fix is not simple. My wild guess is that it's structure-AI related.

    <!--QuoteBegin--telemann+Mar 17 2003, 03:26 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (telemann @ Mar 17 2003, 03:26 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Out of curiosity, does any one know the nature of the leaks?  What is leaked?  Why does it stay between map changes?
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    IIRC, it's structure entities, but they're cleaned up on map-change.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    edited March 2003
    <!--QuoteBegin--telemann+Mar 17 2003, 01:26 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (telemann @ Mar 17 2003, 01:26 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hmmmm.  (My mind is currently wandering off trying to apply fancy algorithms to the turret-player-detection problem.  Stupid being a bored-out-of-work programmer.  I wonder if a modified BSP tree algorithm could be used to change the order.)  Ok. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    I already thought about turret speedups a bit and sent the ideas I came up with off to Flayra. Upon talking to him about it, he thought the new methods I described were "overkill" and wouldn't produce a large performance gain compared to the amount of coding required to implement it. Meaning that whatever he's doing must be already pretty damn efficient.

    Even though this link was specifically meant for Flayra I don't see any reason why I shouldn't share it with other people that like to make games.

    <a href='http://them.clanwho.com/turrets' target='_blank'>Turret A.I. Ideas</a>

    just keep in mind that it was designed to be a link attached to an email so it does do some first-person talking.
Sign In or Register to comment.