Login  Register
 



Post new topicReply to topic Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28, 29  Next
 
Author Message
 PostPosted: 24 Apr, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
Ok if it doesn't add duplicate conditions that would make more sense then. I guess I'm kind of surprised that there are that many conditions to check then if pretty much the same conditions are there if you have 1 or 10 expansion bases. It doesn't look like there is a condition monitor thread per base. When a friend and I are playing vs. the AI and we have destroyed everything but the main base it doesn't seem like there is a huge improvement in performance.

I believe people were also stating the game really slows down once it hits T3 stage. Are there any build conditions that are no longer really required after a location moves up from say T1 to T2 to T3. Maybe some of the unused T1/T2 level conditions could be skipped over in the same manor assuming this is a big CPU hog?


Top
 Profile  
 PostPosted: 10 May, 2008 
 

Joined: 28 Feb, 2007
Posts: 26
Offline
One thing I've come across in the last week is a problem with Stop() function.

In the EconAssistBody function in platoon.lua there is this bit of code:

Code:
        if assistee  then
            self:Stop()
            eng.AssistSet = true
            IssueGuard( {eng}, assistee )
        else
            self.AssistPlatoon = nil
            self:PlatoonDisband()
        end


Now if the assistee is a factory everytime the self:Stop() statement is called the AI creates another factory AI thread. You can see this by putting log statements around the self:stop() statement and a log function in the AddFactory function in FactoryBuilderManager.lua. I think this is due to the callbacks of the thread that created the factory being called everytime the stop() statement runs. And the callback is to create the factory.

I had a log function counting factories and soon as an engineer assisted a factory upgrade the number of factories shot up. I've seen the AI thinking it had 200 factories in the first 10 minutes when there is only 15.

Now I think this is also happening with Engineers and the AI is runs multiple Engineer threads for the same engineer.

I've tried replacing all the self:Stop() statements with self:StopAI() in Platoon.lua which does seem to keep the simspeed down but alot of engineers and platoons often become idle and just sit around (which probably helps the simspeed stays down).

I haven't had the time to come up with an definate fix for this and go through every Stop() statement to see which ones causes problems so I thought I would throw it out and see what everyone else thinks.


Top
 Profile  
 PostPosted: 10 May, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
Interesting. What seems to be happening is when the engineer stops the UnitConstructionFinished() callback is getting called. This function is used to add finished factories to the factory manager and to add finished units to the engineer manager.

Adding a check to AddFactory() to make sure duplicate factories don't get added may help.

_________________
Image


Top
 Profile  
 PostPosted: 12 May, 2008 
 

Joined: 28 Feb, 2007
Posts: 26
Offline
It is a strange one. Adding a check to the AddFactory() is a good idea.

I was thinking of adding a check in EconAssistBody that if the assitee is an engineer it doesn't stop. This probably would be a problem if the last command was something else however.

StopAI() seems to be the best option but I need to do more testing to see it doesn't break anything.


Top
 Profile  
 PostPosted: 12 May, 2008 
 
User avatar

Joined: 01 Mar, 2007
Posts: 1999
Location: Perth, Western Australia
Offline
How about if you replace the

self:Stop()

in EconAssistBody with

IssueClearCommands(eng)

?

Seems to be about the only spot that will cause the issue. Possible also in ReclaimAI and AssistBody.

Also I noticed in the EngineerBuildAI in my mod I removed the initial stop at the start of the function... cant remember why now, but maybe related.

_________________
My Mods:
SC - Duel AI, Close-up Camera, Alternative Music Order
FA - AI patch, Air/Land/Naval AI, Null AI, Swarm AI, AIAllyControl, Base Assault, Return to Fabs Balance Patch
SC2 - Research log in replays, Mass Extractor Balance.


Top
 Profile  
 PostPosted: 13 May, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
I don't think that will help. The UnitConstructionFinished() will still get called anytime hte Engineer finishes building, whether because the script tells it to stop, the unit gets built, or the engineer gets assigned to another task.

I have added a check to my working copy to prevent the factory manager from adding duplicate factories over and over. Haven't run any test watching Sim speed to see if there is any difference.

_________________
Image


Top
 Profile  
 PostPosted: 19 May, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
I posted in sorian thread but I will here as well. It looks like there was an improvement in sim performance because of this change.

