Author Topic: [Solved] Really Laggy In MP  (Read 7421 times)

Offline Hyfrydle

  • Hero Member
  • *****
  • Posts: 587
[Solved] Really Laggy In MP
« on: June 30, 2009, 05:54:59 pm »
Just been trying to play against my pal using the latest pre-release and the game was unplayable due to extreme lag we checked both internet connections and they where fine we also both use high spec quad core pc's details can be provided. Below is a screenshot showing debug info if that helps:



Hope someone can help this is not the first time we've had issues with lag and we both want to play but this is putting us off.
« Last Edit: September 25, 2009, 09:18:48 am by Fiskbit »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #1 on: June 30, 2009, 06:45:05 pm »
Hi there, that looks like the game was just loaded, so the debug info doesn't tell me much -- if you start it up and let it run for a little bit longer time, then that would be helpful.  Also, you're playing with a very small game (3,000 ships only), so it would be really super unlikely that this is lag caused by a graphics card or CPU.  Most likely, this is a network issue -- is either one of you doing background downloads or uploads in another program, or is someone else doing so on one of your networks?  Do you both have broadband connections?  This game isn't likely to run well across a 56.6 modem.

If you could each run the speed test here, that would be very helpful:  http://www.speakeasy.net/speedtest/

I don't have any solid data on what a minimum requirement for your game would be, because most of the time the requirement will vary by what sort of game you are playing and how you play.  In my case, I have 6920 down and 373 up, and it's smooth as can be with four human players and 80,000 ships in a game.  I would suspect that you'd need around 100 up at a minimum, but again it's hard to be sure.  If you're seeding torrents or downloading some big file in the background, though, that's going to tank the performance of the game in multiplayer no matter how you cut it.

Also, it's possible that you might have an unreliable wireless network connection.  Sometimes it's just fine to play on wireless, but if your signal strength is weak then you can get lots of little fits and starts in the tcp communications, which cause a lot of tcp resends, which cause poor performance in a game like AI War.

If you don't think the network is the issue, then you might try letting the game run for about 30 seconds after you load it, and then post the pictures of the debug information from both you and your friend's machines.  It takes around 30 seconds for it to gather any meaningful performance data in debug, and it wasn't running long enough with the above picture to do that.

If you haven't already seen it, here's a forum post that goes into some more detail on this subject:  http://arcengames.com/forums/index.php/topic,74.0.html

Thanks for your support of AI War, and I'm sorry to hear about your troubles with it over the Internet.

EDIT:  As an addendum, if you're going to send me a pair of screenshots, please let it run for 30 second OR until you start having lag, whichever is longer.  And also (as you did above, good work there) please don't pause the game before taking the screenshot.  Thanks!
« Last Edit: June 30, 2009, 07:04:18 pm by x4000 »
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Hyfrydle

  • Hero Member
  • *****
  • Posts: 587
Re: Really Laggy In MP
« Reply #2 on: July 01, 2009, 03:20:54 am »
We will gather and post more data later as far as I can tell it shouldn't be a network issue but I will post more details later.

Also sorry for putting it in the wrong category.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #3 on: July 01, 2009, 08:48:32 am »
No worries -- thanks!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Hyfrydle

  • Hero Member
  • *****
  • Posts: 587
Re: Really Laggy In MP
« Reply #4 on: September 02, 2009, 05:17:44 pm »
We are still having serious problems when we try to play multiplayer we have both done speedchecks and the results are as follows:

Myself - Download=6079 Upload=356
Friend - Download=3495 Upload=305

After running the game debug screenshots are below:



Not sure if this info will help but we both really want to be able to play multiplayer.


Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #5 on: September 02, 2009, 05:32:26 pm »
Unfortunately, I can't read anything from the screenshot below because it has been shrunk so much.  Can you post a full resolution version?

I would suggest using the network latency adjustments if you are not already; that should solve the problem.  If not, there's most likely some sort of speed throttling going on or something else at work (such as a CPU or GPU that isn't holding up its end).  You are both able to play single-player without lag, I take it?

EDIT:  To clarify what I mean by the network latency adjustments, I am referring to this line from the latest controls.txt (1.201 and up):

Ctrl plus +/-:   Increase/Decrease network latency buffer.

You can just keep increasing that until the point where you are not getting lag.  Depending on how many dropped packets there are on your network, that might be upwards of 8 or 12, it can vary.  That will increase "command lag" (the time between when you issue orders to a ship and when the order gets carried out), but it makes the game playable over a network with a lot of dropped packets.

If the problem is not lag, but something else, then please do let me know.  If it is saying "waiting for players" every so often, then that is indicative of a more serious interruption in service.  Usually the game will recover from that sort of thing on its own, but it's certainly annoying if it happens a lot.  Usually that sort of thing is caused by playing on an unreliable wireless network, which can often have huge swings in availability.
« Last Edit: September 02, 2009, 05:41:34 pm by x4000 »
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Hyfrydle

  • Hero Member
  • *****
  • Posts: 587
Re: Really Laggy In MP
« Reply #6 on: September 02, 2009, 05:45:10 pm »
Thanks for the reply we tried the network latency adjustment and it made no difference and yes it's fine in singleplayer for both of us.

When we start a MP game it takes ages to start up and this is the same whoever hosts. Then when the game starts it runs so slowly making it unplayable. We have checked the ports and are both running quad core pc's with high end graphic cards. I will update drivers and see if this makes any difference.

Also the screenshot was emailed from my friends PC so I can't improve the quality but when we both finally joined the game the time was 0:07:16 and this just stayed the same I presume it should increase as it does in a singleplayer game?

I'm at a total loss and need to see how it runs with other people to confirm where the problem might lie.

Again thanks for your reply.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #7 on: September 02, 2009, 05:54:45 pm »
Thanks for the reply we tried the network latency adjustment and it made no difference and yes it's fine in singleplayer for both of us.

That is extremely surprising.  How high did you set it to?

When we start a MP game it takes ages to start up and this is the same whoever hosts. Then when the game starts it runs so slowly making it unplayable. We have checked the ports and are both running quad core pc's with high end graphic cards. I will update drivers and see if this makes any difference.

The graphics cards and CPU would not be the problem if it is running this poorly, especially not if it runs fine in SP, then.  This is really incredibly poor, it sounds like your connection is being dropped repeatedly and is basically unable to be sustained.  AI War requires a persistent TCP connection to be created, and every time it drops you network card has to recreate it again (this is done below the level of the game), and that's pretty slow.

A user on another forum was just suggesting Hamachi, saying that he'd had some problems playing with some people, but not while on Hamachi.  Why this would be the case I am not sure, but it might be related to Hamachi's method of fault-tolerance for unreliable connections.  Hamachi is free, so you and your friend might try giving it a go to see if it helps any.

Also the screenshot was emailed from my friends PC so I can't improve the quality but when we both finally joined the game the time was 0:07:16 and this just stayed the same I presume it should increase as it does in a singleplayer game?

Okay, no worries about the screenshot, then.  You've given me enough other information that I doubt the screenshot would help at this stage.  The timer does of course increase in multiplayer same as it does in single-player, so it sounds like that is consistent with your TCP connection being constantly and repeatedly severed.  Do either of you have any special sort of firewall on your network that might be doing deep packet inspection or application-level filtering or anything like that?  Corporate networks, in other words, or are these both home networks?

I'm at a total loss and need to see how it runs with other people to confirm where the problem might lie.

Again thanks for your reply.

No problem.  Unfortunately, I'm kind of at a loss for this one, at the moment, myself.  I don't know whether the problem is on your end or your friend's, surely it is not on both.  It's always possible there is some sort of mysterious bug with the game that is causing this issue, but given the dozens of players playing co-op at the moment I am inclined to look at the network connections in this case.  If you haven't already tried Hamachi, you might give that a go and see if it helps resolve whatever it is that's causing the connection to drop.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Hyfrydle

  • Hero Member
  • *****
  • Posts: 587
Re: Really Laggy In MP
« Reply #8 on: September 02, 2009, 06:07:15 pm »
We set the network latency to +3 and also tried higher with no improvement. We will try Hamachi and see if this solves the issue. I also have another pal who I might be able to convince to try the game and see if we have the same issues.

Will keep you posted thanks for your help.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #9 on: September 02, 2009, 07:07:43 pm »
No problem -- and for your other pal, you could always just try it out with him on the demo version of the game, to see how it performs.  Hopefully Hamachi smooths things out, though, but I suppose we'll see what happens.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Echo35

  • Master Member Mark II
  • *****
  • Posts: 1,703
  • More turrets! MORE TURRETS!
Re: Really Laggy In MP
« Reply #10 on: September 03, 2009, 12:08:32 am »
No problem -- and for your other pal, you could always just try it out with him on the demo version of the game, to see how it performs.  Hopefully Hamachi smooths things out, though, but I suppose we'll see what happens.

Hamachi is a lot slower that straight up connections the proper way.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #11 on: September 03, 2009, 12:13:45 am »
No problem -- and for your other pal, you could always just try it out with him on the demo version of the game, to see how it performs.  Hopefully Hamachi smooths things out, though, but I suppose we'll see what happens.

Hamachi is a lot slower that straight up connections the proper way.

Depends on the circumstance.  Evidently it can bypass some bad router configurations, and it translates all the TCP into encrypted UDP if I remember correctly, so it has some other advantages there, too.  In the main I think you are correct, but if things are going way wrong then Hamachi can sometimes be a solution to that.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Echo35

  • Master Member Mark II
  • *****
  • Posts: 1,703
  • More turrets! MORE TURRETS!
Re: Really Laggy In MP
« Reply #12 on: September 03, 2009, 12:27:20 am »
No problem -- and for your other pal, you could always just try it out with him on the demo version of the game, to see how it performs.  Hopefully Hamachi smooths things out, though, but I suppose we'll see what happens.

Hamachi is a lot slower that straight up connections the proper way.

Depends on the circumstance.  Evidently it can bypass some bad router configurations, and it translates all the TCP into encrypted UDP if I remember correctly, so it has some other advantages there, too.  In the main I think you are correct, but if things are going way wrong then Hamachi can sometimes be a solution to that.

Bad configurations? I'm a networking Major damn it :P

Offline darke

  • Hero Member
  • *****
  • Posts: 534
Re: Really Laggy In MP
« Reply #13 on: September 03, 2009, 12:43:43 am »
Bad configurations? I'm a networking Major damn it :P

Network majors and general IT geeks seem to be half the cause of the problem since they have a tendancy of having non-trivial setups. :)

Take for example my home network where I'm regularly connecting a VPN to work through an encrypted PPPOE, across an unsecured wireless, which is then bounced to another wireless router, then through an intelligent switch (it's setup so that the various ports are trunked so there's essentially multiple networks on the same subnet), going into an ADSL load balancer which is then switching between two ADSL modems (non-trunked), one straight through, and one through another switch, before going into another ADSL modem.

As you might expect I don't do multiplayer gaming from my laptop since it's somewhat fiddly to get it setup right. :)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Really Laggy In MP
« Reply #14 on: September 03, 2009, 12:43:56 am »
No problem -- and for your other pal, you could always just try it out with him on the demo version of the game, to see how it performs.  Hopefully Hamachi smooths things out, though, but I suppose we'll see what happens.

Hamachi is a lot slower that straight up connections the proper way.

Depends on the circumstance.  Evidently it can bypass some bad router configurations, and it translates all the TCP into encrypted UDP if I remember correctly, so it has some other advantages there, too.  In the main I think you are correct, but if things are going way wrong then Hamachi can sometimes be a solution to that.

Bad configurations? I'm a networking Major damn it :P

I'm not saying your router. :)  But even if it was your ISP's router, you'd be hosed, eh?
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!