by Rachael » Thu Feb 08, 2018 10:24 pm
The outlook on this one does not look good.
I haven't seen the hitscan code, myself, but from what I've seen other people say of it, the name is literal. Having a virtual function alongside it can potentially cause performance to tank, especially in situations where there are a lot of hitscans at once (just imagine if someone put 72 chaingunners on a single map...). Granted the virtual will only fire when the scan successfully hits an object, that can still cause problems along the line if the virtual continuously throws false positives.
I am not going to close this one, myself, maybe Graf might have a better solution for this, but this is what I know of it so far.
What makes this worse is that hitscan code is not used exclusively for gun blasts - it's also used for sight checks and explosive LOS testing. Depending on how the Doom code base is written that might not be an issue - but GZDoom has proven to be anything but an ideal world when it comes to adding complexity in certain other scenarios.
The outlook on this one does not look good.
I haven't seen the hitscan code, myself, but from what I've seen other people say of it, the name is literal. Having a virtual function alongside it can potentially cause performance to tank, especially in situations where there are a lot of hitscans at once (just imagine if someone put 72 chaingunners on a single map...). Granted the virtual will only fire when the scan successfully hits an object, that can still cause problems along the line if the virtual continuously throws false positives.
I am not going to close this one, myself, maybe Graf might have a better solution for this, but this is what I know of it so far.
What makes this worse is that hitscan code is not used exclusively for gun blasts - it's also used for sight checks and explosive LOS testing. Depending on how the Doom code base is written that might not be an issue - but GZDoom has proven to be anything but an ideal world when it comes to adding complexity in certain other scenarios.