Author Topic: Surface shields.  (Read 12244 times)

0 Members and 1 Guest are viewing this topic.

Quote
Originally posted by xenthorious


Assume you wanted to keep the flaw for the sake of simulating an environment of which supports the design of an old model.  How can you achieve this while it is parallel toward resolving a bug subsequencially, and without monochromatic objectives?

Well, let us first review the current flaw.  Infrequent moments (more frequently with increased projectile speed); the shields fail to preserve protection to an object (ship).

Assuming this is resolved, how could it be regenerated into an optional flag to preserve backwards compatibility?

shieldEffectiveness = Number of times shield has been effective.
shieldFailureCondition = Generated unknown value within known range using rand().
shieldFailure = rand( shieldEffectiveness % shieldFailureCondition) == 1 ? True : False;

Or in English, setup a conditional and optional flag allowing the generation of shield failures at random moments of impact from the projectile.

Also, you could later create a feature in the program which uses the shields as a partial absorption condition, absorbing 80% (or any percentage desired) of all damage caused by a projectile

Then use both flags combined to allow spontaneous shield absorption without making a ship completely protected from impact by a projectile.


God, I feel like a dork with glasses; someone smack me!  lmao
The big cool ship...

 

Offline vyper

  • 210
  • The Sexy Scotsman
Enterprise & Hull Plating here we come.
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
*smacks xenthorious*

That's unnecessarily complicated.  Tying it exclusively to a flag will solve all the problems.

Unless anyone else has anything to add, I think this thread has run its course.

 

Offline Mav

  • 28
  • location: Shivan fleet - closing in on GTVA space
Yes, make it a ships.tbl flag. Flying through the hangars of enemy capships and so circumventing their shields was a, well, not exactly MAJOR feature of WC3/4, but still not an unimportant one.


Quote
Originally posted by Goober5000
Um... I've never ever had this problem. :wtf: You sure it's not something with your codebase or your computer?


It surely isn't. I had it already with retail FS2.

Quote
Originally posted by Goober5000
I think the "mysterious bug" is caused by the shield mesh not having enough polies, or something. I'd rather restrict it to only ships that have the ship flag, as a matter of principle.

What ship did you notice this bug on?


Right. As far as I can tell it's something with the shieldmesh. Though I'd say it usually is when the distance hull-shieldmesh becomes too large.
I initally ran into this when I tried to give Shivan capships shields by importing them with DM modelview from FS1 freighters and scaling them up so they would fit the entire ship (this was several years ago). As the overall shape of the freighters usually wasn't quite the same then on the Shivan caps, the shield bubble sometimes extended VERY far away from the ships; the bug then hit on really large - the shíelds worked only if shot at from a 30°-arc in front, from everywhere else the shots would pass right through the shields. Also usually the game crashed after a while in missions where someone/-thing shot at those shields.
With the shieldpacks from Inferno's site as well as with the SSD Diablo such things never happened to me. So, as their shieldmeshs are rather close to the hull (in some cases actually even SMALLER than it), I'd say that the bug is caused the way I stated above.
Learning from this I also already created a beta shieldmesh for one of WCS' capships, and (except where it isn't complete) it worked perfectly.

I have a bit more of trouble solving this bug for fighters, though, and so I would like to be able to set surface shields in the tbl for those fighters that have major trouble with it.



*Greetings everyone*
-__ o_O___O_o
I______O_O_______dragons
________o

-----------------------------------
capship shields DO WORK !!!
my models, now with pics
test mission for commanding capships
-----------------------------------
suffering from a late stage of BoE-infection - DON'T call a doctor, it's too late for that anyway ;o)

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Just out of curiousity, could it be happening when the shield mesh reaches outside the bounding box by a significant amount?  Such that the shield never gets checked?  The outer bounding box shouldn't be a problem, but what I'm guessing are the BSP bounding boxes come awefully close to the shield mesh, one way or another.  The other obvious question is could the ship be getting checked before the shield for projectile collisions?  This makes more sense if projectile speed is directly correlated to accidental penetration, since it'd be more likely to penetrate far enough in a frame to "collide" with both.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 
Quote
Originally posted by Lynx


Uuuh, surface shields? That thing the whole thread is about?
It's already there. It's in CVS. It's missing a rendering routine to make a fancy graphical effect. Bobboau will make one once I've gotten him what he needs for it.

