Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Trivial Psychic on September 26, 2008, 01:14:19 am

Title: Persistent Impact Explosions
Post by: Trivial Psychic on September 26, 2008, 01:14:19 am
This is to some degree, a feature request, but since we're in a code-freeze, I guess its more of a feature-feasibility-and-practicality-check.  Following that, if it is possible, easy enough to implement, and popular, then perhaps this thread will be fresh in the minds of coders once 3.6.10 is released in official form and they start to add features again.

The idea is to add weapons table fields to support a system that would leave a persistent explosion at the point of impact for a weapon.  To elaborate, instead of a weapon, say a cap-ship bomb, which hits a capship and you see its impact explosion effect, and maybe some particles trailing away from the point of impact, I'd like to see external fires on the target's hull for some time after the weapon hits.  Think of it:  bomb hits the hull and breaches it.  Sections within are pressurized and fires break out.  Over time, the oxygen in that breached area runs out, and the fire dies down.  I'd just like to see much more external evidence of a ship that's been taking heavy fire, than a few particles and the occasional electrical arcing.  In many sci-fi shows, (B5, BSG) you'll see evidence of hits like that on the target's hull with large fires.

Table fields could indicate the approximate size of the explosion effect, whether or not the weapon should make such impact fires on big-ship or supercap flagged ships (thinking fighter weapons here), and how long the explosion should last (though it could be hard-coded).  The fire should also be made to shrink over time.  Also, it could do well for large fires to have a series of smaller explosion effects encircling it both to hide the edges of the main explosion effect, and to give it some depth.  It may also be more feasible to lump this request with damage decals, so the scar is left behind after the fire has burned itself out.  Tie-ins with the armor.tbl system might also be in order, so weapons that can't breach a ship's armor can't leave behind persistent damage fires.

Thoughts?
Title: Re: Persistent Impact Explosions
Post by: Mongoose on September 26, 2008, 02:47:13 am
Sounds like a great effect to have, though I'm not sure about its practicality.  If you coupled it with damage decals, it'd be somewhat of a poor man's geomod; you'd get the visceral effect of seeing a damaged ship undergo some rather large transformations without mucking about with changing the model geometry.
Title: Re: Persistent Impact Explosions
Post by: Aardwolf on September 26, 2008, 03:05:54 am
I think some modifications to the code that is affected by the $Show Damage: table entry (which makes glowy particles spew from laser hits on most small ships) could do this fairly cheaply.

As for decals, could they be combined with normal/height maps for added realism, or would that look f***ed up where they overlapped?

Edit: on another note, could we maybe improve the very old and in-comparison-to-the-newer-effects crummy-looking damage lightning? Like, using a textured quad strip instead of an opaque one?
Title: Re: Persistent Impact Explosions
Post by: FUBAR-BDHR on September 26, 2008, 01:56:44 pm
Might be a neat effect coupled with some texture replacement.  Have a fire and end up with scorch marks for example
Title: Re: Persistent Impact Explosions
Post by: Stormkeeper on September 26, 2008, 10:29:05 pm
Might be a neat effect coupled with some texture replacement.  Have a fire and end up with scorch marks for example
So you would have to detect and confirm a hit with the engine, then find and replace ... no, probably overlay the existing texture with the scorch texture or what ever texture would be appropriate depending on the weapon type.
Title: Re: Persistent Impact Explosions
Post by: Trivial Psychic on September 27, 2008, 12:28:02 am
I think some modifications to the code that is affected by the $Show Damage: table entry (which makes glowy particles spew from laser hits on most small ships) could do this fairly cheaply.
Problem is that damage particle spew effects shoot out and away from the hull, rather than hug it.  The two working in concert however, could mean you have the fire effect at the point of damage, with sparks (ie. particle spew) flying out of the fire.

Unfortunately, persistent damage fires would be hard to do with beams.  Type 0, 3, and 4 beams aren't that much of a problem, but type 2 (slash) beams don't leave a continuous trail of impacts, but rather it kinda skips across the hull.  The same issue got in the way of beams being given damage decals, back when they were being played with.

Think of what some classic Freespace campaigns would look like with this kind of a fire effect system implemented.  Think of the PVD Hope on its last legs spewing fire, or that Tannen class carrier from INF-R1 after the Nemesis dishes out some beams on it.  :pimp:
Title: Re: Persistent Impact Explosions
Post by: Trivial Psychic on May 20, 2010, 07:56:31 am
 :bump:

Bumping this thread from 1.5 yrs. ago rather than starting a new one, since it contains all my explanations... and it WAS my thread to begin with.  Here's hoping that it can make it in to 3.6.13.