Thank you for the continued effort, every little bit helps. :)


Last edited by tfp on 19 May, 2008, edited 1 time in total.

Top
 Profile  
 PostPosted: 19 May, 2008 
 

Joined: 06 Nov, 2007
Posts: 1178
Offline
Thanks to the improvements made by the wonderful AI crafters here, I've seen a more than 200% increase in simspeed on maps with multiple AI's when compared to vanilla performance. I and my friends who play with me just wanted to re-state our appreciation for all your hard work.


Top
 Profile  
 PostPosted: 19 May, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
For the help it does there is still a lot of sim time difference between one building standing and destroying it. On Emerald Crater VIII, at it's worst sim time was down to minus -4/-5 at some points. Not a huge improvement once I destroyed the 3 expansions. After wiping out most of the main base it was near -2/-3. After all building units and factories were dead it was at 0/-1 depending if T3 Guns were firing. Once the last defense building was knocked out sim time went to the low to mid 20s which is +6/+5.

One thing though I did have the total vet mod on, not sure what kind of performance hit that causes if any. I didn't think about turning it off before running the game.

On Emerald Crater VIII
1 AI (Aeon)
1K units
3 Land expansion/0 water
1.3Pre1 AI release
duncane Ai patch 1.7 and T1 no tech
vet mod on

PD 805 @ 3.6Ghz
2.93 GB Ram (in windows...)


Top
 Profile  
 PostPosted: 27 May, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
whylikethis wrote:
Now I think this is also happening with Engineers and the AI is runs multiple Engineer threads for the same engineer.


I've looked at the updated code and I can see the check for AddFactory but I don't see one in the Engineer manager. I was expecting it in the Addbuilder function, is that not correct location or is this patch not needed for Engineers?


Top
 Profile  
 PostPosted: 27 May, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
It should not be needed for engineers, but I can add a check anyway.

_________________
Image


Top
 Profile  
 PostPosted: 27 May, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
I wasn't sure either way, just wondering about finally out come of whylikethis findings.

If engineers build threads were getting lost then the check should help. If not then the check might waist time. I wasn't sure what you saw during your debugging.


Top
 Profile  
 PostPosted: 31 May, 2008 
 

Joined: 15 Aug, 2007
Posts: 326
Offline
Ancalagon wrote:
Quote:
Why do we need to test against vanila? i really dont care about its preformance, all i want to solve is the FA slowdown.



Because lots of people believe its caused by people with inadequate system specs, or running antivirus, or whatever. Basically they believe its the fault of the system, and not FA.

What I hoped to achieve there was to show that most computers have no problems with Vanilla, but have problems with FA, and thus the problem lies with FA, not the system.


The problem is DEFINITELY with FA, I get it 100% of the time in skirmish games.

I can run +10 with more then 4 Sorian AI's in regular supcom on a large 81kx81k map in vanilla.. In FA I can barely handle 2v2 without late game lag on moderate 20x20 maps.


Top
 Profile  
 PostPosted: 01 Jun, 2008 
 

Joined: 18 Apr, 2008
Posts: 49
Offline
Sorian I think you are correct about then Engineers. Assuming I did this correctly I don't see Engineers being added more then once in the EngineerManager. That is about 20 minutes into a game so more then enough assists have happened.

Code:
    AddUnit = function(self, unit, dontAssign)
        for k,v in self.ConsumptionUnits do
            if EntityCategoryContains( v.Category, unit ) then
      if not self:ConsumptionUnitAlreadyExists() then
                   table.insert( v.Units, { Unit = unit, Status = true } )
                   table.insert( v.UnitsList, unit )
                   v.Count = v.Count + 1
      end
                LOG(v.Count)
...

end,

    ConsumptionUnitAlreadyExists = function(self, unit)
   for k,v in self.ConsumptionUnits do
            if v.UnitsList == unit then
LOG("*AI DEBUG: Consumption Unit Already Exists!")
                return true
            end
        end
   return false
    end,


Top
 Profile  
 PostPosted: 01 Jun, 2008 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
The thing with the engineers is they only add new units when OnStopBuild() get fired and that only returns the unit being built, not the unit being assisted. The only way an engineer gets added to the engineer manager (prior to 1.3PR4) is when a factory fires OnStopBuild().

