Laser Deflector Shields and Missile-Deavtivating EM Fields
Moderator: Moderators
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Well, the angle of incidence/reflection has to be detected first, which is difficult; and then has to be calculated in 3D, not 2D, which I'm guessing not many of you did in High School. It doesn't only need to be possible, it can't hog the engine either (which seems somewhat unlikely, even with quite a few lasers flying around).
How to avoid invincibility is an issue unrelated to whether it is possible or not, and entirely related to game balancing. Personally, I'd love to be able to make a shield like the one in Phantom Menace, where units outside the shield cannot fire inside (or in fire out), but once units physically breach the gap, the shielding no longer applies. Now, web I can only make reflection apply to the collision detection sphere, so be it. We'll work with whatever we get. Again, it's a gameplay thing.
How to avoid invincibility is an issue unrelated to whether it is possible or not, and entirely related to game balancing. Personally, I'd love to be able to make a shield like the one in Phantom Menace, where units outside the shield cannot fire inside (or in fire out), but once units physically breach the gap, the shielding no longer applies. Now, web I can only make reflection apply to the collision detection sphere, so be it. We'll work with whatever we get. Again, it's a gameplay thing.
shouldn't be too hard to calculate the angle. All you need to know is the angle of incidence (which you get by knowing the normal of the shield surface at the point of impact) and the angle of reflection is equal to that.
You could just cheat and just make it so that it always bounces off in the direction of the normal itself (which, while physically incorrect, wouldn't make that big a difference and requires less calculation) no matter which direction it comes from. Most of the time the angle of incidence would be very small anyway. since you're generally going to be shooting at the closest part of the unit.
You could just cheat and just make it so that it always bounces off in the direction of the normal itself (which, while physically incorrect, wouldn't make that big a difference and requires less calculation) no matter which direction it comes from. Most of the time the angle of incidence would be very small anyway. since you're generally going to be shooting at the closest part of the unit.
I'd like the different kind of shield to be decided by the modders, and not hard scripted.
So, when you create a shield, you'd have some tags to control:
- Colour & transparency of the shield
- Radius of the shield
- Always shown / only shown when hit by shot / only shown around shots.
- Some more tags to control the visual aspect of the shield.
- What weapons it affects (we'll need user defined weapons category, just like the armor.txt for units)
- If it slowly repel, instantly bounce, or absorbs shots. Or if it does the Dune universe laser-shield explosive reaction. Or if it let them passes.
- If shots can come out of the shield, of it it blocks both way
- If it is a sphere surface, or a solid filled ball
- The current tags to say with how much force it repels
- How much energy it consumes just to stay on
- How much energy it needs to repel any shot (base value)
- How much energy to add to that, per damage value of the shot (note: if the shot use custom damage for a category encompassing the shield unit, use that one)
- If the shield is always up as long as you have enough E, or if it has slowly regenerating hitpoint. If so, then some tag to say the top value of the reservoir and how much per tick it refills. Plus a new blue bar under the unit health bar.
Some more explanation on the different behavior that I'd like:
- Slowly repelled l.o.s. would be sent back exactly to where they where fired from. Slowly repelled and continuous laser probably won't be compatible. However regular laser can be "slowly repelled"!
- Instantly bounced ballistic would be reflected with angle to normal of equal value but inversed sign compared to entry vector blablabla.
- Slowly repelled ballistic would work like the current shield does
- Instantly bounced l.o.s. would be like Star War droid shield and jedi lightsaber, that is, reflected with angle to normal equal blablabla.
- Dune style shield make a big explosion to both the unit that fired the laser and the unit that has the shield as far as I remember from the book. I suppose we could do something like multiplying the laser damage by a factor defined in the shield TDF, then apply it to both the unit that fired and to the unit that has the shield. I suppose that if the shield is of the exhaustible type, instead of directly applying it to the unit that makes the shield, we should first substract the shield hitpoint, and only apply the remaining damage to the shield maker unit itself. Or maybe instead all the shield hitpoint should be converted into damage to apply to the one who fired at it, and then the shield would slowly refill. Or better, use all shield hitpoint to damage the unit that fired at it until the unit that fired at it die, so if the shield is very big, it would retain some hitpoint after killing the unit that fired at it. But the idea is that I don't think it would be coherent to destroy a base-sized shield with a handheld laser. Instead the stupid infantryman that fired the laser should explode at once, and the huge shield only have a minor setback.
Of course, one kind of shield should be able to use different tags and behavior for different weapon category (user defined weapon category, remember).
And don't forget to let us script control the shield activation, either by AimX(heading,pitch), either by using the on/off state, either by creating a new set/get script command.
Directionnal shield using the already implemented tag for weapon's cone of fire would be great.
Reading the QueryX piece to know where's the shield center would be great.
So, when you create a shield, you'd have some tags to control:
- Colour & transparency of the shield
- Radius of the shield
- Always shown / only shown when hit by shot / only shown around shots.
- Some more tags to control the visual aspect of the shield.
- What weapons it affects (we'll need user defined weapons category, just like the armor.txt for units)
- If it slowly repel, instantly bounce, or absorbs shots. Or if it does the Dune universe laser-shield explosive reaction. Or if it let them passes.
- If shots can come out of the shield, of it it blocks both way
- If it is a sphere surface, or a solid filled ball
- The current tags to say with how much force it repels
- How much energy it consumes just to stay on
- How much energy it needs to repel any shot (base value)
- How much energy to add to that, per damage value of the shot (note: if the shot use custom damage for a category encompassing the shield unit, use that one)
- If the shield is always up as long as you have enough E, or if it has slowly regenerating hitpoint. If so, then some tag to say the top value of the reservoir and how much per tick it refills. Plus a new blue bar under the unit health bar.
Some more explanation on the different behavior that I'd like:
- Slowly repelled l.o.s. would be sent back exactly to where they where fired from. Slowly repelled and continuous laser probably won't be compatible. However regular laser can be "slowly repelled"!
- Instantly bounced ballistic would be reflected with angle to normal of equal value but inversed sign compared to entry vector blablabla.
- Slowly repelled ballistic would work like the current shield does
- Instantly bounced l.o.s. would be like Star War droid shield and jedi lightsaber, that is, reflected with angle to normal equal blablabla.
- Dune style shield make a big explosion to both the unit that fired the laser and the unit that has the shield as far as I remember from the book. I suppose we could do something like multiplying the laser damage by a factor defined in the shield TDF, then apply it to both the unit that fired and to the unit that has the shield. I suppose that if the shield is of the exhaustible type, instead of directly applying it to the unit that makes the shield, we should first substract the shield hitpoint, and only apply the remaining damage to the shield maker unit itself. Or maybe instead all the shield hitpoint should be converted into damage to apply to the one who fired at it, and then the shield would slowly refill. Or better, use all shield hitpoint to damage the unit that fired at it until the unit that fired at it die, so if the shield is very big, it would retain some hitpoint after killing the unit that fired at it. But the idea is that I don't think it would be coherent to destroy a base-sized shield with a handheld laser. Instead the stupid infantryman that fired the laser should explode at once, and the huge shield only have a minor setback.
Of course, one kind of shield should be able to use different tags and behavior for different weapon category (user defined weapon category, remember).
And don't forget to let us script control the shield activation, either by AimX(heading,pitch), either by using the on/off state, either by creating a new set/get script command.
Directionnal shield using the already implemented tag for weapon's cone of fire would be great.
Reading the QueryX piece to know where's the shield center would be great.
Fully costumisable shield!!! This would definitely bring TA Spring to a whole new level. But does it mean that the format of weapons would be changed? Does it matter if this makes old mods incompatible with the new version, or this has always been happening already?
Anyway, zwzsg, your idea is probably what everyone who wants to play with shields in Spring wants to see.
Anyway, zwzsg, your idea is probably what everyone who wants to play with shields in Spring wants to see.
I would have to say that that shield in the Phantom Menace was the only real good thing about that film.
And a shield that bounces plasma, blows up missiles but EXPLODES violently when is hit by a laser would be cool, if only to appease the ravenous DUNE fans I know we all are. However it would have to explode everything AROUND the vehicle and the shield, destroying the attacking army and the defencive hard point. Cause your not going to put a damn shield to guard some mexx's! Your going to have it to pin up your defenses, and so you should have some kind of way to protect yourself from lasers.
Or you could not build the damn sheild.
And a shield that bounces plasma, blows up missiles but EXPLODES violently when is hit by a laser would be cool, if only to appease the ravenous DUNE fans I know we all are. However it would have to explode everything AROUND the vehicle and the shield, destroying the attacking army and the defencive hard point. Cause your not going to put a damn shield to guard some mexx's! Your going to have it to pin up your defenses, and so you should have some kind of way to protect yourself from lasers.
Or you could not build the damn sheild.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
- Deathblane
- Posts: 505
- Joined: 01 Feb 2006, 01:22
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
That's a mod author's problem, not a game developer's problem.wizard8873 wrote:kinda a bad idea. if a person builds all three in one spot, how are you going to get through there? it would be cool to see small units used those shields but at the same time, they couldn't fire. kinda like a decoy as other units attack from the flanks.
i don't think the deflector is going too far. the deflector takes energy to counter a plasma shot and missiles and laser can get through so it isn't all the powerful.
the anti-nuke is annoying but good at the same time. when you're going up against it, its annoying but its the best thing ever if it's on your side. more shields just means more porcing to drag the game on. its fine as i see it now
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
How it should be done:
Currently there are two special types of weapon. Cruise and Antiweapons. (er... something like that. Sue me)
If weapons could be, rather, placed into categories within the weapon TDFs, like so:
maxvelocity=....;
startspeed=.....;
<whatever>
category=1;
<whatever>
[damage]
default=....;
....
And then on the anti-weapons it'd say
anticategory=1;
This way you could have all kinds of crazy (good-crazy) things like laser turrets that shoot down missiles, or flak guns that shoot falling bombs, or anti-laser LASERS, or whatever!
Still just dreaming though.
Currently there are two special types of weapon. Cruise and Antiweapons. (er... something like that. Sue me)
If weapons could be, rather, placed into categories within the weapon TDFs, like so:
maxvelocity=....;
startspeed=.....;
<whatever>
category=1;
<whatever>
[damage]
default=....;
....
And then on the anti-weapons it'd say
anticategory=1;
This way you could have all kinds of crazy (good-crazy) things like laser turrets that shoot down missiles, or flak guns that shoot falling bombs, or anti-laser LASERS, or whatever!
Still just dreaming though.
Oh. Hell. Yeah.Caydr wrote:How it should be done:
Currently there are two special types of weapon. Cruise and Antiweapons. (er... something like that. Sue me)
If weapons could be, rather, placed into categories within the weapon TDFs, like so:
maxvelocity=....;
startspeed=.....;
<whatever>
category=1;
<whatever>
[damage]
default=....;
....
And then on the anti-weapons it'd say
anticategory=1;
This way you could have all kinds of crazy (good-crazy) things like laser turrets that shoot down missiles, or flak guns that shoot falling bombs, or anti-laser LASERS, or whatever!
Still just dreaming though.

It's because everyone thinks that shields would not be implemented in Spring no matter what, so they are reluctant to give requests or suggestions. It's just that there are not enough requests that the developers don't see the urge to implement shields in the game. From the result of the poll we know that most people want to have shields. Even those who don't like shields are not opposing us either. All of us are on the same side: to make Spring better than ever before, and even become one of the finest RTS games ever (and it is still FREE!!!). So everybody just speak up, tell everyone whaterver makes you like or dislike laser shields, or even actively participate in the implementation of shields, we can make a difference. I am sure that the developers can come up with a compromise. Again, I think that the ideas from zwzsg are favourable.Warlord Zsinj wrote:There has been atleast two different threads on laser reflection in the development forum. None of them resulted in anything, though.
- Deathblane
- Posts: 505
- Joined: 01 Feb 2006, 01:22
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29