Quote
Originally posted by WMCoolmon
Adding surface shields, automatically, if a ship has a shield mesh is limiting modding opportunities - you can't fly under a shield and shoot a ship. No one's actually done this, AFAIK, but it will be impossible with surface shields.
Forward compatibility is no problem. I was thinking about this. If we decide to keep the implicit surface shield, then I'll add a "no implicit surface shield" flag to the table. But this exposes any such ship to shots randomly piercing its shield, which is the bug I was trying to work around.

Quote
It hasn't seemed like a bug to me, I figured it might have even been on purpose to simulate damage to the ship from sheer kinetic energy. The view DOES shake around when you get hit, you'd figure that over time things would rattle around a bit.
It's still a bug. If that's what you want, then either have the shield absorb some % of damage, and/or have some % reliability factor (e.g. absorbs 90% of shots, 10% go through). This bug causes shots to go through the shield pseudo-randomly, which is not cool.

Quote
Originally posted by Goober5000
Okay, I didn't know about it. If it happens, fine, it happens. But if it occurs as often as you say, then it will make a significant difference in how any given battle turns out. Mission designers will expect a ship to take X amount of damage in Y amount of time. Surface shields will change this; hence they will break balance.
No, it will break undue player annoyance. Any mission designer that expects a ship to take X damage in Y time without using sexps to make it so is a fool because you can't rely on what the player or AI might do to deal or avoid taking damage. It wouldn't have worked in retail FS2 and it won't work in fs2_open 3.6.5 and it won't work now.

Quote
And breaking balance is a no-no. Need I remind you of the last time you broke the balance?
What are you saying? That you're going to go berserk on me every time I code something? That every single change I ever make is going to cause a battle to the death with you?

Quote
Originally posted by Bobboau
sheilds failing every now and then doesn't seem too buggy, in fact I've always liked it, it made it seem more real as you wouldn't expect a sheild to be 100% effective all the time.
Okay, if we're going to talk about realism, think about where this shield technology comes from. Yes, the Shivans. The Great Destroyers, the ones the Ancients couldn't even touch.

"Only these were not like the others. They did not die."

Only during the battle in which the Shivans destroyed the GTSC Plato and PVC Taurus did God...uhh, I mean Alpha 1 finally manage to overwhelm the shields on one of the Shivan fighters and destroy it.

These shields are supposed to be utterly reliable. That's the idea. A faulty shield system is not fitting of the Great Destroyers.

Quote
Originally posted by xenthorious
From what I have read, this bug is far more frequent on fast projectiles then it is on slow ones.
Actually, I just ran some testing and I can't seem to reproduce the bug in a controlled test environment, which consists of a Maxim that does 1 shield damage and 10000 hull damage per shot. The idea is that if the gun ever manages to puncture a shield, ever, the target's going to take major damage and probably go down right there.

Running in fs2_open 3.6.5 (without surface shields at all), the first test was to blast at a Seraphim with such a Maxim. I never managed to destroy it save by hitting it hard enough to bring down its shields. The second test was for a hostile Herc II to blast at me with such a Maxim. Once again, it had to take down my shields first. The third test changed the Maxim to have some insanely high velocity, which didn't change anything. In a fourth test, I changed the enemy fighter to carry normal Kayers and changed the Herc II (which was both the enemy fighter and mine) to have 9999 shields and 1 HP, and same thing.

:confused: :wtf: :confused: :wtf: :confused:

The shot isn't going through the shield because it's going too fast, nor is collision detection somehow missing it. If this were the case, it would have happened by now.

Ideas? Anyone?

Quote
Originally posted by Goober5000
And I'm worried that fixing this flaw will throw off balance in old campaigns that were designed to rely on it. Not just for the player ships, but for enemy ships as well.
What old campaigns?

Quote
Originally posted by Lynx
I think there should be a way for submodels to make them uncovered by shields even if the ship has surface shields. I don't know about the other mods, but I'll make the hangarbays subobjects to take advantage of Bobb's detail box thingy.
Now that I think about it, special handling for surface shield hits on subobjects might be doable. What should we do about hull / shield / subsys damage to the parent ship and its other subsystems? Absorb it by the shield as usual but do subsys damage to the subobject that was hit as though there were no shield over it?

Quote
Originally posted by Flaser
2 Simple ideas:

Will it throw off balance? Let's test then debate.
If it does? So what. Make it optional - for projects a'la SWC - problem solved.
If it doesn't screw up anything else I don't see why another "sleeping" feature can't be added to the CVS.

My 2 cents.
It's already in CVS. The bug is irritating but I don't think fixing it is enough to throw off balance, whether it's accomplished by an implicit surface shield workaround or by fixing the bug itself.

Quote
Originally posted by Goober5000
1) It throws off balance.
In theory. I should not have to remind you of this. It's very theoretical until someone comes up with a real case of it.

<:mad:>

And since you're so hot on theoretical balance breakage, I should point out that the modified TAG behavior that fs2_open introduced, wherein TAGged ships will receive higher priority for turret fire, has a much greater impact on balance than this. Yet it's perfectly acceptable. It also has yet to actually break anything, but I'm pretty sure you'd be dragging me off in compatibility police handcuffs if it were my idea.



Quote
2) It screws up the feature where you can fly underneath shields and shoot at ships.
That can be avoided by turning it off with a table flag, or just by fixing the underlying bug, whatever it is.

Quote
Originally posted by StratComm
Just out of curiousity, could it be happening when the shield mesh reaches outside the bounding box by a significant amount? Such that the shield never gets checked? The outer bounding box shouldn't be a problem, but what I'm guessing are the BSP bounding boxes come awefully close to the shield mesh, one way or another. The other obvious question is could the ship be getting checked before the shield for projectile collisions? This makes more sense if projectile speed is directly correlated to accidental penetration, since it'd be more likely to penetrate far enough in a frame to "collide" with both.
Shield impacts (seem to) happen thus: If a projectile collides with a shield mesh, and it's not supposed to pierce the shield, the shield is checked for enough strength to absorb the projectile. If it does, then the shield takes damage, a pretty shield hit effect and sound are made, and the projectile disappears. Otherwise the projectile passes through unscathed, and will probably hit the hull. It might miss the hull instead, which is quite possible and often happens with ships like the Seraphim and Manticore -- with these, it's much easier to bring down the shields of the ship than it is to damage its hull, simply because its hull is so much smaller / thinner than its shield bubble.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by _argv[-1]
Okay, if we're going to talk about realism, think about where this shield technology comes from. Yes, the Shivans. The Great Destroyers, the ones the Ancients couldn't even touch.

Reverse engineered though.  Realisticly you wouldn't be able to recreate more advanced technology 100%.  That can't be the argument.

Quote
Actually, I just ran some testing and I can't seem to reproduce the bug in a controlled test environment, which consists of a Maxim that does 1 shield damage and 10000 hull damage per shot. The idea is that if the gun ever manages to puncture a shield, ever, the target's going to take major damage and probably go down right there.

So then are we absolutely sure that it's a bug and not some feature that no one has noticed yet.  Just because we can't explain it shouldn't mean it's automatically a bug.

Quote
That can be avoided by turning it off with a table flag, or just by fixing the underlying bug, whatever it is.

Yes but then it has to be turned off.  What I get from this thread is that it's assumed to be a bug since the reason is unknown.  Whether or not the behavior makes sense it is the default behavior.  I'm not suggesting that this isn't a bug but before changing the default behavior we should probably have a better excuse than opinion.  Yes I get that other things have been changed that are against default behavior but most of those will undoubtedly get re-examined at some point in the future to see if they should be a non-default flag or something.  Various things already have.  It would save every developer future trouble if we can agree this is a bug in the code now rather than having this discussion later this year or next year or someone just complaining about the change and we have to go looking for what's causing it.

Quote
Shield impacts (seem to) happen thus: If a projectile collides with a shield mesh, and it's not supposed to pierce the shield, the shield is checked for enough strength to absorb the projectile. If it does, then the shield takes damage, a pretty shield hit effect and sound are made, and the projectile disappears. Otherwise the projectile passes through unscathed, and will probably hit the hull. It might miss the hull instead, which is quite possible and often happens with ships like the Seraphim and Manticore -- with these, it's much easier to bring down the shields of the ship than it is to damage its hull, simply because its hull is so much smaller / thinner than its shield bubble.

