Forged Alliance Forever Forged Alliance Forever Forums 2014-04-29T13:36:14+02:00 /feed.php?f=45&t=7193 2014-04-29T13:36:14+02:00 2014-04-29T13:36:14+02:00 /viewtopic.php?t=7193&p=71943#p71943 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Ze_PilOt wrote:
There is clearly an issue with AIs slowing down the sim as the time goes by.

Some myth says it's because it's still managing wrecks, but it's probably not true, or not entirely true, as even a nuke doesn't help.


This is understood, however this should be a moot issue in multiplayer as the AI is not used.

Resin

Statistics: Posted by Resin_Smoker — 29 Apr 2014, 13:36


]]>
2014-04-29T07:48:54+02:00 2014-04-29T07:48:54+02:00 /viewtopic.php?t=7193&p=71924#p71924 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Some myth says it's because it's still managing wrecks, but it's probably not true, or not entirely true, as even a nuke doesn't help.

Statistics: Posted by Ze_PilOt — 29 Apr 2014, 07:48


]]>
2014-04-29T05:34:02+02:00 2014-04-29T05:34:02+02:00 /viewtopic.php?t=7193&p=71920#p71920 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Sheeo wrote:
Sorry for the late reply -- I'm busy with uni work :)

Resin_Smoker wrote:Pilot...

This is how to test a mod: http://www.faforever.com/forums/viewtopic.php?f=45&t=7232&p=71412#p71412

Resin


Well all right, why haven't you posted your scores?

I get ~1.700 with the mod on, and about the same with it off.

I think it'd be better to track actual memory allocations directly, using the profiling tools I've noted before.

But it does look like we'll need to look in other directions to improve simspeed.


For me to post my numbers knowing how it would be judged by most here, would appear biased.... hence pointless.
All i've done was raise awareness and provide the means so either use it or don't, the choice is yours.

Now as for "other directions", I'm all ears...

Resin

Statistics: Posted by Resin_Smoker — 29 Apr 2014, 05:34


]]>
2014-04-28T20:48:16+02:00 2014-04-28T20:48:16+02:00 /viewtopic.php?t=7193&p=71899#p71899 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>

Resin_Smoker wrote:
Pilot...

This is how to test a mod: http://www.faforever.com/forums/viewtopic.php?f=45&t=7232&p=71412#p71412

Resin


Well all right, why haven't you posted your scores?

I get ~1.700 with the mod on, and about the same with it off.

I think it'd be better to track actual memory allocations directly, using the profiling tools I've noted before.

But it does look like we'll need to look in other directions to improve simspeed.

Statistics: Posted by Sheeo — 28 Apr 2014, 20:48


]]>
2014-04-19T03:13:23+02:00 2014-04-19T03:13:23+02:00 /viewtopic.php?t=7193&p=71413#p71413 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
This is how to test a mod: http://www.faforever.com/forums/viewtopic.php?f=45&t=7232&p=71412#p71412

Resin

Statistics: Posted by Resin_Smoker — 19 Apr 2014, 03:13


]]>
2014-04-14T12:43:18+02:00 2014-04-14T12:43:18+02:00 /viewtopic.php?t=7193&p=71167#p71167 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
I did a big reclaim field (around 3000 wrecks) and 500 units going through it, no slowdown (they go through).

For intel, I don't see why, as wrecks are seen in the fog of war either way.

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 12:43


]]>
2014-04-14T12:28:39+02:00 2014-04-14T12:28:39+02:00 /viewtopic.php?t=7193&p=71166#p71166 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Ze_PilOt wrote:
If wrecks have any impact on the sim, a sandbox game with a big amount of wrecks would have a decreased sim speed.
No need to have any other test than that. We are testing wrecks, they are easy to produce in any number.

So far, I'm unable to find any correlation between sim speed & wrecks.

Same for engineers really. People thought they were lagging the game. But engy assisting a factory doesn't impact the sim speed at all. I've proven that assisting doesn't have any impact on sim speed (or very little).
Because they are not moving, like wrecks.
What is impacting sim speed is engy failing to go to the factory or units trying to go through a bunch of engy.

Like wrecks. But as wrecks can't move and units can go through...

What I'm willing to believe, but still need proof, is that wrecks from an AI are impacting the sim speed. I've seen that while testing AI for the latest patch : For every AI dead, the sim speed wasn't increasing at all.
So something was still be computed or not released correctly. Was it wreck? No idea. Maybe, maybe not. Need tests.

In conclusion, while it's good that someone is trying to solve sim speed issues, this is not a trivial change.
It can even impact the sim speed more than it solves it.
So before jumping to conclusion and integrate a code that solve a probably non-existing issue, I would like proofs.



Wrecks have a major impact when around active units... Just having a ton of wreckage with nothing to have a change in intel isnt going to show much in the SIM.

Statistics: Posted by Resin_Smoker — 14 Apr 2014, 12:28


]]>
2014-04-14T11:46:56+02:00 2014-04-14T11:46:56+02:00 /viewtopic.php?t=7193&p=71159#p71159 <![CDATA[Re: Corpse Decay]]>
Resin_Smoker wrote:
Sheeo wrote:2. I'm concerned that the overhead of a ForkThread call per wreck shadows the potential performance gain of removing wrecks in the long run. I haven't yet tried running the profiling tools (There are some goodies in /lua/system/profile.lua), but I'll try and do some tests when I have time.


Code:
         -- if wreck is in water, some of his mass is removed.
         if self:GetCurrentLayer() == 'Water' then
            mass = mass * 0.5
            energy = energy * 0.5
         end


The above snippet is from FAF Unit.lua, line 1669... I'm assuming this is what you were referring to?

I've added this to my copy of the mod and will be available on the next update.

Resin


I'm on the move atm and am not at my own machine right now, so I can't point in the code. But no, my point is that a call to ForkThread is made for every wreck -- the performance implications of which I don't know, but suspect to be high.

Now, running the profiling tools I mentioned (It's not in FAF, but in mohodata from the original fa distribution) will give us clues about performance in general, and we can use it to see if simspeed is actually improved. As Zep is writing and has tested, there doesn't seem to be that much performance slowdown -- but I really would like some proper profiling and testing done, so we actually know what to do to improve sim speeds.

Statistics: Posted by Sheeo — 14 Apr 2014, 11:46


]]>
2014-04-14T09:15:33+02:00 2014-04-14T09:15:33+02:00 /viewtopic.php?t=7193&p=71151#p71151 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Resin_Smoker wrote:
Also keep in mind that the games Default wreckage script doesn't have a Trash-Bag to clean up after a wreck has been removed from play.
This means that every wreck created is a potential memory leak waiting to happen.


Actually, it does.

It's not the first time someone says something like this, but again, I can't find evidence of that. This code is cleaning the wrecks when they are destroyed :

Code:
   
    Destroy = function(self)
        self.DestroyCalled = true
        Entity.Destroy(self)
    end,

   OnDestroy = function(self)
        if self.IsWreckage and not self.DestroyCalled then
            RebuildBonusCheckCallback(self:GetPosition(), self.AssociatedBP)
        end   
        self.Trash:Destroy()
    end,


And actually, I broke that script during the last patch period. The sim speed was hugely affected (like -7 after 10 min).
So I'm pretty sure it's working :)

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 09:15


]]>
2014-04-14T09:06:37+02:00 2014-04-14T09:06:37+02:00 /viewtopic.php?t=7193&p=71149#p71149 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]> No need to have any other test than that. We are testing wrecks, they are easy to produce in any number.

So far, I'm unable to find any correlation between sim speed & wrecks.

Same for engineers really. People thought they were lagging the game. But engy assisting a factory doesn't impact the sim speed at all. I've proven that assisting doesn't have any impact on sim speed (or very little).
Because they are not moving, like wrecks.
What is impacting sim speed is engy failing to go to the factory or units trying to go through a bunch of engy.

Like wrecks. But as wrecks can't move and units can go through...

What I'm willing to believe, but still need proof, is that wrecks from an AI are impacting the sim speed. I've seen that while testing AI for the latest patch : For every AI dead, the sim speed wasn't increasing at all.
So something was still be computed or not released correctly. Was it wreck? No idea. Maybe, maybe not. Need tests.