The reason for the multiple factories is when multiple engineers work to build a factory they all fire OnStopBuild() when the factory is done.

From 1.3PR4 and on the only other way an engineer gets added to the engineer manager is when OnCaptured() gets fired.

_________________
Image


Top
 Profile  
 PostPosted: 27 Aug, 2008 
 

Joined: 24 Mar, 2007
Posts: 61
Offline
(newb extreme to programming so i may be wrong)

Is there a way to run an in game check, say every 5 minutes, to determine how many of each unit an ai has instead of just relying on the OnStopBuild() being fired. my be totally redundant but could help eliminate units sitting around or engies that got forgotten some how. or just for the sake of comparison so that all the numbers are equal and there isn't some dead units still being counted.


Top
 Profile  
 PostPosted: 17 Dec, 2008 
 

Joined: 08 Oct, 2008
Posts: 31
Location: Newthorpe
Offline
It's happened to me on Mark's Abyss and World Domination (downloaded), it usually happens after about 20 minutes. There has been 7 other AI at the time. I was not using any mods.


Top
 Profile  
 PostPosted: 23 Dec, 2008 
 

Joined: 12 Dec, 2007
Posts: 3
Offline
I havent played FA in months. Have either the 3599 patch or sorians latest done anything to improve simspeed in recent months? thanks.


Top
 Profile  
 PostPosted: 06 Jan, 2009 
 

Joined: 19 Feb, 2007
Posts: 39
Offline
well heres something strange that severely puts an increase in cpu useage but probably shouldn't.

It occurs when a large number of engineers are ordered to reclaim a large number of structures. the catch here is that some other unit sucks the buildings up before the large group of engineers get there. It's like the engineer AI freaks out trying to find the buildings or something...

so start a finns revenge sandbox game with none but yourself. (set victory conditions to none)

get a base going and build 24 ACU's (just to make sure the game has a decent sized base to process) build over 100 T1 power generators. Now move the ACU's far away. Probably to the other side of the island just to be safe. and then give them the order to reclaim all the power gens. next have your commander reclaim all the power generators.

