Author Topic: AI War Official 8.002-8.005 "Lock And Load " Released!  (Read 7174 times)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
AI War Official 8.002-8.005 "Lock And Load " Released!
« on: August 25, 2014, 10:17:00 am »
Original: http://arcengames.com/ai-war-official-8-002-lock-and-load-released/

This one is our second post-8.0 update. It's another intentionally small one, as we're trying to wait and see if there are any serious things that crop up before going through other kinds of bugfixing or balancing.

In this particular case, some people experience slow loading times per image on their specific machine setup.  This is apparently something to do with the WWW class in the unity engine, and strikes only some machines for the people that even experience (aka their high-powered desktop suffers from it, but their lesser laptop runs like a dream).  In order to mitigate/remove the effect of this, there are some new options and default behaviors that help with loading concurrency.  That way you don't wind up having to wait for things to load sequentially, all that time gets set next to itself.  It's an unfortunate bug in the underlying unity engine, but this should really help to keep the problem to an absolute minimum impact for those few who are affected.

Update: 8.003 fixes a bug preventing the display of shots and explosions in the prior version, as well as making the max loading threads slider clearer and easier to use.

Update: 8.004 beta update out to hotfix an issue that causes a crash while (auto)saving when the game is run with the steam overlay enabled (and, probably, the report-high-scores option on).

Update: 8.005 official update out to hotfix a performance issue that has been plaguing some players since the unity engine upgrade.  It was actually affecting everyone, but it was only really that noticeable on some machines.

Update: 8.006 official update out to hotfix a performance issue that was still affecting some folks.  This returns the rendering pipeline to a state that we are more directly sorting for performance purposes rather than letting the unity engine asynchronously try to handle it on its own.  It seems to help, given the volume of stuff that gets drawn in this game.

Enjoy!

This is a standard update that you can download through the in-game updater itself, if you already have 4.000 or later. When you launch the game, you'll see the notice of the update having been found if you're connected to the Internet at the time. If you don't have 4.000 or later, you can download that here.
« Last Edit: September 08, 2014, 10:17:47 am 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 Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #1 on: August 25, 2014, 11:34:51 am »
Quote from: Patch Notes
A new Max Loading Threads settings option has been added to the graphics tab.
Default 200. Setting this to progressively higher values will make more images/etc try to load from disk simultaneously. On some operating systems (like OSX), there are hard limits on how many threads can be running at a time. In those cases the limit is often 256, so going above 220 is probably not a great idea. For other operating systems, you may be able to crank this up and have better concurrent loading speeds.
Previously the default was 140, but 200 should be safe for all OSes.
Thanks to Aklyon and doctorfrog for inspiring this change.
And how the heck am I supposed to know what's the current value?
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #2 on: August 25, 2014, 11:41:07 am »
Eep!  It was supposed to show you that, sorry.  If you are on windows, you can just crank that up to about halfway or more, and it should be fine.
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 Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #3 on: August 25, 2014, 11:43:33 am »
Ok np.
Also I don't quite understand what this things does. Does it affect performance? If yes.. how? What would happens If I set it to minimum and what if I'd set it to maximum?
EDIT: Ok actually the patch notes answer that question partially but whatever.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #4 on: August 25, 2014, 11:58:42 am »
It affects disk loading only.  So in other words, think of it like this:

1. If the number of max disk threads is 10, and you need to load 4000 items, then it will start loading 10, and then as soon as 1 finishes then it puts another in the list, and then another when the next one finishes, and so forth.

1.a. Assuming that the loading time and processing time are about even, then this is really just as efficient as any other method.  However, that is NOT the case, because once something is loaded off disk it needs at least a few ms to convert its format from PNG into a GPU-specific compressed texture format that is prepped for being able to be sent along the bus immediately at any time to the GPU.

1.b. Even assuming that you only had a single-core processor with no hyperthreading or anythinig, case 1 is still somewhat less efficient because your CPU is still able to split things between threads, and your disk IO (which is the biggest bottleneck for any sort of loading operation) is not being fully utilized during the time when there is texture compressing, etc, going on.

2. In the case that we've been using for a while, we used 140 threads at max.  So in the case where you need to load 4000 items, the likelihood of your disk IO ever being underutilized is basically zero.  The ratio of CPU-processing time to the number of threads to the amount of disk IO at all available on modern hard drives -- even SSDs -- is such that unless you had the fastest SSD possible paired with a 15 year old CPU somehow, then you'd likely not be wasting any disk I/O.  Even with theoretical future hardware, as long as CPUs remain equal to or faster than HDD loading speeds when it comes to these sorts of operations, it's perfectly fine.  And that's highly likely.

3. However, in the case of the Unity bug, it can randomly tack on an extra 3-10 seconds of CPU "processing" where it does NOTHING.  It just sits there, not even spinning cycles or using CPU capacity.  What is it doing?  I have no idea.  It only affects certain systems, and never has affected one of mine.  It did affect one of Keith's systems a year or so ago, but does not any longer.  Anyway, in this case, Unity is basically "helpfully" simulating your having the worst CPU in the world, paired with whatever your hard drive is. 3-10 seconds to process that texture!?  My 800mhz 2001 laptop could have managed better than that.

3.a. In this case, the amount of concurrency matters a lot.  If you have 4000 threads to load, and you set a maximum of 4000 threads loading at once, then basically it throws everything at the disk I/O at once.  The operating system is going to go "whoa, buddy, you guys are going to have to get in line because you just asked me for a mess-ton of stuff at once."  So your disk I/O will be pegged at full capacity, which is what we want.  But the OS manages which things get loaded first, and that's fine with us because order doesn't matter.  Meanwhile, on the CPU side, while each of these 4000 threads "spaces out pointlessly" for 3-10 seconds, they are all pretty much doing it simultaneously for the most part, or at least close to that, rather than doing it a few at a time.  This makes it so that those stupid space-outs happen more on top of one another rather than one after another, in other words.


Anyhow, that's how it helps with that particular issue.  How will this affect performance during the rest of the game?  Basically it won't.  It only affects things like loading graphics and music, and it only has any effect at all when there are more than 140 of them that need to load at once.  That almost never happens during the game itself, and if it did happen then that would be a case where you'd get a moment of lag anyway, and if you fall into case #3 above, then it would actually HELP your performance.  But in the case of a few images popping in every so often, those are in 2s and 3s, or even a few dozen at once, not 4000 at once, heh.

In terms of negative side effects, there really are none... except that on certain OSes, the number of disk calls are directly tied to the number of threads in a program in general, and the max thread count is set to something like 256.  So in those cases, if you exceed 256 threads, you get a crash.  Hence my not cranking this up automatically for everyone.
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 Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #5 on: August 25, 2014, 12:16:31 pm »
Ahh ok. Thanks.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #6 on: August 25, 2014, 12:17:27 pm »
Np.
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 Vyndicu

  • Sr. Member
  • ****
  • Posts: 319
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #7 on: August 25, 2014, 12:21:17 pm »
It may not be a bad idea to have a "input a number" box instead of drag and drop bar. As that give you more discrete control as moving from 220 to 219 will be difficult to do for example without a number box to type in. Just a thought but otherwise nice small patch.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #8 on: August 25, 2014, 12:29:18 pm »
It actually only lets you move by 10s anyway, and then later 20s, then 50s, then 100s.
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 Vyndicu

  • Sr. Member
  • ****
  • Posts: 319
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #9 on: August 25, 2014, 01:46:15 pm »
It actually only lets you move by 10s anyway, and then later 20s, then 50s, then 100s.

It doesn't matter what the interval is because my screen is 1920 * 1080 and my mouse is config to have a high screen movement ratio to movement on mousepad (It is really !!fun!! watching family member trying to use my mouse).

It is just a common problem with "slider" in general and nothing wrong with how you did it.

Offline Wingflier

  • Core Member Mark II
  • *****
  • Posts: 2,753
  • To add me on Steam, click the little Steam icon ^
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #10 on: August 25, 2014, 03:05:57 pm »
There's a weird bug with the new patch, it just started happening, I can no longer see shots being fired among units. It's as if the "hide shots" button was clicked, but it's not clicked. It doesn't matter how much I messed with the new interval bar, it doesn't fix the problem. It's pretty frustrating.

Windows 7 64-bit and Radeon HD 7950
"Inner peace is the void of expectation. It is the absence of our shared desperation to feel a certain way."

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002 "Lock And Load " Released!
« Reply #11 on: August 25, 2014, 03:14:19 pm »
There's a weird bug with the new patch, it just started happening, I can no longer see shots being fired among units. It's as if the "hide shots" button was clicked, but it's not clicked. It doesn't matter how much I messed with the new interval bar, it doesn't fix the problem. It's pretty frustrating.

Windows 7 64-bit and Radeon HD 7950

Yep, 8.003 just came out to fix 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 Wingflier

  • Core Member Mark II
  • *****
  • Posts: 2,753
  • To add me on Steam, click the little Steam icon ^
Re: AI War Official 8.002-8.003 "Lock And Load " Released!
« Reply #12 on: August 25, 2014, 03:15:57 pm »
I say sir, that was wicked fast.
"Inner peace is the void of expectation. It is the absence of our shared desperation to feel a certain way."

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War Official 8.002-8.003 "Lock And Load " Released!
« Reply #13 on: August 25, 2014, 03:17:26 pm »
Keith did the fix on that one, and it was reported a couple of hours ago.  But it's always nice to seem fast! ;)
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 doctorfrog

  • Hero Member
  • *****
  • Posts: 591
Re: AI War Official 8.002-8.003 "Lock And Load " Released!
« Reply #14 on: August 25, 2014, 11:33:46 pm »
Is this a bug or new UI element?