In conclusion, while it's good that someone is trying to solve sim speed issues, this is not a trivial change.
It can even impact the sim speed more than it solves it.
So before jumping to conclusion and integrate a code that solve a probably non-existing issue, I would like proofs.

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 09:06


]]>
2014-04-14T08:45:12+02:00 2014-04-14T08:45:12+02:00 /viewtopic.php?t=7193&p=71148#p71148 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Ze_PilOt wrote:
Resin_Smoker wrote:Just spawning units and letting them sit will not lag the sim much at all if the units are not active.


How am I supposed to move wrecks?

I think that we have first to confirm the fact that wrecks impact the sim speed before thinking on working on something like your mod.

So far, I can't confirm that wreck impact the sim speed in any way.

Testing with and without your mod in a real game won't work, they are way too many other variables. Testing wrecks, and wrecks only, is the only way to see if it's a fact or a myth.

ie. For a long time, people though that ASF were lagging the game.
In reality, they impact the sim less than any other unit, even in really big numbers.
What is impacting the sim is the projectiles they are firing. (really high fire rate for a late game unit).


I guess you need to go in statistics mode and tests X number of games with and X number of games without the mod to see if there's a pattern to test something like this. As these games last extremely long in many cases I think it will cost a lot of time, which may not be worth it. And even this may not prove it, because I don't know if any number of games will rule out the other variables in a game like that.

Statistics: Posted by Aurion — 14 Apr 2014, 08:45


]]>
2014-04-14T07:59:54+02:00 2014-04-14T07:59:54+02:00 /viewtopic.php?t=7193&p=71147#p71147 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Resin_Smoker wrote:
Just spawning units and letting them sit will not lag the sim much at all if the units are not active.


How am I supposed to move wrecks?

I think that we have first to confirm the fact that wrecks impact the sim speed before thinking on working on something like your mod.

So far, I can't confirm that wreck impact the sim speed in any way.

Testing with and without your mod in a real game won't work, they are way too many other variables. Testing wrecks, and wrecks only, is the only way to see if it's a fact or a myth.

ie. For a long time, people though that ASF were lagging the game.
In reality, they impact the sim less than any other unit, even in really big numbers.
What is impacting the sim is the projectiles they are firing. (really high fire rate for a late game unit).

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 07:59


]]>
2014-04-14T01:06:40+02:00 2014-04-14T01:06:40+02:00 /viewtopic.php?t=7193&p=71144#p71144 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
Entities are part of the SIM and they do affect performance, however IMO your testing method is lacking. Just spawning units and letting them sit will not lag the sim much at all if the units are not active.

The SIM response issues are due to changes with Intel from the creation / removal of entities and changes to their locations. Case in point, spawning several hundred units in a single location can cause a massive amount of momentary lag. This is due to the SIM catching up with the new additions and updating the intel (who can see who) across all the entities in proximity (line of sight).

You should run this mod with-in an active game to get a idea of the true performance impact.

Resin

Statistics: Posted by Resin_Smoker — 14 Apr 2014, 01:06


]]>
2014-04-14T00:24:36+02:00 2014-04-14T00:24:36+02:00 /viewtopic.php?t=7193&p=71139#p71139 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
IceDreamer wrote:
Ze_PilOt wrote:What is the proof that wreck impact sim speed?

Other than pathfinding, I can't find any evidence of that.

In a sandbox, 3000 wrecks, still running at +10. (while 1000 units alive run at +8)



I've not tried it, but the games where this might make a difference are going to be with far more units and wrecks in play. We're talking late-game Setons, 800 units per player (6400 total) plus three times that many in wrecks. That's a LOT of stuff.


I've tried with 8000 wrecks, still running at +10.

Wrecks are not impacting the sim at all, except, of course, because it can make pathfinding harder.

If I have enough time, I will try 16000 wrecks, but I don't think it will make any difference.
Doesn't make sense to begin with that something not simulated affect the simulation.

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 00:24


]]>
2014-04-14T00:21:47+02:00 2014-04-14T00:21:47+02:00 /viewtopic.php?t=7193&p=71138#p71138 <![CDATA[Re: Corpse / Wreckage Decay /w download links]]>
What is killing the sim is, well, simulation. A wreck is not simulated. So for me, it doesn't affect sim speed. My tests confirm it so far.


but this is a known fact.


Except that there was never any proof of that "fact". It's just rumors and assumptions, taken as truth over time.

Statistics: Posted by Ze_PilOt — 14 Apr 2014, 00:21


]]>