Author Topic: Dyson Sphere causing massive game slowdown?  (Read 3256 times)

Offline Dragon

  • Full Member Mark III
  • ***
  • Posts: 218
Dyson Sphere causing massive game slowdown?
« on: June 10, 2010, 02:32:30 am »
Hello, I have been playing with a couple friends for a while now, and we haven't had any major issues.  Sometimes really large battles will cause a bit of lag, but nothing more then 5 or 10% slower, and the game still responds, so it's not a big deal.

But in this most recent two player game, about 7 hours in we found a Dyson Sphere, and the game speed fell through the floor, and now it's lagging, and freezing all the time.  I have included 3 autosaves from this post, one from right before we found the Dyson Sphere, one from right after, and our latest one.  Exiting to Windows each time and then reloading the autosaves and disabling the second player, I get the following:
The first, from 6:49:21 into the game, runs pretty well, a tiny bit of lag, but nothing major.  Ships in game is ~34,500
The second save, from 6:59:21 into the game, is from shortly after finding the Dyson Sphere.  The game freezes a few times in my test minute.  Ships in game is ~35,100.
The third save, from 8:04:57 into the game, has quite a bit of lag, and freezes often.  Ships in game is ~33,600.

I am our host, and I have a quad core AMD Phenom X4 9600 running at 2.3ghz; 2gb of ddr2 ram, running dual channel; an 8800 GT with 1gb memory; and the game is installed on a striped raid 0 of two WD Raptors @ 10k rpm.  We have played games that lasted over 10 hours, have played games with 3 players, never had any issues until now.  It's been confirmed that it's my process (not render) time that hangs when we freeze, and I'm the only one that freezes, my friend just gets a waiting for players message.....

Any ideas what I could do about this, other then try to clear the system with the Dyson sphere extra fast, or start a new game without a Dyson Sphere in it?  This is the first time we have played with one, and I have noticed a few other posts about people lagging and also mentioning a Dyson Sphere somewhere in there, they just didn't blame it.  So here I am, connecting the dots, and attempting to figure out the problem. :-)

~Dragon

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dyson Sphere causing massive game slowdown?
« Reply #1 on: June 10, 2010, 08:11:15 am »
Thanks for the "the good, the bad, and the ugly" saves ;)  That will be a huge help in finding the problem.  Will take a look.
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 keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dyson Sphere causing massive game slowdown?
« Reply #2 on: June 10, 2010, 09:09:50 am »
Ok, ran it (the third save, post 8-hours) single-player (second player disabled) on the profiler, and then just ran it to see the player perspective.  Basically when I run it normally there's a fair bit of chugginess at the beginning for maybe 15 seconds, but that's normal when loading a game.  After that, so long as I'm on the low-render-time galaxy map at least, there's never much more than 50% cpu lag (300ms instead of 200ms turns), and honestly big battles at 300ms/turn don't even feel like significant slowdown to me, it just lets me see more of what's going on ;)

In the profiler there aren't any smoking guns in the way of something taking way more than it should. The target-list-updating code is about 14 to 20 percent of the total cpu load (so roughly 28 to 40 percent of the main thread's load, because the ai runs on another thread, though only on the host machine; non-hosts don't run the ai thread at all).  Normally the target list updates are closer to 5 to 8 (10/16).  But this makes sense because you've got 600 ships versus 3500, and dyson gatlings kicking around as well (doing target searches against the full 4000+, at least until it starts spawning friendly gatlings because you killed the AI command center).  The standard handle-per-cycle-per-ship (including movement) code is taking 10-11 (20/22) percent but that's also not terribly worse than normal, there's a lot going on.

It's theoretically possible that what you're seeing in terms of freezes is due to network traffic overload due to some bug with dyson stuff sending tons of unbatched commands or something... but I really don't think that's happening.

The main thing I notice is that your save file is from version 3.120 (the last official, thus understandable).  We've made some pretty ridiculous performance improvements since then (current beta version is 3.171), and that might help a lot.  That is a beta version but we are basically into the release-candidate phase and just fixing bugs, etc (official release planned for next Thursday, the 17th).  Of course, there would be some balance shifts if you updated midgame and I know lots of folks aren't too keen on that.

If you want you can copy your AIWar folder (saves and all) to some place, update that copy, and load the copy of the save and see how it performs; at least I would be very interested in the before-and-after performance :)

Anyway, my suggestion is:
1) Update.
2) If you don't want to update (lots of folks only play officials, I understand), nuke the dyson planet ;)

