Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21)

Pages: [1] 2

Author Topic: custom shield shapes  (Read 4636 times)

conorano

  • Commander
  • ***
  • Posts: 181
    • View Profile
    • Email
custom shield shapes
« 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.
Logged

zakastra

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: custom shield shapes
« Reply #1 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
Logged
Oh DRM, bane of the carrier captain...

MrDavidoff

  • Captain
  • ****
  • Posts: 398
    • View Profile
Re: custom shield shapes
« Reply #2 on: January 22, 2013, 09:01:43 AM »

+1 on my wish list.

I would love to see ellipse shields
Logged

Okim

  • Admiral
  • *****
  • Posts: 2146
    • View Profile
    • Okim`s Modelling stuff
Re: custom shield shapes
« Reply #3 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.

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4281
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: custom shield shapes
« Reply #4 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.
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

zakastra

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: custom shield shapes
« Reply #5 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?
Logged
Oh DRM, bane of the carrier captain...

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4281
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: custom shield shapes
« Reply #6 on: January 22, 2013, 11:27:12 PM »

Yes.
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

Cycerin

  • Admiral
  • *****
  • Posts: 1656
  • beyond the infinite void
    • View Profile
Re: custom shield shapes
« Reply #7 on: January 23, 2013, 05:08:43 AM »

That bug should be reported.
Logged

zakastra

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: custom shield shapes
« Reply #8 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.
Logged
Oh DRM, bane of the carrier captain...

Okim

  • Admiral
  • *****
  • Posts: 2146
    • View Profile
    • Okim`s Modelling stuff
Re: custom shield shapes
« Reply #9 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.

zakastra

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: custom shield shapes
« Reply #10 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
Logged
Oh DRM, bane of the carrier captain...

MrDavidoff

  • Captain
  • ****
  • Posts: 398
    • View Profile
Re: custom shield shapes
« Reply #11 on: January 23, 2013, 09:20:43 AM »

And here I thought the problem was to make a ellipse from a circle.  :(
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18089
    • View Profile
Re: custom shield shapes
« Reply #12 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.
Logged

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4281
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: custom shield shapes
« Reply #13 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]
« Last Edit: January 23, 2013, 09:47:10 AM by Gothars »
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18089
    • View Profile
Re: custom shield shapes
« Reply #14 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.
Logged
Pages: [1] 2