CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.32k stars 4.14k forks source link

Gunfire is extremely loud #14197

Closed Griffinhart closed 8 years ago

Griffinhart commented 8 years ago

Version: 0.C-7811-ga6f14ef

  1. New world, new character.
  2. Debug menu spawn a SCAR-H, reloaded 7.62 incendiary.
  3. Load the gun.
  4. Step outside.
  5. Shoot.
  6. Sound: 223

With Enhanced Hearing CBM, sound is 783.

With a suppressor (and no EH), sound is 161.

With a suppressor and EH, sound is 564.

(Tangentially, I'm noticing random instances of impaired hearing, possibly from zombies destroying structures, even though my character is (what seems to be) fairly far away.

Also impaired hearing from underground gunfire.)

chaosvolt commented 8 years ago

Basically, gunfire is loud. Observation of the century. What we really need is for the environment to affect the resulting effects. Shooting outdoors is usually easier on the ears than when indoors, but it can still lead to noise levels loud enough to damage hearing.

Be lucky that permanent hearing damage isn't a thing. Yet. :V

Griffinhart commented 8 years ago

I don't recall gunfire being this loud (i.e. three-digits-loud) previously - and if I'm interpreting the Sound value correctly (which I may not be), that means an unsuppressed rifle shot can be heard from over 220 tiles away (or over 780 if the player has Enhanced Hearing).

scorpion451 commented 8 years ago

Math sounds about right: keep in mind you're using one of the louder gun/ammo combos there. (an assault rifle firing hand loaded incendiary .30-06 rounds). That's going to cause a bit of a racket, to say the least.

Griffinhart commented 8 years ago

So basically what you're saying is that unsuppressed .308 is approximately 5 times louder than a jackhammer?

scorpion451 commented 8 years ago

Wouldn't surprise me if it were true in reality- one's just hitting the ground with a piece of metal really fast, the other is detonating a series of small explosives in a confined space.

chaosvolt commented 8 years ago

Trying to get concrete (huehuehue) data on the average loudness of a jackhammer, but this is a starting point: https://en.wikipedia.org/wiki/Jackhammer#Health_effects meanwhile http://www.nidcd.nih.gov/staticresources/health/education/teachers/CommonSounds.pdf claims about 10db above that. I would assume it depends on the type, MAYBE the surface.

Meanwhile the range for firearms is harder to find, but 140 comes up an awful lot. http://www.gcaudio.com/resources/howtos/loudness.html claims that a 12-gauge shotgun can be at 165 db, whereas the second source I sited puts it in the 130-140 range. Likely depends on barrel length and what sort of cartridge is used, assuming any of these figures are at all accurate.

In any case, keep in mind that in-game noise is a linear system, last I checked. Decibels are a logarithmic scale.

scorpion451 commented 8 years ago

Wikipedia's list-o-relative-loudness-to-sound-pressures marks a .30-06 being fired 1m away at 171 dB, which is equal to 7,265 Pascals of pressure change for comparison, a jackhammer at 100 dB is equal to 2 Pa of pressure change, and stun grenades at 158–172 dB are are between 1,600–8,000 Pascals So if anything, your gun should be much louder, on par with a flashbang.

Zireael07 commented 8 years ago

How loud is the flashbang in-game?

chaosvolt commented 8 years ago

Ah, excellent. I was trying to find a list like that on wikipedia and came up short.

drbig commented 8 years ago

I feel this has been discussed here already...

chaosvolt commented 8 years ago

Probably been discussed in abundance on the forums if not here, likely ever since the volume-causes-deafness mechanic was added. Because "guns are loud" seems to be a complex concept to comprehend. o3o

EDIT: Guns are loud, not guns are load. Well, they can be loadED, but no idea how you'd logically interpret that typo.

drbig commented 8 years ago

Don't really touch the forum, except for the announcements of my random CDDA webapps and surveys.

