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

Poll: Is this explosion algorithm good?
You do not have permission to vote in this poll.
Sounds good
25.00%
1 25.00%
Sounds good but imposible to implement (please explain why)
0%
0 0%
Current system is not perfect but this is even worse (please explain why)
50.00%
2 50.00%
Current system needs no improvement
25.00%
1 25.00%
Total 4 vote(s) 100%
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Make explosion work like frag with invisible fragments

#1
Brick 
I know that the way explosions work was discussed many times but i couldn't find any active tread with the same idea as i am proposing so i decided to make a new tread.

As i said here http://www.fromthedepthsgame.com/forum/s...#pid360234 currently explosions are capable of damaging blocks that are covered from all sides and even when no subconstructs are involved.

Current system has several major cons:
1)Explosion cannot have big radius or it will cause performance drops
2)An explosion going off 8m away can still do the same total damage as one right on the surface
3)Explosion can sometimes somehow damage blocks covered from all sides
4)Subconstructs sometimes get damaged through the main counstruct

I suggest replacing the current behavior with explosions emitting very fast invisible rays that damage all blocks they touch. This way explosion will work a bit like frag.

As the rays travel the will lose AP and maybe some damage. This way airburst flak can still damage unarmored targets and destroy detection but will do little damage to proper armor.

Pros of this approach:
1)Nice AP falloff with range-you will need a direct hit to damage armor but AAA flak will still work.
2)Explosions won't damage blocks covered from all 6 sides without destroying at least of these 6 blocks.
3)Should work just fine with subconstructs

I am sure that this approach won't cause any performance drops because there are many way to optimize the algorithm.
1)Weak explosions can have small radius-4 blocks or so.
2)If there are no constructs in range there is no need to calculate the rays
It is always possible to just tweak the amount of rays and see how much can be there until it starts to freeze on explosions. I am sure that it is possible to have enough rays and still not get freezes.

Waiting for your feedback on the idea. Sorry for my English
Reply

#2
Soon there will be a new explosion algorithm in FtD.
It should have an extended radius and fix the SubConstruct-explosions bug.
Reply

#3
(2018-01-13, 08:35 PM)Gladyon Wrote: Soon there will be a new explosion algorithm in FtD.
It should have an extended radius and fix the SubConstruct-explosions bug.

I guess its better than nothing Smile
What about "dealing damage through armor" bug? Its not related to subconstructs.

Also what about implementing a significant damage or AP reduction based on distance from the point of explosion? It can be made even in the current algorithm.
Reply

#4
(2018-01-13, 08:42 PM)Kapun Wrote: I guess its better than nothing Smile
What about "dealing damage through armor" bug? Its not related to subconstructs.
What is that problem?
The only one I know about is the fact that the SubConstructs and the MainConstructs are processed independently, so that the explosions can go though one to reach the other.


(2018-01-13, 08:42 PM)Kapun Wrote: Also what about implementing a significant damage or AP reduction based on distance from the point of explosion? It can be made even in the current algorithm.
That will be implicit.
There's a 'power base' for the explosion, and each 'air cell' it encounter will bleed some of that 'power'.
The damage dealt to a block is relative to that 'power'.
Reply

#5
Quote:What is that problem?

The problem is that sometimes there are destroyed or damaged blocks that are covered from all 6 sided by other blocks that aren't destroyed. In other words damages somehow goes through armor without destroying the armor.

I managed to reproduce it reliably. The details are here: http://www.fromthedepthsgame.com/forum/s...?tid=32929

Quote:There's a 'power base' for the explosion, and each 'air cell' it encounter will bleed some of that 'power'.

Explosions that happen at a distance still seem to deal a decent amount of damage. A good example would be cram shells that detonate because of LAMS or shields.
Reply

#6
Found a tread about a similar bug.
http://www.fromthedepthsgame.com/forum/s...?tid=29845
Reply

#7
(2018-01-13, 09:03 PM)Kapun Wrote: The problem is that sometimes there are destroyed or damaged blocks that are covered from all 6 sided by other blocks that aren't destroyed. In other words damages somehow goes through armor without destroying the armor.

I managed to reproduce it reliably. The details are here: http://www.fromthedepthsgame.com/forum/s...?tid=32929

Found a tread about a similar bug.
http://www.fromthedepthsgame.com/forum/s...?tid=29845

I'm aware about that bug.
It's because the explosion origin is the colored block, and the explosion expand in all the directions from there, even 'behind' it.
But in fact, there's no 'behind' for the algorithm, because the algorithm doesn't know that the explosion is coming from a moving projectile.

It will not be fixed at first with the new explosion algorithm.
But I intend to try to find a solution for it.


And note that your fragment solution would have a similar problem, if the explosion origin is inside the block itself, then the fragments will damage no other block than this one if they do not have enough strength to destroy it.
Reply

#8
Well, the best solution would be to somehow prevent shell for exploding inside blocks unless it has pen. depth. fuse.
Is it possible to do the following when a shell (or some other explosive) explodes inside a block?
1)Use the direction of the shell to cast a ray backwards and check this ray until it stops being inside some block.
2)Then the explosion would originate from that point.
This could problably work just as well with the fragment approach.
A more simple solution: Tweak the current algorithm to attempt to destroy the origin block first before spreading. This closer to intuitive behavior than weak explosion destroying components through 1 layer armor.
Reply

#9
I'll find a way to push back the explosion origin a bit.

And about the fragment explosion, I'm not sure it would be good on a performance point of view, because it would need a lot of fragments (raycasts) in order to be able to hit any blocks at 25m of distance.
That said, I haven't tried it, so it's only a feeling...
Reply

#10
(2018-01-14, 02:00 PM)Gladyon Wrote: I'll find a way to push back the explosion origin a bit.

And about the fragment explosion, I'm not sure it would be good on a performance point of view, because it would need a lot of fragments (raycasts) in order to be able to hit any blocks at 25m of distance.
That said, I haven't tried it, so it's only a feeling...

Doing ~3500 gridcasts for each high radius explosion would get really bad real fast.
Would also open up lots of other issues that the iterative method doesn't have, and make modelling pressure way harder.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)