Thanks for the report, and welcome to the forums :)
Keith
« Last Edit: June 10, 2010, 09:11:47 am by keith.lamothe »
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 x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dyson Sphere causing massive game slowdown?
« Reply #3 on: June 10, 2010, 10:54:32 am »
Yeah, I was going to check out the version number on this, too; I figured it might be older than the latest betas, which have all those crazy performance fixes that seem particularly relevant for this sort of scenario.  But I see you already beat me to it. ;)
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 Dragon

  • Full Member Mark III
  • ***
  • Posts: 218
Re: Dyson Sphere causing massive game slowdown?
« Reply #4 on: June 10, 2010, 01:39:45 pm »
I tried the beta and it ran smoother.  It still had a bit of lag, but there were quite a few large battles, so that makes sense.  No more freezing, although it is still just single player, I'll try with my friends at some point soon, and see if that fixes it.  I noticed a few strange things, so I figured I should let you guys know.

Things that can't be repaired no longer say they can't be repaired, which makes it seem rather odd when repair platforms don't repair them.
One (I only checked around 5 though) of the planets I checked had 2,500 / 2,500 knowledge, the rest had 2,000 / 2,500.

Is there somewhere I can find beta patch notes before you push it to an official patch?

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dyson Sphere causing massive game slowdown?
« Reply #5 on: June 10, 2010, 01:42:03 pm »
Quote
Is there somewhere I can find beta patch notes before you push it to an official patch?
http://arcengames.com/mediawiki/index.php?title=AI_War_-_Current_Beta

Quote
I noticed a few strange things, so I figured I should let you guys know.
Thanks :)

Quote
Things that can't be repaired no longer say they can't be repaired, which makes it seem rather odd when repair platforms don't repair them.
Hmm, might be from the recent tooltip overhaul.

Quote
One (I only checked around 5 though) of the planets I checked had 2,500 / 2,500 knowledge, the rest had 2,000 / 2,500.
Yep, you also can't easily knowledge raid anymore (can still be done, just much more involved).

Glad to hear it runs smoother in the beta, I hope it works for multiplayer too :)
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 x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dyson Sphere causing massive game slowdown?
« Reply #6 on: June 10, 2010, 01:42:28 pm »
Great, glad that's running smoother.

For the beta patch notes (there are a ton of them):  http://arcengames.com/mediawiki/index.php?title=AI_War_-_Current_Beta#Prerelease_3.170

Other notes:

1. The Can't Be Repaired thing is still there, it just moved up to the top line instead of being in the abilities list.

2. Planets now have 2500 knowledge on them, rather than 2000, so hence that.

Thanks for the notes!
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 Dragon

  • Full Member Mark III
  • ***
  • Posts: 218
Re: Dyson Sphere causing massive game slowdown?
« Reply #7 on: June 27, 2010, 02:56:42 pm »
Okay, so since it's still going rather slowly, here is a newer save.  14:13:23 into the game.  Game time.  Since the last save, ~8 hours into the game, while only 6 hours game time have passed, we have likely played 20+ hours real time.  While it is rather annoying, we seem rather close to finishing this game, so that's why we haven't started another game.  The battles on the Dyson Sphere planet ended, so I don't know if it's that or not.  I suppose I could "branch" the save and try nuking the planet and see if that fixes it....

For reference, I set up a two minute timer, and started it about 2 seconds after the "manage players" reload thingy had finished.  While it did still have a couple seconds of load up lag still, that was gone quickly, and replaced with "normal" lag.  Two minutes later when the timer went off, I paused the game.  It is now 14:13:50, 27 seconds farther on.  I'll admit, it is in the middle of a battle, but.....  1/4 speed seems rather excessive, even for battles.

Nuking the planet won't help, since the Dyson Sphere and all the Gatlings are Immune to Nukes..... :-/

Oh, and I am on the very latest, cutting edge Beta. :-)



« Last Edit: June 27, 2010, 03:19:57 pm by Dragon »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dyson Sphere causing massive game slowdown?
« Reply #8 on: July 08, 2010, 09:04:38 pm »
Sorry, this fell off my radar, been buried in Tidalis stuff.  Is that still a current save that you're trying to make progress from?  If not, if you could post your current working save I could check something that might help.
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 Dragon

  • Full Member Mark III
  • ***
  • Posts: 218
Re: Dyson Sphere causing massive game slowdown?
« Reply #9 on: July 09, 2010, 01:09:50 pm »
We pretty much stopped playing that game because it was so slow.  Now we are playing on a 60 planet map, without a Dyson sphere, and it's running much better.  Still bits of lag now and then, because the AI is using Laser Gatlings, so the waves of 2,000 ships tend to lag the game for a minute or so, but then it's back to normal.  Not the prolonged lag of the game referenced here.