Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Chance to hit small places.  (Read 2212 times)

Sarolveldruk

  • Ensign
  • *
  • Posts: 38
    • View Profile
Chance to hit small places.
« on: March 27, 2013, 02:46:31 PM »

A lot of times I see ship hulls in vanilla and mods with remarkably thin areas that connect it together. I have always found it odd how there is a definite chance of hitting that small part when it's so miniscule in comparison to the rest of the ship.

A chance-to-hit variable could be implemented onto different sprite areas. Super thin struts, for example, would only have a 10% chance of being hit, while the main body of the ship hull would be 100%.
Logged

PerturbedPug

  • Commander
  • ***
  • Posts: 179
    • View Profile
Re: Chance to hit small places.
« Reply #1 on: March 27, 2013, 02:51:44 PM »

How do you know it's not really wide when you look at it from the front?
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Chance to hit small places.
« Reply #2 on: March 27, 2013, 03:42:18 PM »

I don't recall any particularly notable examples in vanilla; there are a number of mods with (what I consider) egregiously thin ships, but that's the modder's concern...  Which vanilla ships are you talking about?
Logged
Wyvern is 100% correct about the math.

Sarolveldruk

  • Ensign
  • *
  • Posts: 38
    • View Profile
Re: Chance to hit small places.
« Reply #3 on: March 27, 2013, 04:52:31 PM »

How do you know it's not really wide when you look at it from the front?
Fair point. It's mostly up to the creator of the sprite to decide the hidden dimensions of a ship. However, in some sprites you can see some effects given to make it appear rounder, such as a tube, that give an idea of its dimensions.

There can still be exceptions, such as wings and struts, that don't seem like they'd be wide at any angle other than what is given. It just seems odd how an antenna can catch every shell and energy bolt that is fired at it.

I don't recall any particularly notable examples in vanilla; there are a number of mods with (what I consider) egregiously thin ships, but that's the modder's concern...  Which vanilla ships are you talking about?
I may have been a little quick there.

Recently I've been playing the Vacuum mod, and plenty of ships there have parts sticking out that are impossible to miss, given the areas that they encompass.

Some examples:







So the point here is that while vanilla may not have super thin ships, mods can benefit from this perk and maybe create some interesting avenues for different forms of gameplay.
Logged

BillyRueben

  • Admiral
  • *****
  • Posts: 1406
    • View Profile
Re: Chance to hit small places.
« Reply #4 on: March 27, 2013, 06:07:52 PM »

that's the modder's concern...
My thoughts on the matter.
Logged

JT

  • Commander
  • ***
  • Posts: 129
    • View Profile
Re: Chance to hit small places.
« Reply #5 on: March 27, 2013, 06:49:38 PM »

Knowing nothing about the code, I would agree that a to-hit chance would be awesome. (My own 2D space sim design incorporates that to try to reflect the sigmoid curve of firing at the centre of mass and having shots go high or low in the theoretical 3D game environment.)

However, knowing how the code is all about building bounds polygons, this would grow extremely complicated extremely quickly. Instead of collision-detecting against a single mass of triangles, what it would then be doing is breaking down the structure into a number of "bounds layers" and then running collision detection against each. While in essence the number of bounds polygons is unlikely to change, the overhead incurred in having to check against multiple layers would result in slowdown -- paired with the pseudo-random number generator and it incurs even more overhead.

It's one of those things that'd be tough to make a ruling on without having actually implemented it, and after having implemented it the work has already been done and the point is moot. I'd lean towards "sure, why not?" just for sake of liking the idea of building a ship with struts that don't actually reduce the hit points of the hull itself -- Uoomoz's Corvus' McHammer would benefit immensely if the strut and hammer behaved only for collisions and the primary hull itself was the only thing that projectiles could affect, and it'd make the AI smarter about not wasting shots against the hammer when the hammer is just swung out of the way. That example does raise the question, however -- are these "semi-permeable polygons" still guaranteed collision points for ships? What about missiles? And how does the game handle "duration" while remaining in the polygon's bounds from simulation frame to simulation frame? Will it spontaneously react to a collision eventually or will it be first-time's-the-charm?

My point is basically that while this seems simple and elegant on the surface, it raises a bunch of border scenarios that rapidly grow it in complexity, like mercury thiocyanate. ;-)
Logged