Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Toward a halfway-sensical implementation of shield hit effect radii #5489

Open
Kestrellius opened this issue Jul 11, 2023 · 0 comments · May be fixed by #6478
Open

FR: Toward a halfway-sensical implementation of shield hit effect radii #5489

Kestrellius opened this issue Jul 11, 2023 · 0 comments · May be fixed by #6478
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)

Comments

@Kestrellius
Copy link
Contributor

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.

@JohnAFernandez JohnAFernandez added 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) labels Nov 2, 2023
@Baezon Baezon linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants