Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Acoustics/sound mechanics - the new magma  (Read 1865 times)

Rainman

  • Escaped Lunatic
    • View Profile
Acoustics/sound mechanics - the new magma
« on: June 12, 2010, 03:33:01 am »

I've been playing DF and reading the forums for years now, but only just joined and this is my first post. Please be kind  :)
 
There are some awesome mechanics in the game, my favourite being the thermal and liquid dynamics. Heat and liquids introduce some of the most FUN weapons, tools of dwarven productivity, self-destruct buttons and elements of replayability in the game.
 
There are endless ways to both defend and allow FUN to ensue in your own fortress through:
 
Water, magma, ice, obsidian
 
Acoustics – the new layer of fun
So I propose introducing acoustics as something that would work in an equally fun way.
 
Yes, there are some basics like noise from workshops, fighting, etc. but it doesn’t do anything really FUN, like allow for awesome defences or self-annihilation.
 
So what could you do with acoustics?
Fun Dynamics
  •    Level of sound in each square (how many decibels?), decreasing as distance increases from the source of the sound
  •    Noise tolerance (can an elven eardrum withstand the same amount of sound as dwarven before exploding??)
  •    Echoes/reverberation (off underground cave walls)
  •    Amplification (through devices/items)
  •    Sound dampening (materials absorb sound at different levels)
  •    Creatures can emit noise (certain HFS could emit noise so great over a certain area that it may kill other creatures)
 
I think amplification + the potential of echoes in underground, enclosed spaces = GREAT FUN POTENTIAL.
 
Realistic Dynamics
 
  •    Each dwarf has a level of hearing, improving detection of units, actions, and proximity of impending fun
  •    Deaf dwarves (oh noes… I didn’t hear the dragon walking through the door)
  •    Dwarves missing senses, like sight, could still hear their way around
  •    Improve or degrade hearing: too many dwarven dance parties = hearing goes down. Dwarf is blind = hearing improves gradually, as he is relying on his hearing above other senses.
  •    Dwarves that can hear stealthed units (by overcoming a check for hearing ability vs stealth ability)
  •    Distortion - sound waves may interfere with each other, so stronger sounds would overpower weaker ones
  •    Underwater acoustics
  •    All entities could generate sound (being next to a rushing river could stop a blind dwarf with good hearing from hearing an approaching carp
  • All objects could have a sound tolerance level, so glass objects may break more easily when exposed to loud noises.
 
Tools/instruments of sound
 
  •    Speaking trumpets (help your hard of hearing dwarves) or use it as a medieval megaphone (to amplify sound)
  •    Create surfaces which dampen sound – cover your walls with a ‘sound-proofing’ material to create a dwarven music studio/dance parlour.
  •    Earplugs (to ward off malicious soundwaves)
  •    Dwarven vuvuzela (been watching too much World Cup :P)
 
I’m going to reserve some posts to extrapolate on the specifics of each concept – but any ideas or comments would be most welcome.
« Last Edit: June 15, 2010, 08:42:03 am by Rainman »
Logged

Rainman

  • Escaped Lunatic
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #1 on: June 12, 2010, 03:33:26 am »

The proposed general principles of sound
  • Any entity can create sound
  • A sound is created with a volume (using a scale of 1 to 20). 0 = no sound
  • A square is the source of a sound.
  • Each square has a sound level (0 to 20).
  • A sound moves in all directions away from the sound source at the same rate.
  • Each sound decreases in volume for each square that it moves away from the sound source (decreases by a fixed amount, so a loud sound carries further than a soft sound).
  • Sounds can bounce off solid surfaces to create an 'echo'.
Creatures and sound 
  • Creatures may be affected by the sound level in the square they are in (they have a level of decibels a sound can reach before bad stuff happens like burst eardrums).
  • Creatures have: a sound tolerance level (decibels), hearing ability
Amplification   
  • Every square's sound level is modified by an amplification factor (0 to n percent) - which increases the sound level.
  • May be cumulative debilitating effects for a creature being   repeatedly exposed to a level of sound over a period of time.
  • A creature can amplify the sound in the square it is in (using an item that amplifies)
  • Multiple sounds in the same square at the same time adds to the overall sound level in that square.
  Dampening     
  • Every square is modified by a dampening factor (0 to n percent) - which reduces the sound level.
  • A creature can dampen the sound in the square it is in using a dampening item.
  • Objects (and creatures) may themselves dampen sound based on their size.
  • Materials may have a dampening factor (which modifies clothing/objects through which sound passes)
  • Special dampening objects may be created/applied to walls, floors, to provide a dampening factor - create a sound-proof room
Feedback system     
  • Ability to toggle between normal view and the sound layer.
  • Sound might be depicted as green (for example) in the sound layer. No sound volume in a square would mean no colour in that square. Sound volume should be depicted on a scale, where the lightest shade of green would be used for little sound eventually becoming dark, dark green for a blaringly loud volume.
 
How sound waves might travel
00000  >  00000  >  55555
00000  >  06660  >  50005
00700  >  06060  >  50005
00000  >  06660  >  50005
00000  >  00000  >  55555

This is a simplified example, using the assumption that the sound waves are only travelling in x and y axes, with no interference or dampening/amplifying effects in the squares. Sound waves should travel outwards from the source in all directions (including z-levels), ie. always in a cube shape.

Sound interference

00000  >  11100  >  00000  > 00000 
02000  >  10100  >  01111  > 00000 
00000  >  11322  >  01000  > 00000 
00030  >  00202  >  01000  > 00000 
00000  >  00222  >  01000  > 00000 

2 distinct sounds are created at the same time in the first step. The following steps show the subsequent dispersion of sound. Different overlapping sounds are cumulative, adding to the volume of a square. For simplicity, this example assumes the sound waves are only travelling on the x and y axes.

Echo
Squares with minimal or no dampening modifier (ie. a rock wall), would rebound the sound.
Example 1:

XXXXX >  XXXXX >  XXXXX
02000  >  11110  >  01111   
00000  >  11322  >  11010   
00030  >  02222  >  01000   
XXXXX >  XXXXX >  XXXXX

Example 2:

XXXXXXX > XXXXXXX > XXXXXXX > XXXXXXX
0003000  >  0424240  > 0102010  >  0000000
XXXXXXX > XXXXXXX > XXXXXXX > XXXXXXX

X = wall
Distinct sounds are created at the same time in the first step. Subsequent steps show how sound might rebound off surfaces with no dampening modifier. If a sound wave hits a wall, it reflects at the same angle that it hit the wall. The rate of dispersion remains the same, even though in a narrow corridor the original sound is louder after the sound rebounds off both opposing walls. For simplicity, these examples assume sound waves travelling only on the x and y axes.
« Last Edit: June 15, 2010, 10:16:19 am by Rainman »
Logged

Rainman

  • Escaped Lunatic
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #2 on: June 12, 2010, 03:34:11 am »

Reserved.
Logged

DDR

  • Bay Watcher
    • View Profile
    • Frogatto
Re: Acoustics/sound mechanics - the new magma
« Reply #3 on: June 12, 2010, 05:14:39 am »

If we* could get together a full, exhaustive set of sounds, I think this would make a really neat cacophony. Above ground would sound so quieter than below ground, I imagine. Ooo, hearing this in-game would make my day! ;D

It might be interesting if music were fed into this system, from, say, the center tile in the game screen. It would sound different depending on where you were. I imagine the cloth stockpile room would sound dead, muted, while the stone stockpile would be echoy as heck.

Bonus points if we can get a live feed from the mic set up with this. ::)

