Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Idea] Area sounds.  (Read 1466 times)

Tei

  • Escaped Lunatic
    • View Profile
[Idea] Area sounds.
« on: June 18, 2009, 01:48:29 am »

First, this is my first post. And I have no idea if this is the right subforum, also my english suck. Sorry about that.

Here is the idea:

It seems all strategy games (like Sim City 2000) have something like "area sounds". Wen the screen is focused in a area, the speaker emits sounds related with what you see on the screen.  This is done scanning the screen, and sending sounds alike whatever is found. 
I have downloaded a few "tools" for DF, one was a "3d synced" viewer. I suppose that tool "look" into DF memory, to detect what to draw as 3D.  So... I think that information that is used to render a 3D landscape, can be used for a "ambient sound engine".  If "underground blocks" are detected, a sound of "deep cave" can be emited, if lots of forest tiles are detected, a sound of fores,...  Other thing that can be detected are: sleeping dwarfs, dwarfs working on workrooms, cats, goblins, elephants, etc..

Since this can work as a separate project, theres not need to touch a line of code of DF.  (But It could be handy, to distribute DF with a small information file with the "memory mapping" that these 3d viewers need. )

Discuss.
Logged

Braingnawer

  • Bay Watcher
    • View Profile
Re: [Idea] Area sounds.
« Reply #1 on: June 18, 2009, 02:41:48 pm »

Thats actually a pretty awesome idea. It would be cool to have something heavy and industrial sounding in a mountain and tranquility in a forest. Can it detect goblins? Goblin music would be cool
Logged

Kadath

  • Bay Watcher
    • View Profile
Re: [Idea] Area sounds.
« Reply #2 on: June 18, 2009, 05:45:30 pm »

Why not find the flag that indicates if an invasion is going on, and play "combat" music? A "heavy" version of toadys guitar playing perhaps (with sinister drums etc)  :)
Logged

Sensei

  • Bay Watcher
  • Haven't tried coffee crisps.
    • View Profile
Re: [Idea] Area sounds.
« Reply #3 on: June 18, 2009, 07:53:49 pm »

I think if we make a sound for every object we want, and have it die down depending on its distance from the center of the screen, we can get something realistic- hammering for forges, general raucous for combat, a bit of talking per-dwarf (together they are replaced with a big crowd noise, but alone they you can hear them muttering dwarfy things), etc.

If we put all this together carefully, we can... reduce the framerate.

Dunno, guys.
Logged
Let's Play: Automation! Bay 12 Motor Company Buy the 1950 Urist Wagon for just $4500! Safety features optional.
The Bay 12 & Mates Discord Join now! Voice/text chat and play games with other Bay12'ers!
Add me on Steam: [DFC] Sensei

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [Idea] Area sounds.
« Reply #4 on: June 19, 2009, 12:38:46 am »

Framerate depends on OpenGL and 3d and data processing power of your pc. A few midis cannot affect it drastically.

I highly like this idea, however I've never tried exe scoping myself... I hope someone from former masters could do it.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

kcwong

  • Bay Watcher
    • View Profile
Re: [Idea] Area sounds.
« Reply #5 on: June 19, 2009, 12:51:02 am »

Framerate depends on OpenGL and 3d and data processing power of your pc. A few midis cannot affect it drastically.

I highly like this idea, however I've never tried exe scoping myself... I hope someone from former masters could do it.

It's not about playing the music though. It's taking snapshot and then analyzing the map/creature data, which you must do frequently.
Logged

chinkeeyong

  • Bay Watcher
  • Modder
    • View Profile
Re: [Idea] Area sounds.
« Reply #6 on: June 19, 2009, 06:01:34 am »

Just make it toggle-able in the init file.

Interesting. In my opinion, it would be cool if this took the form of new music layers over the existing guitar. Mountains would be linked to drums, magma a slow bass, forests would be a lively flute, etc. I don't know who would play the actual music, though.
Logged
Embrace imagination
Steam Machine: DF steampunk mod

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [Idea] Area sounds.
« Reply #7 on: June 19, 2009, 06:58:11 am »

It's not about playing the music though. It's taking snapshot and then analyzing the map/creature data, which you must do frequently.
The game already does it, you see it if you hover a crosshair over some objects. There's only a matter of reading it from memory, so it's not about taking snapshots.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

kcwong

  • Bay Watcher
    • View Profile
Re: [Idea] Area sounds.
« Reply #8 on: June 19, 2009, 12:03:04 pm »

It's not about playing the music though. It's taking snapshot and then analyzing the map/creature data, which you must do frequently.
The game already does it, you see it if you hover a crosshair over some objects. There's only a matter of reading it from memory, so it's not about taking snapshots.

DF's changing the data... so you have to take a snapshot, unless you don't mind inconsistent data... hmmm, well, I guess you indeed won't mind.

Unlike Dwarf Manager, which you'd pause DF and switch to it, area sound will have to run in a loop, periodically pulling data from DF, analyze it, and play the configured music.

I guess it'll be okay if you don't mind the music lagging behind (e.g. you won't hear battle music at all if the fight's over very quickly, or if you change area quickly you won't hear the switched-out area's music).

The program will have to analyze the current view area for criteria to select music, and be quick enough to respond to changing events and the player shifting the view to somewhere else.

I have no idea what DF's in-memory data structures are... but perhaps if we can streamline the music selection criteria, it can do it quickly.

e.g. Check siege/ambush flag first and allow battle music to override all other music
Logged

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: [Idea] Area sounds.
« Reply #9 on: June 19, 2009, 12:51:59 pm »

I think if we make a sound for every object we want, and have it die down depending on its distance from the center of the screen, we can get something realistic- hammering for forges, general raucous for combat, a bit of talking per-dwarf (together they are replaced with a big crowd noise, but alone they you can hear them muttering dwarfy things), etc.

If we put all this together carefully, we can... reduce the framerate.

Dunno, guys.
just think, I tried to crash the game with memory deallocation, you'll do it much more effectively.