It has definitely been touched upon here (probably a search would find it; I find searching for older issues so-so at best, mostly because people tend to get creative with titles and/or the title doesn't capture the actual issue).

narc0tiq commented 8 years ago

A quick check of my email history yielded #11991, which concludes with a note that firearms' noise levels may well need some tweaking. That's all I got out of searching my gmail archives (I've been subscribed to the repo for a good long while now, so any recentish discussions should be findable).

chaosvolt commented 8 years ago

Hmm. It would be easier if we could get good numbers on relative loudness, and how best to translate them into the current game mechanics. Then, that info and its implications might warrant being mentioned in the game's documentation somewhere.

drbig commented 8 years ago

@chaosvolt are you on IRC by any chance? If not come visit (http://tools.cataclysmdda.com/irc is the simplest way to connect).

chaosvolt commented 8 years ago

Ah. I've yet to try the IRC, actually. ^^"

Zireael07 commented 8 years ago

@chaosvolt: Is that relative loudness to pascals link not enough?

Or we could attempt to translate dB data.

1 dB = 1 sound 2 dB = 2 sound 3 dB = 4 sound 4 db = 8 sound

etc.

(BTW I'm accustomed to working with decibels, as dB are also used to measure hearing loss)

chaosvolt commented 8 years ago

Well, it helps somewhat, but being able to fine-tune relative values of firearms would prove useful.

kevingranade commented 8 years ago

We should definitely switch to dB for sounds since it's not just a matter of scaling the value. It's just a matter of doing it. Also it feels like a waste of time to try to fine-tune the values if we're just going to rescale the values to dB latter. On Dec 1, 2015 3:38 PM, "Chaosvolt" notifications@github.com wrote:

Well, it helps somewhat, but being able to fine-tune relative values of firearms would prove useful.

— Reply to this email directly or view it on GitHub https://github.com/CleverRaven/Cataclysm-DDA/issues/14197#issuecomment-161132211 .

chaosvolt commented 8 years ago

Hmm. Might be good to shift to decibels, yeah. ^^"

Coolthulhu commented 8 years ago

Weren't they supposed to be in dB already?

What will change and how?

Zireael07 commented 8 years ago

Considering the values in example given (flashbang vs gunfire) I don't think it's dB.

chaosvolt commented 8 years ago

I kinda assumed it it was straight 1-by-1 linear scale, far as I can tell.

kevingranade commented 8 years ago

Sound levels are currently in units of "distance at which the sound can be heard", with various adjustments.

scorpion451 commented 8 years ago

This is admittedly sort of an off-the-wall idea, not to mention one that would require a lot of coding and potentially open whole barrels full of worms, but just to throw it out there:

What if the engine were given a comprehension of shock force?

A single value of shock force combined with the existing tag system could stand in for everything from sound levels to recoil to damage to explosive force, not only for guns but for every impact and explosion in the game. Punch a zombie? Game calculates both the sound and the damage off the shockforce a player's punch produces, modified by the factors for an item made of fist hitting a mobile item made of flesh. A car hits a concrete wall? Same thing, but for an item with shockforce momentum made of metal hitting an immobile item made of rock. Set off a mininuke? Game uses the defined shockforce of the mininuke's explosive charge to calculate blast size, damage, sound levels...

Some of these things could be pre-calculated to save processing time, so functionally it wouldn't change too much, but on the whole it could allow tons of otherwise manually entered static data to be collapsed to a handful of basic properties like mass and explosive charge, and open whole worlds of potential for deeper physics- things like physics-based recoil (mount a tank gun on a shopping cart, watch newton's third law take it clear across town...)

Griffinhart commented 8 years ago

I think part of this issue is that the "Sound" indicator on the HUD is (was?) intended to inform the player as to how loud they are being (in an absolute, objective sense) whenever they perform an action, but the Enhanced Hearing CBM also uses the "Sound" indicator to inform the player as to how loud their character perceives them being.

So then you get the weirdness of, like "my gunshot is audible out to 223 tiles" -> turn on EH -> "my gunshot is now audible out to 783 tiles despite me doing literally nothing to the weapon itself but fire another round".

mugling commented 8 years ago

Gun loudness was entirely reworked some time ago