*you
Logged
Il Palazzo: "Urist, quick, grab your ax! There's a troll rampaging through the decimal conversion chambers!"
melomel: DF is like OCD candy, isn't it? existent: No, DF is like the stranger in the trench coat offering the candy.

Rainman

  • Escaped Lunatic
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #4 on: June 12, 2010, 05:23:44 am »

Ah I didn't mean actual sounds, just including the mechanics of 'sounds' in the dwarven world. Sorry if that wasn't clear!
No reason why it couldn't be extended to that, but that wasn't the original intention :)
Logged

Cotes

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #5 on: June 12, 2010, 09:18:21 am »

I like the idea, but this doesn't really include the mechanics for how to properly emulate how sounds works, i.e. wave. Just having it move away from the source isn't really sufficient if you want to do it properly, since that suggest that if you make sound in dampened room with a hole in the wall, the sound would merely move in a direct line after passing the hole.

I'm not sure how you'd handle direction of sound (in a way that won't eat up too much FPS). Maybe sound could be basically handled by making a tile with sound passing the amount of sound it has (x dampening/amplifying value of the tile x default amount of sound decrease per tile) to all the adjacent tiles minus the ones that added to that tiles sound value... Would that be sufficient to simulate sound?

Also, I'm not sure how easy or efficient it should be to weaponize sound. I mean, what kind of source (that sticks to the setting of DF) could you make that would cause enough noise to be dangerous to anything that isn't directly next to it?
Logged
Well if you remove the [MULTIPLE_LITTER_RARE] tag from dwarves I think they have like 2-4 children each time they give birth. And if you get enough mothers up on the pillars you can probably get a good waterfall going.
Ashes are technically fire-safe.

Kilo24

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #6 on: June 12, 2010, 03:39:48 pm »

This is a lot of work for something with not much game effect - not that that's stopped Toady before.  I'd really want to be able to see evidence of what the sound is doing, too - there's already way too many systems in DF that give no information to the player.

I think we'd need more use for sound than deafening/ damage/ detection, personally.  Maybe allow for alarms to be spread throughout the fortress (allowing church bells and gongs to be used in the case of invasions/danger.)  When magic kicks in, siren songs and maddening whispers could affect dwarves based on whether they can be heard (and you could implement that earlier in artifact effects, too.)  Roars from forgotten beasts or demons could frighten dwarves who heard them into running (based on the dwarf's personality/skills,) and invading armies/ your own fortress could have loud war instruments with the same principle. 

But even if it had all of that... it is a complex system.  I still am worried about creating a complex system with no feedback to the player, so I wouldn't support it unless it comes with a not-cumbersome way to see its effects.
Logged

Cotes

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #7 on: June 12, 2010, 05:27:38 pm »

This is a lot of work for something with not much game effect - not that that's stopped Toady before.  I'd really want to be able to see evidence of what the sound is doing, too - there's already way too many systems in DF that give no information to the player.

I think we'd need more use for sound than deafening/ damage/ detection, personally.  Maybe allow for alarms to be spread throughout the fortress (allowing church bells and gongs to be used in the case of invasions/danger.)  When magic kicks in, siren songs and maddening whispers could affect dwarves based on whether they can be heard (and you could implement that earlier in artifact effects, too.)  Roars from forgotten beasts or demons could frighten dwarves who heard them into running (based on the dwarf's personality/skills,) and invading armies/ your own fortress could have loud war instruments with the same principle. 

But even if it had all of that... it is a complex system.  I still am worried about creating a complex system with no feedback to the player, so I wouldn't support it unless it comes with a not-cumbersome way to see its effects.
Then again, DF already has a crude noise system mechanic feature with no proper feedback (DFWiki needed). Then again, if you make it more complex than the fixed distance of noise workshops and activities do now, then some sort of feed back becomes absolutely necessary.

A simple way would be making the soundscape visible by entering a viewer of some sort (or by the viewer tool, although that'd make it pretty time consuming to get a proper idea of how noisy your fort is). You obviously can't really visualize it all the time without the screen being really cluttered and using sound itself seems pretty inaccurate and (again) needlessly time consuming way to figure things out.
Logged
Well if you remove the [MULTIPLE_LITTER_RARE] tag from dwarves I think they have like 2-4 children each time they give birth. And if you get enough mothers up on the pillars you can probably get a good waterfall going.
Ashes are technically fire-safe.

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #8 on: June 12, 2010, 08:17:13 pm »

While the acoustics flow subject is interesting and worth examining, I'd like to address the issue of in-game sound.

For dwarf mode in particular, sounds correlated to in-game actions is very risky because of the variable framerate; 200 FPS would be a veritable cacophany without a limiting number for sounds per second, which even then would cause the problem of omitting sounds. It's an uphill battle.

That said, I'm certain a third-party utility could detect ingame actions and play .wav files accordingly...
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Kilo24

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #9 on: June 12, 2010, 10:36:05 pm »

Then again, DF already has a crude noise system mechanic feature with no proper feedback (DFWiki needed). Then again, if you make it more complex than the fixed distance of noise workshops and activities do now, then some sort of feed back becomes absolutely necessary...
I forgot to mention that.  Yes, it should be integrated with this sound system, if it is indeed retained in a similar format.

While the acoustics flow subject is interesting and worth examining, I'd like to address the issue of in-game sound...

For dwarf mode in particular, sounds correlated to in-game actions is very risky because of the variable framerate; 200 FPS would be a veritable cacophany without a limiting number for sounds per second, which even then would cause the problem of omitting sounds. It's an uphill battle.

That said, I'm certain a third-party utility could detect ingame actions and play .wav files accordingly...
A lot of work to find sound files and synchronize them with the display, and the gain is cosmetic.

I guess I can't really see it being a good idea.
Logged

Rainman

  • Escaped Lunatic
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #10 on: June 13, 2010, 01:54:13 am »

This is a lot of work for something with not much game effect - not that that's stopped Toady before.  I'd really want to be able to see evidence of what the sound is doing, too - there's already way too many systems in DF that give no information to the player.

I think we'd need more use for sound than deafening/ damage/ detection, personally.  Maybe allow for alarms to be spread throughout the fortress (allowing church bells and gongs to be used in the case of invasions/danger.)  When magic kicks in, siren songs and maddening whispers could affect dwarves based on whether they can be heard (and you could implement that earlier in artifact effects, too.)  Roars from forgotten beasts or demons could frighten dwarves who heard them into running (based on the dwarf's personality/skills,) and invading armies/ your own fortress could have loud war instruments with the same principle. 

But even if it had all of that... it is a complex system.  I still am worried about creating a complex system with no feedback to the player, so I wouldn't support it unless it comes with a not-cumbersome way to see its effects.

I agree (added a 'Feedback' section to my original post). You'd certainly need a feedback system, but I don't think it would be visually desirable to 'see' the sound all the time. However, it should be a layer which can be toggled on or off, which would overlay sound. This could be depicted by colouring each square based on the volume level in that square. So, zero volume is colourless, then goes from light to dark green (if green is the colour of sound layer), as volume increases.

Would be interesting to have layers of other things like heat! See things in UV - a la Predator :)

The point of this topic is not to play sounds that you can hear, like .wav files, so please keep it about the mechanics, not playing sounds.
« Last Edit: June 13, 2010, 02:06:19 am by Rainman »
Logged

Cotes

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #11 on: June 13, 2010, 06:38:05 am »

While the acoustics flow subject is interesting and worth examining, I'd like to address the issue of in-game sound.

For dwarf mode in particular, sounds correlated to in-game actions is very risky because of the variable framerate; 200 FPS would be a veritable cacophany without a limiting number for sounds per second, which even then would cause the problem of omitting sounds. It's an uphill battle.

That said, I'm certain a third-party utility could detect ingame actions and play .wav files accordingly...
However, when it's stationary objects making the sound (i.e. buildings), would it really hit FPS too bad?
Logged
Well if you remove the [MULTIPLE_LITTER_RARE] tag from dwarves I think they have like 2-4 children each time they give birth. And if you get enough mothers up on the pillars you can probably get a good waterfall going.
Ashes are technically fire-safe.

Calvin

  • Bay Watcher
  • @
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #12 on: June 13, 2010, 10:34:21 am »

Sound should take in the form of invisible, non drowning, non drinkable, water (mechanics technically wise), but the flow speed of this water should be increased quite fast, and evaporate at higher levels.

Basically, this would crudely replicate what sound was like without much programming a new system.


With the "water" sound system, basically a 7/7 sound block would be deafening, and then it dissipates like a water stack, and spreads into the room until it's all 1/1's, and then evaporate quickly.

Anything that generates sound could make this invisible block of sound, and because of it's waterlike movement, it'll spread quickly but not spread too far and have variable distance.
Logged

Cotes

  • Bay Watcher
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #13 on: June 13, 2010, 10:56:15 am »

Sound should take in the form of invisible, non drowning, non drinkable, water (mechanics technically wise), but the flow speed of this water should be increased quite fast, and evaporate at higher levels.

Basically, this would crudely replicate what sound was like without much programming a new system.


With the "water" sound system, basically a 7/7 sound block would be deafening, and then it dissipates like a water stack, and spreads into the room until it's all 1/1's, and then evaporate quickly.

Anything that generates sound could make this invisible block of sound, and because of it's waterlike movement, it'll spread quickly but not spread too far and have variable distance.
It should be instant rather than a flow though, and using stacks of 1-7 would make sound travel way too short distance. It wouldn't work on z-levels either.

Also, this would mean that sound would be calculated all the time even for stationary objects, which seems a bit unnecessary.
Logged
Well if you remove the [MULTIPLE_LITTER_RARE] tag from dwarves I think they have like 2-4 children each time they give birth. And if you get enough mothers up on the pillars you can probably get a good waterfall going.
Ashes are technically fire-safe.

Calvin

  • Bay Watcher
  • @
    • View Profile
Re: Acoustics/sound mechanics - the new magma
« Reply #14 on: June 13, 2010, 11:06:37 am »

Sound should take in the form of invisible, non drowning, non drinkable, water (mechanics technically wise), but the flow speed of this water should be increased quite fast, and evaporate at higher levels.

Basically, this would crudely replicate what sound was like without much programming a new system.


With the "water" sound system, basically a 7/7 sound block would be deafening, and then it dissipates like a water stack, and spreads into the room until it's all 1/1's, and then evaporate quickly.

Anything that generates sound could make this invisible block of sound, and because of it's waterlike movement, it'll spread quickly but not spread too far and have variable distance.
It should be instant rather than a flow though, and using stacks of 1-7 would make sound travel way too short distance. It wouldn't work on z-levels either.

Also, this would mean that sound would be calculated all the time even for stationary objects, which seems a bit unnecessary.

Well, it would make it that the closer you are to the source, the louder it is. And what do you mean it won't work on z-levels, it'll go down if there's any sort of way to go down.
:/
Logged
Pages: [1] 2