Collision Detection
Posted: Thu Jan 02, 2014 2:36 pm
Something strange is happening in the collision detection code in D2. LoNi brought it to my attention a few days ago, but it's turning into a larger problem.
It's most visible with gauss: sometimes you get a hit that deals no damage. But weirder still -- the hits you DO get deal the WRONG amount of damage. We were able to determine that a hit on the very edge of the pyro (its wings) reliably did zero damage. But it gets weirder...
I ran two tests -- one in D2 DOSBox, one in Retro 1.1.1, firing gauss at a still target. Here are the demos:
I fired some shots dead center on the pyro, some at the edge of the hit sphere. Here's what I found --
In D2 1.2 (DOSbox), I fired 7 shots. Five did 12 damage, one did 13, one did 1 (I might've missed/hit the wall on that one).
In Retro 1.1.1, 11 shots. 4 were clear hits that did 0 damage, 4 did 13, and 3 did 14.
In other words, gauss is both too weak AND too strong at the moment. On a marginal hit, you often do 0 damage; on a clear hit, you do an extra 8-17% damage.
I believe whatever's going wrong here is affecting other weapons, but it seems to be most visible with gauss. LoNi and I were able to replicate the effect -- that where you hit the ship affects how much damage you do -- significantly with mercs and slightly with concs. I suspect this may also be related to the difficulty we're having picking up powerups, and I've heard reports of marginal fusion clangs dealing 0 damage as well.
My first pass through looking at the collision code, I found some really broken additions, which I removed. That eliminated the 0 damage hits, but they turned into 4 and 6 damage hits . . . and the others jumped up to 16! So something is still broken.
I'll continue to do analysis and post any findings here.
It's most visible with gauss: sometimes you get a hit that deals no damage. But weirder still -- the hits you DO get deal the WRONG amount of damage. We were able to determine that a hit on the very edge of the pyro (its wings) reliably did zero damage. But it gets weirder...
I ran two tests -- one in D2 DOSBox, one in Retro 1.1.1, firing gauss at a still target. Here are the demos:
I fired some shots dead center on the pyro, some at the edge of the hit sphere. Here's what I found --
In D2 1.2 (DOSbox), I fired 7 shots. Five did 12 damage, one did 13, one did 1 (I might've missed/hit the wall on that one).
In Retro 1.1.1, 11 shots. 4 were clear hits that did 0 damage, 4 did 13, and 3 did 14.
In other words, gauss is both too weak AND too strong at the moment. On a marginal hit, you often do 0 damage; on a clear hit, you do an extra 8-17% damage.
I believe whatever's going wrong here is affecting other weapons, but it seems to be most visible with gauss. LoNi and I were able to replicate the effect -- that where you hit the ship affects how much damage you do -- significantly with mercs and slightly with concs. I suspect this may also be related to the difficulty we're having picking up powerups, and I've heard reports of marginal fusion clangs dealing 0 damage as well.
My first pass through looking at the collision code, I found some really broken additions, which I removed. That eliminated the 0 damage hits, but they turned into 4 and 6 damage hits . . . and the others jumped up to 16! So something is still broken.
I'll continue to do analysis and post any findings here.