My FPS takes a huge dive when I did that. I have a G16 keyboard (it's got an LCD screen built into it) and it says the cpu cores pretty much max out after the first 10-30 power gens are reclaimed, my FPS takes a huge dive and it gets worse the more power gens that are reclaimed. Before this though, the cores sit around 60%-80%.

I'm running a single core P4 2.8ghz prescott (hyperthreaded, so no not really two cores but everything sees it that way and games that support multicores do run a lot faster than if I turn hyperthreading off)

_________________
ouch


Top
 Profile  
 PostPosted: 09 Jan, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 285
Location: Perth, Australia
Offline
talkshowhost wrote:
I havent played FA in months. Have either the 3599 patch or sorians latest done anything to improve simspeed in recent months? thanks.


I'd also like to know if this was ever fixed. Despite regularly playing the original Supreme Comamnder, I stopped playing Forged Alliance barely a week after purchase when the sim speed would slow to a crawl in absolutely every game I played. As you can understand, a game gets old a bit quickly when that happens.


Top
 Profile  
 PostPosted: 18 Jan, 2009 
 

Joined: 18 Jan, 2009
Posts: 10
Offline
My previous System was:
Core 2 Duo E6600
2 GB DDR2 RAM
GTX260

And i'm playing now with:
i7 920
3 GB DDR3 RAM
GTX260

1680x1050 all except shadows maxed out

The interesting part was with Sorians AI(1.85b)
that the slow down does not mainly depend on CPU Power.

Well, on the C2D both cores were crazy in my normal 2human vs 2SAIx Games on Field of Isis.
But with my i7 one Core just keeps beeing at 70-90% Loadout and one at 40%, third at 20-30%, all other cores chilling.

Simspeed with my C2D in Multiplayer slowed down in lategame to approx. -5 - -7.
With the i7 it goes to -1 - -3. I assume that these values depended on the Specs of my mate (Higher C2D, 2GB,SLI System).

But now the interesting part:

I watched some skirmish matches 5-7 SAI AIx "fighting"(20 min norush) each other.

CPU loadout doesn't raise to much, never reached 90% or more on one core. But:

On Field of Isis: Slowed down to +2 - +4 with 20 minute norush at approx 5 mins left of norush time
On Selthons Clutch(i.e): Slowed down to 0 with the above settings and times
On 40x40 map: Slowed down to -2 - -4.
CPU usage still not going higher than 90%.
tried this with fewer AIx - no big change.

Some Thoughts pop up in my mind with my system:
- The problem is not the CPU power (or WinXP struggles with the last 10% of CPU Power displayed)
- The problem is not the count of AIs ingame
- The problem is not the count of wrackages on the map(no rush option, remember)
- The problem might be high memory reservation coresponding with the map-size(don't know why).

The interesting thing with these slow downs is that the huge slow down happens from 5 minutes to 0 minutes left of norush time and more interesting: the hard swapping i told about above is a swapping that only occures for a short moment and affects not only the moment itself, - it slow slows down the game permanently for the future.


Top
 Profile  
 PostPosted: 18 Jan, 2009 
 
User avatar

Joined: 28 Feb, 2007
Posts: 4122
Location: Marysville, WA USA
Offline
5 minutes left of No Rush is when the AI starts building units in preparation for No Rush ending.

_________________
Image


Top
 Profile  
 PostPosted: 18 Jan, 2009 
 

Joined: 05 Dec, 2008
Posts: 9
Offline
Something just occurred to me. How does the game distribute the sim load with AIs and suchlike?

e.g. 2 players, 4 AIs. Does each of the 2 machines get to run 2 AIs? Does the hosting machine run all 4 AIs? How does it work? The reason I'm asking is the following - if the sim speed load is distributed across the machines, then there is the option of adding another machine into the mix. That means I could have 3 players/machines (one is a dummy player just left alone to die with observing enabled). Have that machine host the game. That would give an extra machine to distributed the AI / sim load over.

Would this help? Is there anyone here with the knowledge of the internals of the game engine who could answer that?


Top
 Profile  
 PostPosted: 19 Jan, 2009 
 

Joined: 05 Oct, 2007
Posts: 16426
Location: camping near the biggest power-up
Offline
all computers run all AI concurrently, the game speed is hence determined by the weakest link; the slowest computer.

i expect several people (including the greats Sorian and Duncane) to validate this.


Top
 Profile  
 PostPosted: 19 Jan, 2009 
 

Joined: 10 Apr, 2008
Posts: 299
Location: Turkey
Offline
FunMaker wrote:
My previous System was:
Core 2 Duo E6600
2 GB DDR2 RAM
GTX260

And i'm playing now with:
i7 920
3 GB DDR3 RAM
GTX260

1680x1050 all except shadows maxed out

The interesting part was with Sorians AI(1.85b)
that the slow down does not mainly depend on CPU Power.

Well, on the C2D both cores were crazy in my normal 2human vs 2SAIx Games on Field of Isis.
But with my i7 one Core just keeps beeing at 70-90% Loadout and one at 40%, third at 20-30%, all other cores chilling.

Simspeed with my C2D in Multiplayer slowed down in lategame to approx. -5 - -7.
With the i7 it goes to -1 - -3. I assume that these values depended on the Specs of my mate (Higher C2D, 2GB,SLI System).

But now the interesting part:

I watched some skirmish matches 5-7 SAI AIx "fighting"(20 min norush) each other.

CPU loadout doesn't raise to much, never reached 90% or more on one core. But:

On Field of Isis: Slowed down to +2 - +4 with 20 minute norush at approx 5 mins left of norush time
On Selthons Clutch(i.e): Slowed down to 0 with the above settings and times
On 40x40 map: Slowed down to -2 - -4.
CPU usage still not going higher than 90%.
tried this with fewer AIx - no big change.

Some Thoughts pop up in my mind with my system:

- The problem is not the count of AIs ingame
- The problem is not the count of wrackages on the map(no rush option, remember)
- The problem might be high memory reservation coresponding with the map-size(don't know why).

The interesting thing with these slow downs is that the huge slow down happens from 5 minutes to 0 minutes left of norush time and more interesting: the hard swapping i told about above is a swapping that only occures for a short moment and affects not only the moment itself, - it slow slows down the game permanently for the future.


Funmaker why dont you use "Core Maximizer" and then test again..maybe the results will change..

_________________
Sorian, Duncane, Domino made me play SupCom !


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28, 29  Next



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy