Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Collision immunities  (Read 1335 times)

JT

  • Commander
  • ***
  • Posts: 129
    • View Profile
Collision immunities
« on: March 08, 2013, 01:08:10 PM »

Since "pilotable fighters" seems to be lambasted against by the community for reasons I can't quite grasp (fast and brutal hit and run combat in a fighter would be like flying a glass Hound on steroids), I wonder if instead of official implementation, the features necessary to implement it via mods could simply be implemented as part of the API to allow the mod community to do it on their own behalf. The abilities that would then enable this would also incidentally enable other interesting side effects as well.

Specifically we would need an ability that we don't already have: to make objects immune to colliding with certain other objects. This would create a CollisionCheckPlugin that simply disables the radius-bounding collision and ignores the polygon bounding collision operation. Depending on the object, it would be "revenue neutral" or even "revenue positive" so to speak, since it would simply flag a radius collision as impossible before it got to the relatively expensive bounding functions -- although for battlefields which had a lot of objects that could collide and no objects that couldn't collide, the added computations would of course cause slowdown on the order of O(n) for every object on the field whenever a potential collision is detected.

Interestingly, what I was originally going to request in this thread actually turns out already to be there: we already have the ability to make ships vulnerable to fragmentation damage via OnHitEffectPlugin, which has many uses other than just fighters -- and this is something people might be interested in looking at with their own mods (such as "explodey" fuel tankers that don't react well to explosive shells)...
Logged

Aratoop

  • Admiral
  • *****
  • Posts: 613
    • View Profile
Re: Collision immunities
« Reply #1 on: March 08, 2013, 01:41:48 PM »

Meh. Right now there's a fatal:null error everytime you command a fighter and you go to refit&repair (you can do it on devmode,btw)
Logged
Quote
The community's response to a change is inversely proportional to its importance.

What do you call a dog who's a magician? A labracadabra

Pelly

  • Admiral
  • *****
  • Posts: 757
    • View Profile
Re: Collision immunities
« Reply #2 on: March 08, 2013, 02:08:08 PM »

we really need a like or rate up button...as both the comment and the reply need to be upped, (and I still need someone to post the dev mode stuff!)
Logged

JT

  • Commander
  • ***
  • Posts: 129
    • View Profile
Re: Collision immunities
« Reply #3 on: March 08, 2013, 02:20:56 PM »

Hmmm... interesting. I was under the impression that piloting a fighter was impossible, so my intent was to create "frigate fighters" ("frighters"!) and then use game logic to treat them exactly as fighters -- all of the fighters you aren't piloting yourself would then be converted into wings, with the exception of the first wing which would simply be attached to you as wingmen. Since the "frighters" would count as ships rather than fighters under the CollisionClass, being able to make them immune to friendly-fire would be important (i.e., the CollisionCheckPlugin would check against DamagingProjectiles and Ships and allow the fighter not to collide with the former if it originated from friendly ships, and allow the fighter not to collide with the latter ever).

Of course, this was before I noticed the setCollisionClass() function in CombatEntityAPI... so technically, for "frighters" alone, this wouldn't be necessary. On the other hand, CollisionCheckPlugin would be generally useful enough that it should be evaluated on its own merits.


Incidentally, if they are already flyable, I would lean towards classifying it as a bugfix request rather than a feature request (I mean, I can tell they're obviously disabled for "ship-oriented" gameplay reasons, but at the very least it counts as a "feature fix request"). =)
Logged