Not a member yet? Why not Sign up today
Create an account  

  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
V2.02 [Dev Test] CONTENT Update

#31
Twice now I've had my game just freeze while running on adventure mode. It doesn't happen often, but prior to current build I don't remember it happening ever. Both times the log has had similar spam from projectile system, starting with:

Code:
StackOverflowException: The requested operation caused a stack overflow.
  at ProjectileDamage.ProcessAll (.ProjectileImpactState pState, .GridCastReturn hits, Single effectiveDistance) [0x00000] in <filename unknown>:0
  at ProjectileCastingSystem.Cast (.ProjectileImpactState pState, UnityEngine.Transform myTransform, Vector3 newPosition, Vector3 currentPosition, Vector3 normalisedDirection, Single distance) [0x00000] in <filename unknown>:0
  at ProjectileCastingSystem.CastMe (.ProjectileImpactState pState, UnityEngine.Transform myTransform, Vector3 newPosition, Vector3 currentPosition, Vector3 normalisedDirection, Single distance) [0x00000] in <filename unknown>:0
  at PooledFragment.MoveProjectile () [0x00000] in <filename unknown>:0

I'll attach full log to post.

.zip   output_log.zip (Size: 17.9 KB / Downloads: 23)

-- edit --
Third time, same problem - game freezes, log has stack overflow with projectile casting.

.zip   output_log2.zip (Size: 18.63 KB / Downloads: 23)
Workshop: Voidware, INARI and more.

#32
Also, question..

Code:
// Block
public float GetEffectiveArmourClassForExplosionResistanceInAGivenDirection(Vector3i ArrayDirection)
{
    if (!this.item.ExtraSettings.StructuralComponent)
    {
        return this.item.ArmourClass;
    }
    float num = this.item.ArmourClass;
    for (int i = 1; i <= 4; i++)
    {
        Block blockViaMatrixElement = this.MainConstruct.iBlocks.GetBlockViaMatrixElement(this.ArrayPosition + ArrayDirection * i);
        if (blockViaMatrixElement == null || !blockViaMatrixElement.item.ExtraSettings.StructuralComponent)
        {
            break;
        }
        num += blockViaMatrixElement.item.ArmourClass * Block.AcContributionsPerLayer[i - 1];
    }
    return num;
}

If I understand this correctly, explosions only count the first 4 layers of armor, not the full 8 layers? If so, is this intentional?
Workshop: Voidware, INARI and more.

#33
Maybe something to do with explosive radius?

#34
(2017-09-05, 08:46 PM)Kiriko Wrote: Also, question..

Code:
// Block
public float GetEffectiveArmourClassForExplosionResistanceInAGivenDirection(Vector3i ArrayDirection)
{
    if (!this.item.ExtraSettings.StructuralComponent)
    {
        return this.item.ArmourClass;
    }
    float num = this.item.ArmourClass;
    for (int i = 1; i <= 4; i++)
    {
        Block blockViaMatrixElement = this.MainConstruct.iBlocks.GetBlockViaMatrixElement(this.ArrayPosition + ArrayDirection * i);
        if (blockViaMatrixElement == null || !blockViaMatrixElement.item.ExtraSettings.StructuralComponent)
        {
            break;
        }
        num += blockViaMatrixElement.item.ArmourClass * Block.AcContributionsPerLayer[i - 1];
    }
    return num;
}

If I understand this correctly, explosions only count the first 4 layers of armor, not the full 8 layers? If so, is this intentional?

When I read this code, it's more the angle at which the stacking is checked that is a problem.
It must come at 90 degrees, unlike the stacking calculated for kinetic impacts which can come from any angle.

But there's no easy solution, so the calculation will be biased anyway.
So why bother with extra layers (and extra-computations) if we are not sure that the result will be more precise?

#35
(2017-09-06, 05:58 PM)Gladyon Wrote:
(2017-09-05, 08:46 PM)Kiriko Wrote: Also, question..

Code:
// Block
public float GetEffectiveArmourClassForExplosionResistanceInAGivenDirection(Vector3i ArrayDirection)
{
    if (!this.item.ExtraSettings.StructuralComponent)
    {
        return this.item.ArmourClass;
    }
    float num = this.item.ArmourClass;
    for (int i = 1; i <= 4; i++)
    {
        Block blockViaMatrixElement = this.MainConstruct.iBlocks.GetBlockViaMatrixElement(this.ArrayPosition + ArrayDirection * i);
        if (blockViaMatrixElement == null || !blockViaMatrixElement.item.ExtraSettings.StructuralComponent)
        {
            break;
        }
        num += blockViaMatrixElement.item.ArmourClass * Block.AcContributionsPerLayer[i - 1];
    }
    return num;
}

If I understand this correctly, explosions only count the first 4 layers of armor, not the full 8 layers? If so, is this intentional?

When I read this code, it's more the angle at which the stacking is checked that is a problem.
It must come at 90 degrees, unlike the stacking calculated for kinetic impacts which can come from any angle.

But there's no easy solution, so the calculation will be biased anyway.
So why bother with extra layers (and extra-computations) if we are not sure that the result will be more precise?

Well I'm assuming that the explosion is localized to some coordinates on the structure, and then checked in 90 degree direction that's closest approximation to any given position. I think that's close enough - technically if you want to be more accurate you'd have to account for areas and volumes.. explosion is pressure, and can 'spread' in closed areas and so forth. For fragments, projectiles and other things that come in direct line it's different.

Why bother with extra layers? I don't get what you mean here. If there's more layers of armor, then the armor values should be higher. Outer layers can be weaker, which can bias it further (or in another case it can be the strong one, and then counting the softer inner layers didn't do much - but the point is you don't know until you check). Explosion usually happens on the outside of the ship, and spreads inwards. I imagine when it expands and meets a wall, the direction is usually from outside to inwards.. and should account for the same amount of layers the regular damage does. Since explosion sort of goes to -all- directions, checking the directions in construct's local space should give pretty good results. *shrug* "Why bother calculating armor at all if we don't know it's exactly correct value?" It shouldn't apply more calculations than it needs, since it breaks as soon as it finds non-structural element - and I think in most cases that comes far sooner than hitting the full 8 layers.

If it really is done like this because of performance issues, then ok - it's not nice, but I can sort of understand. On the other hand this -should- only have an effect when there really is more than 4 layers of armor.. and when you're dealing with that kind of a monster, the performance probably isn't the key issue for whomever is playing.

What I was thinking was, since the value 4 is hard-coded here, and I -think- long time ago four layers were counted, it may have simply been forgotten to change the value here.. which is why I brought it up. If it's intentional - for whatever reason - then it's fine.
Workshop: Voidware, INARI and more.

#36
(2017-09-06, 10:02 PM)Kiriko Wrote: Why bother with extra layers? I don't get what you mean here.

I just wanted to say that, because the angle is wrong, then the calculations are off.
Maybe the real armor should be lower in some cases, and higher in some cases, as you said, it's impossible to know.
So, are we absolutely sure that using 8 layers instead of 8 will be more accurate?
I'm not, in fact, statistically, i'ts very probable that there will be at least some cases where using 8 layers will provide a value that is further off the 'real' value.

That's why I think it wouldn't change a lot of things to have 8 layers instead of 8, except for the simple fact of being coherent with kinetics algorithms of course.

To the question: 'Would the calculations be better with 8 layers instead of 8 for the explosion calculations?', the best answer I can provide is: 'Perhaps'.

To the question: 'Would it be possible to see a difference while playing FtD if there were 8 layers instead of 4?', the answer I give is: 'Probably not'.

To the question: 'Would it be slower with 8 layers instead of 4?', the answer is: 'Sure, but it may be be noticeable, we would have to try and profile to know for sure'.

But that's only my personal point of view.


(2017-09-06, 10:02 PM)Kiriko Wrote: What I was thinking was, since the value 4 is hard-coded here, and I -think- long time ago four layers were counted, it may have simply been forgotten to change the value here.. which is why I brought it up. If it's intentional - for whatever reason - then it's fine.

There's a lot of chances that you're 100% right on this.
While lurking in some parts of the code, I saw some old bits that probably hadn't been updated for long, and even some that had been 'forgotten' when some similar things were modified somewhere else.

#37
(2017-09-06, 10:02 PM)Kiriko Wrote: If it really is done like this because of performance issues, then ok - it's not nice, but I can sort of understand. On the other hand this -should- only have an effect when there really is more than 4 layers of armor.. and when you're dealing with that kind of a monster, the performance probably isn't the key issue for whomever is playing.

What I was thinking was, since the value 4 is hard-coded here, and I -think- long time ago four layers were counted, it may have simply been forgotten to change the value here.. which is why I brought it up. If it's intentional - for whatever reason - then it's fine.

It was already 4 layers when armor stacking was first added(bonuses were 0.8/0.6/0.4/0.2/0.1/0.1 and the 0.1s were kinetic only).
Possible reasons:
- explosions are usually limited by the SQRT pool, damage is virtually the same with 4 layers(5-10% difference)
- a large explosion can do hundreds or even thousands of damage checks, performance difference would probably be noticeable
Even if it's not simply a gameplay decision the benefit of more layers looks negligible.

My opinion on size is the exact opposite: the main limit for how big you can go is performance.

#38
(2017-09-07, 12:44 PM)draba Wrote: It was already 4 layers when armor stacking was first added(bonuses were 0.8/0.6/0.4/0.2/0.1/0.1 and the 0.1s were kinetic only).
Possible reasons:
- explosions are usually limited by the SQRT pool, damage is virtually the same with 4 layers(5-10% difference)
- a large explosion can do hundreds or even thousands of damage checks, performance difference would probably be noticeable
Even if it's not simply a gameplay decision the benefit of more layers looks negligible.

My opinion on size is the exact opposite: the main limit for how big you can go is performance.

I think the values on that list are pretty clear indication why it was originally set to 4. Two layers of 0.1 certainly are insignificant enough to ignore on explosions.
Workshop: Voidware, INARI and more.

#39
Any news?

#40
I want to believe that the forum is alive but....
2 month without a single word of the creator of the game :/



Forum Jump:


Users browsing this thread:
1 Guest(s)