FR: Toward a halfway-sensical implementation of shield hit effect radii #5489
Labels
enhancement
A new feature or upgrade of an existing feature to add additional functionality.
graphics
A feature or issue related to graphics (2d and 3d)
At present, the radius of the shield hit effect bitmap painted on a ship's shield mesh when a weapon strikes it is determined entirely by the radius of the ship itself, meaning that an ML-16 striking the Lucifer's shield will light up half the ship, while a Shivan Super Laser hit will produce exactly the same effect. This is a Bad Thing.
I propose an alternative system for handling shield impact radii.
Term definitions:
Ship effect radius: float, defined per-ship in ships.tbl; if absent, derived from ship radius (maybe twice the ship radius)?
Weapon effect radius: float, defined per-weapon in weapons.tbl; if absent, derived from weapon damage (we'll need trial and error to figure out the right factor here)
Effect radius limit: for a given pair of ship effect radius and weapon effect radius, whichever is smaller
Bitmap radius: the actual radius of the shield impact animation painted on the mesh
The naive implementation is to set the bitmap radius equal to the effect radius limit -- that is, when a weapon hits a ship's shield, we look at the ship effect radius and weapon effect radius, and set the effect size to the smaller of those two. This would be sufficient, IMO.
The slightly fancier implementation would be to make it so that the bitmap radius is equal to the weapon effect radius, except that it asymptotically approaches the ship effect radius as the weapon effect radius goes to infinity, never meeting or exceeding it. I don't know exactly what math is required to do this, but I know it's possible and relatively simple. I will update this issue if I figure it out.
The text was updated successfully, but these errors were encountered: