codenamecpp / carnage3d

Reimplementation of Grand Theft Auto 1 [GTA1]
MIT License
477 stars 38 forks source link

It is too easy to get caught on fire from explosions #51

Closed MiroslavR closed 3 years ago

MiroslavR commented 4 years ago

Reproduction steps:

  1. Fire a rocket launcher at a wall from a safe distance.
  2. After the initial blast, run towards the explosion.
  3. Get caught on fire.

You would have been fine in the original game.

MiroslavR commented 4 years ago

Generally, the current implementation of explosion mechanics seems to be a bit off. For example, firing a rocket at a wall with a car nearby creates two explosions at the same time, while in the original game the car's explosion is delayed. It looks like the original game just marks vehicles in explosion range to explode after a short delay instead of dealing damage to them.

MiroslavR commented 3 years ago

Do I understand correctly that there still is continuous fire damage happening within the explosion range but it only applies to vehicles now? If so, I am worried about the RC car kill frenzies being too difficult to complete. In the original game, if you set off an RC car under a moving vehicle, it will explode after a delay, even outside of the RC car explosion range.

codenamecpp commented 3 years ago

Yes, it is how explosions work right now. I think in case of RC car, it will blow nearest vehicles instantly, but it is not implemented yet, I've added issue #59

MiroslavR commented 3 years ago

I realize that RC cars are not implemented yet in Carnage3D; that was just an example. My point is that the original game implements explosion chaining differently in general. There is no continuous (across multiple frames) damage for nearby vehicles.

According to the debug overlay (press C with the porkcharsui cheat code), the vehicle damage is instantly set to 100, but it does not explode yet. When it actually explodes, the damage is set to 101. I don't know what this means exactly but it definitely does not seem like continuous damage. I think the nearby vehicles are flagged to (always) explode after a short delay, regardless of their position.

Blowing up the nearby cars instantly in case of an RC car explosion might work but it will require special-casing the RC car explosions, which is not clean and it deviates from the original behavior. It's not the end of the world but I just thought I'd let you know.

codenamecpp commented 3 years ago

Yep, indeed something extremely strange is going on there. For example, if I shoot at car with a pistol - it only takes 80% damage before the explosion, and not 100%. I cannot understand how it works in original game, but it is okay, these nuances can be fully reproduce only by reversing exe, but it is beyond of project goal.

codenamecpp commented 3 years ago

Did some fixes. I think it pretty close to original now :)

MiroslavR commented 3 years ago

:+1: One minor thing I can notice is that a rocket explosion causes the nearby vehicle to explode instantly (when the hit isn't direct; a direct hit is expected to cause two instant explosions). In the original game, there is a delay:

https://user-images.githubusercontent.com/7346770/103017009-3f2d7080-4543-11eb-8f46-bedf2bc79136.mp4

codenamecpp commented 3 years ago

Okay, so, any non-direct hit causes delayed explosions. Fixed (I hope) :)

MiroslavR commented 3 years ago

Looks good now, thanks!