Shield pass through is percentage based.  It's not all or nothing and some weapon damage can pass through the shield to hit the hull.  Normally the hull would be zero in that quadrant afterwards but it could recharge a little at about the same time and look like it's still up.  I could be imagining this but I seem to remember something about partial damage pass through if shields drop to a certain point.  That may not have been from lasers but code is somewhere.  You also get splash damage from missiles which don't think even hits the shield and goes straight to the hull.

 
Quote
Originally posted by taylor

Reverse engineered though.  Realisticly you wouldn't be able to recreate more advanced technology 100%.  That can't be the argument.
Very true. Almost every Shivan fighter/bomber has shields that are much stronger than anything in the GTVA arsenal.

An interesting exception is the Terran Mara, which has stronger shields than the Shivan original.

Incidentally, Shivan fighters (but not bombers) also have very fragile hulls. Once again, the absurdly powerful Terran Mara is the exception, which has a hull that's stronger than any other fighter in the game (I think).

Quote
So then are we absolutely sure that it's a bug and not some feature that no one has noticed yet.  Just because we can't explain it shouldn't mean it's automatically a bug.
It looks like it to me. I never found anything in the code that causes the shields to randomly ignore shots that strike them.

Quote
Yes but then it has to be turned off.  What I get from this thread is that it's assumed to be a bug since the reason is unknown.  Whether or not the behavior makes sense it is the default behavior.  I'm not suggesting that this isn't a bug but before changing the default behavior we should probably have a better excuse than opinion.  Yes I get that other things have been changed that are against default behavior but most of those will undoubtedly get re-examined at some point in the future to see if they should be a non-default flag or something.  Various things already have.  It would save every developer future trouble if we can agree this is a bug in the code now rather than having this discussion later this year or next year or someone just complaining about the change and we have to go looking for what's causing it.
I agree that the implicit surface shield is a brutal hack. I would much prefer to know what's really going on and why collision detection is occasionally ignoring shields. There's some possibility that it's supposed to be this way, but I've not seen anything suggesting that.

Things I know it isn't:

  • Completely random. The tests I did suggest it's not. A lot of shots were fired, and none penetrated the shield when they shouldn't have.
  • Caused by high projectile velocity. Same reason as above.
  • Caused by splash damage. I was recently killed by a Terran Turret with full shields and 1% hull. Ouch. These do not have splash damage.
  • Only happening given low shields. Like I said, I had full shields and was killed by a Terran Turret. It was with my hacked tables, but in this case, I only increased the turret weapon's velocity, not the damage. It would have taken more than one hit at that point to bring my shields down. Instead the shot went right through them.
  • Caused by beam weapons. I don't think I've ever had beams go through my shield (unless the beam is shield-piercing, obviously).

Quote
Shield pass through is percentage based.  It's not all or nothing and some weapon damage can pass through the shield to hit the hull.
Only if the shield is too low to absorb it all.

Quote
Normally the hull would be zero in that quadrant afterwards but it could recharge a little at about the same time and look like it's still up.
I'm aware of that. This is normal and perfectly acceptable behavior. This is not the bug I'm talking about.

Quote
I could be imagining this but I seem to remember something about partial damage pass through if shields drop to a certain point.
No, you're not. It's there. If shields are too low to absorb all of the damage from the shot, the shields will absorb as much as possible, and the rest goes to the hull.

Quote
That may not have been from lasers but code is somewhere.  You also get splash damage from missiles which don't think even hits the shield and goes straight to the hull.
Possible, but that's not the only case. See above about the Terran Turret.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Look, argv.  Whether it's a bug or not, whether it happens rarely or frequently, whether it was intended by :v: or not... it's still a deviation from the original behavior.  We had a similar discussion to this a year ago about whether beams should pierce shields or not.

Perhaps missions with a single ship won't change much.  But over the course of time, with many ships, balance will change enough to make a difference.  It's a change in the original behavior that's significant enough to notice.  And it could sabotage mods that rely on the player being able to fly underneath shields.

As for the other AI changes, we're in the process of rolling back every AI change so that it matches default FS2 behavior.  Any SCP "enhancements" will be enabled by a table flag, a command-line option, or something else.  They haven't all been rolled back yet, but they eventually will.

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
The problem with this is that it's not really a fix for the problem.

Assuming this stays implemented, what will happen instead? The player will be firing at a ship and the shield hit effect won't appear, there will be no indication of damage at all. Or, the shield effect will appear on the hull. It's not so much as fixing a bug as switching it out for another one.

If this modification had some code to check whether the point where the weapon was fired had been inside the shield and draw a shield hit effect if it hadn't been, I wouldn't really care. (Could be done by checking on the firing of the weapon and setting a pointer to the shield the firer was inside)

Whether or notit's a bug or a feature in the code, it's simply more intuitive to have it be explicitly defined somehow, to prevent annoyance when someone tries to create a ship with shields you can fly inside and discovers that for some reason there shots do no damage.
-C

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
ERm...so what's the status of the code now?

When will we have a build available with surface shields + the corresponding hit effects? And the shield absorbtion factor'
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 
Okay, I give up. I'll remove the implicit surface shield next time I get to coding. Then I'll do up the surface shield hit routine Bobboau wants.

TrashMan: Adding the absorption factor is a bit trickier, so I hope you can wait on that.

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
Could it have something to with a laggy system, eg the weapon's position is incremented too far in a given frame and the collision checking doesn't catch it (As the weapon shouldn't have moved as far in the last frame).
-C

 
That's possible. It only seems to happen in busy situations with lots of ships shooting at each other (i.e. a typical mission, as opposed to my test mission or a relatively quiet one like in FS1 when the player first meets the Shivans).

Edit: But I'm not sure about this.

 

Offline Mav

  • 28
  • location: Shivan fleet - closing in on GTVA space
Quote
Originally posted by StratComm
Just out of curiousity, could it be happening when the shield mesh reaches outside the bounding box by a significant amount?  Such that the shield never gets checked?  The outer bounding box shouldn't be a problem, but what I'm guessing are the BSP bounding boxes come awefully close to the shield mesh, one way or another.  The other obvious question is could the ship be getting checked before the shield for projectile collisions?  This makes more sense if projectile speed is directly correlated to accidental penetration, since it'd be more likely to penetrate far enough in a frame to "collide" with both.


That might be it; it somewhat explains the behaviour I encountered so far; and I also think I remember Bob (or someone else, am not sure) to mention something similar a year or two ago.
Still, I don't really know what these 'bounding boxes' are all about. :shaking:  (I think they can be seen in modelview, but that's next to all I know about them.... :(  )



Quote
Originally posted by _argv[-1]
That's possible. It only seems to happen in busy situations with lots of ships shooting at each other (i.e. a typical mission, as opposed to my test mission or a relatively quiet one like in FS1 when the player first meets the Shivans).

Edit: But I'm not sure about this.


Don't think so. I also am not sure, but I think I also encountered it in missions with a rather low ship count.
« Last Edit: January 25, 2005, 08:31:17 am by 1266 »
-__ o_O___O_o
I______O_O_______dragons
________o

-----------------------------------
capship shields DO WORK !!!
my models, now with pics
test mission for commanding capships
-----------------------------------
suffering from a late stage of BoE-infection - DON'T call a doctor, it's too late for that anyway ;o)

 

Offline Flaser

  • 210
  • man/fish warsie
Quote
Originally posted by Mav


That might be it; it somewhat explains the behaviour I encountered so far; and I also think I remember Bob (or someone else, am not sure) to mention something similar a year or two ago.
Still, I don't really know what these 'bounding boxes' are all about. :shaking:  (I think they can be seen in modelview, but that's next to all I know about them.... :(  )

Don't think so. I also am not sure, but I think I also encountered it in missions with a rather low ship count.


Bounding boxes are simplified geometry of the model used for collision detection - AFAIK simply boxes bound together to more or less cover the entire ship.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 
I've been fraggin' busy lately, so no chance to do all the fancy stuff that's required of me, but I removed the implicit surface shield for now, so no more compatibility problem.

Sorry for being so slow. :(

 
Okay. I'm finally getting to writing up that add_surface_shield_hit function and related code. Sorry it took so long. :(

Anyway, Bobboau. Do you want the position in world coordinates, or what?

And where do I get the orientation from? The mc_info struct's orient member appears to be the orientation of the object (i.e. ship) that was collided with.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
local space

and as long as you get the orientation with a fvec pointing in the same direction as the polygon that was hit (not the weapon that hit it) that's all I need, if all you can get is the normal of the hit polygon (I haven't worked with the colision code for a while, don't remember what's available) you can use vecor2matrix (or something like that) to convert it to a proper matrix.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together