Fractal Softworks Forum

Starsector => Suggestions => Topic started by: conorano on January 22, 2013, 06:16:20 AM

Title: custom shield shapes
Post by: conorano on January 22, 2013, 06:16:20 AM
ive seen a lot of mod ships that are really long, those ships look good but always have one problem. shields...
the shields are always too big for the ship since they have to be round and need to cross both the top and the bottom. so my suggestion is. custom shapes for shields. i am no modder myself but i know this could benefit a lot of modders and can bring new ideas to the table. by shape i mostly mean changing round to oval but there could be other shapes (squares!?) with omni shields this could be kind of weird but i think that would work fine too.
also i was thinking of personal shields (only touch the hull) as a new shield variant but i think shield shapes would be more useful and balanced.
Title: Re: custom shield shapes
Post by: zakastra on January 22, 2013, 07:12:03 AM
Perhaps a tweaked version of the bounds system for ship hit/collision detection could be used for customer shield shapes/sizes A second set of "bounds" is created fort the shield system, This would usually be a lot rougher than ship bounds, and require fewer vertices, although I can imagine this taking quite some work to impliment, and would probably have a fair resource cost to process
Title: Re: custom shield shapes
Post by: MrDavidoff on January 22, 2013, 09:01:43 AM
+1 on my wish list.

I would love to see ellipse shields
Title: Re: custom shield shapes
Post by: Okim on January 22, 2013, 10:14:16 PM
This and custom collision borders would be great to have. Long ships that lack width are often fired at sides from much greater distances that are required to score a hit to the hull.
Title: Re: custom shield shapes
Post by: Gothars on January 22, 2013, 11:17:43 PM
From my understanding the spherical shields are used for a lot more than is apparent, AI calculations and stuff. Doubt that there would be anything easy about changing that.
Title: Re: custom shield shapes
Post by: zakastra on January 22, 2013, 11:19:58 PM
Is that why the AI likes to snipe with beams at max range when they would hit an active shield, but instead just waste flux on empty space when the shields are down?
Title: Re: custom shield shapes
Post by: Gothars on January 22, 2013, 11:27:12 PM
Yes.
Title: Re: custom shield shapes
Post by: Cycerin on January 23, 2013, 05:08:43 AM
That bug should be reported.
Title: Re: custom shield shapes
Post by: zakastra on January 23, 2013, 05:18:32 AM
I did a while back. At the time Alex said that it making it more accurate would be prohibitively CPU costly for the firing calculations.
Title: Re: custom shield shapes
Post by: Okim on January 23, 2013, 07:20:13 AM
For firing calculations there probably might be a simple solution to reduce the range at which AI is trying to fire. For example a beam has a range of 700. This is visual length of the ship, but for AI this range is 550-600. So it will open fire once the ragter is within these 550-600 regardless of target`s orientation.
Title: Re: custom shield shapes
Post by: zakastra on January 23, 2013, 07:58:25 AM
That would be amputating the arm to cure the sore finger, in that the loss of effectiveness would be more severe to many weapons than what would be gained
Title: Re: custom shield shapes
Post by: MrDavidoff on January 23, 2013, 09:20:43 AM
And here I thought the problem was to make a ellipse from a circle.  :(
Title: Re: custom shield shapes
Post by: Alex on January 23, 2013, 09:28:16 AM
For firing calculations there probably might be a simple solution to reduce the range at which AI is trying to fire. For example a beam has a range of 700. This is visual length of the ship, but for AI this range is 550-600. So it will open fire once the ragter is within these 550-600 regardless of target`s orientation.

That's actually what it already does, except it uses the collision radius rather than the shield radius of the ship. Works pretty well for the vanilla ships - not perfect, of course, but quite serviceable.

But yeah, the engine doesn't support long and narrow (or, I suppose, short and wide) ships very well.

Is that why the AI likes to snipe with beams at max range when they would hit an active shield, but instead just waste flux on empty space when the shields are down?

I've seen this come up a few times (come to think of it, that may have been you the last time I saw it, too :)). That's just not true in terms of how the game works (i.e. it's not shooting at the shield boundary), though it may look that way for a certain combination of collision and shield radiuses. I don't think you'd find that combination in vanilla, though.

More on topic: non-circular shields are most likely not going to happen. I can see a small chance for improving the firing AI to use a better approximation, but it could be the kind of thing that just never gets priority, being both fairly involved and relatively low-impact.
Title: Re: custom shield shapes
Post by: Gothars on January 23, 2013, 09:39:54 AM
Is that why the AI likes to snipe with beams at max range when they would hit an active shield, but instead just waste flux on empty space when the shields are down?

I've seen this come up a few times (come to think of it, that may have been you the last time I saw it, too :)). That's just not true in terms of how the game works (i.e. it's not shooting at the shield boundary), though it may look that way for a certain combination of collision and shield radiuses. I don't think you'd find that combination in vanilla, though.

I see it relatively often with long ships. The enemy just keeps marginally out of range without any attempt to move in closer and hit you.



[attachment deleted by admin]
Title: Re: custom shield shapes
Post by: Alex on January 23, 2013, 09:43:30 AM
I see it relatively often with long ships. The enemy just keeps marginally out of range without any attempt to move in closer and hit you.

Right, that's true. I meant something more specific - it looking like the AI is using the shield boundary for the distance check.
Title: Re: custom shield shapes
Post by: Wyvern on January 23, 2013, 09:45:40 AM
There are only a couple of vanilla ships that have this issue - might it be worth calculating a simple rectangular bounding box and using that as a secondary range check once shields are down?  While I can imagine modded ships that might not be overly helped by such (something caltrop-shaped comes to mind), it ought to be adequate for ships like the Conquest, Apogee, or Brawler.

Edit: It ought to even be possible to compare the bounding box to the bounding circle, and opt to not use the box unless it's sufficiently smaller - most ships don't need a bounding box at all.