Reflecting projectiles V3 w/ download on pg 3

Post here if you want to help developing something for FAF.

Re: Reflecting projectiles

Postby Resin_Smoker » 08 Jun 2014, 06:32

Here is another video to show how extreme this can get.

https://www.youtube.com/watch?v=v0w_H1yUU60&feature=youtu.be
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles

Postby Resin_Smoker » 12 Jun 2014, 11:13

Made some major improvements on this version: http://www.mediafire.com/download/0s6fj ... ons_v2.rar

Please be aware that shields now reflect 100% of incoming projectiles but absorb 50% of the incoming damage to do so.
This was done to aid in testing and left as is for folks to experiment.

1) Projectiles can sometimes pass through a shield before being reflected. This is due to the projectile speed being faster than the impact can be detected. This is totally due to the way the game engine handles impact events. Now I've a few ideas on how to resolve this but as I said it's not a project for a casual scripter. However for those brave enough to give it a try here it is....
FIXED

2) Shield OnCollision event for some unknown reason can't be non-destructively hook'd and I've not been able to figure out why. In a nut-shell I'm unable to call "oldShield.OnCollisionCheck(self,other)" and run the old version of shield.lua to enable proper hooking. Even importing the "shield" class indirectly doesn't work.
FIXED

3) Creating impact effects appears to be a major issue as the Vector data needed for the correct placement of the effects is incorrect in some way. Even using the native CreateImpactEffect within shield.lua didnt work.
FIXED

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles V2 w/ download on pg 2

Postby nine2 » 13 Jun 2014, 03:51

That's insane and very cool.

How long do projectiles live for if they get reflected many times?

Does it reflect strat bombs?
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Reflecting projectiles V2 w/ download on pg 2

Postby Resin_Smoker » 13 Jun 2014, 04:22

partytime wrote:That's insane and very cool.

How long do projectiles live for if they get reflected many times?

Does it reflect strat bombs?



The lifetime should be reset for each reflection and if possible i use the setting from the firing unit. Problem with this is that its 100% possible to keep a projectile bouncing indefinitely. See example: https://www.youtube.com/watch?v=AC7IefN ... e=youtu.be
Oh and yes, this does work vs strat bombs... Only three things are not reflected; beams, missiles and nukes.

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles V2 w/ download on pg 2

Postby nine2 » 13 Jun 2014, 04:44

That's potentially a massive problem but in the real world, the shields would be taking damage with each reflection so eventually all of those projectiles would suddenly burst through.

And what would they hit? Would they hit their original targets? Or the shield gen itself? Or something else fairly random?

Would be cool to see a gazillion particles all going back and forth and suddenly a shield goes down and EVERYTHING inside of it is insta-destroyed.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Reflecting projectiles V2 w/ download on pg 2

Postby IceDreamer » 13 Jun 2014, 05:26

They hit whatever they hit. I'd love to see you get beams working though Resin. I'm put in mind of that scene in Avengers Assemble when Iron Man reflects his laser off Captain America's shield. Would be so cool.
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: Reflecting projectiles V2 w/ download on pg 2

Postby nine2 » 13 Jun 2014, 05:31

And make a point defense that shoots projectiles with mini reflectorshields attached to the projectiles.

Chaos!
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Reflecting projectiles V2 w/ download on pg 2

Postby Resin_Smoker » 13 Jun 2014, 08:04

partytime wrote:That's potentially a massive problem but in the real world, the shields would be taking damage with each reflection so eventually all of those projectiles would suddenly burst through.

And what would they hit? Would they hit their original targets? Or the shield gen itself? Or something else fairly random?

Would be cool to see a gazillion particles all going back and forth and suddenly a shield goes down and EVERYTHING inside of it is insta-destroyed.
But the shield do take damage per each reflection..... this is deliberate.

Per impact the shields take 50% of the projectiles damage. Any projectile falling below 1 damage is simply allowed to impact and expire naturally.

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles V2 w/ download on pg 2

Postby Resin_Smoker » 13 Jun 2014, 08:05

IceDreamer wrote:They hit whatever they hit. I'd love to see you get beams working though Resin. I'm put in mind of that scene in Avengers Assemble when Iron Man reflects his laser off Captain America's shield. Would be so cool.


Has been done and i think its possible with this mod with a few technical considerations.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles V2 w/ download on pg 2

Postby Resin_Smoker » 13 Jun 2014, 08:08

partytime wrote:And make a point defense that shoots projectiles with mini reflectorshields attached to the projectiles.

Chaos!


This is possible but the game engine's performance isn't optimized for shields moving at a high rate of speed. Keep in mind that many of the Sim entities update every 4 ticks so you'd see allot of projectiles passing thru the shield only the snap back 400 ms later to impact. This is an issue internal to the game engine as the lua that handle projectiles isn't optimized for that. Hell for that matter what I've done kinda pushes the limits of whats possible.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest