Background music/sound effects
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Background music/sound effects
What I'd like is the ability to specify a loopable sound file as a background track for each level, or even different parts of the same level. These kinds of things really add to the ambience.
Perhaps you could make a sub-set of functions that don't affect the dungeon, but affect world events or system settings. This way you could still use normal invisible pressure pads to activate sound effects, change background music, etc.
Perhaps you could make a sub-set of functions that don't affect the dungeon, but affect world events or system settings. This way you could still use normal invisible pressure pads to activate sound effects, change background music, etc.
Re: Background music/sound effects
If something in the dungeon can trigger a sound file being activated, how about also having the ability to trigger other files. Dungeon builders can have graphics or animations come up at key places. Picking up an important object, opening a main door, etc - or new endings for each dungeon, which has always been the drawback of DMuting DM/
Was unable to (permenantly) kill off ian_scho (Haynuus), Ameena, oh_brother (Westian), money (Falkor), raixel (Petal) and Lord_Bones (Aurek) in the DM D&D game Time's Champions!
CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
CONGRATULATIONS TO THOSE WHO MADE THE GAME WHAT IT WAS - GREAT!
Background music/sfx
Perhaps sounds could emanate from specific objects, like the running water of a fountain; with air vents, the footsteps of monsters in a different area could echo throughout a maze...
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Background music/sfx
Just been thinking about this again with the release of v0.16:
* Would it be possible to change SOUNDS so that they have a LOOPING parameter? For example, a designer might want one long sound effect to play when a door opens and for it NOT to loop. This would also benefit the ability to create AMBIENT sound effects...
* ... speaking of which, is this possible? I mean, is it possible to create an object that does nothing other than play an ambient sound (either controlled via triggers or as a permanent object). The difficulty at the moment is that all objects sound effects have a volume setting depending on how far away the player is. Generally, ambient sounds (such as wind) would want to play at a fixed volume so that it's heard consistently wherever you are. Obviously something like running water would need the a DISTANCE parameter. Perhaps you might consider adding this suport?
Something along these lines: SOUND_NEW_SFX_WIND mysound1.wav LOOP=(TRUE) DISTANCE=(5), where DISTANCE is the number of tiles away the effect can be heard (getting progressively quieter).
* Would it be possible to change SOUNDS so that they have a LOOPING parameter? For example, a designer might want one long sound effect to play when a door opens and for it NOT to loop. This would also benefit the ability to create AMBIENT sound effects...
* ... speaking of which, is this possible? I mean, is it possible to create an object that does nothing other than play an ambient sound (either controlled via triggers or as a permanent object). The difficulty at the moment is that all objects sound effects have a volume setting depending on how far away the player is. Generally, ambient sounds (such as wind) would want to play at a fixed volume so that it's heard consistently wherever you are. Obviously something like running water would need the a DISTANCE parameter. Perhaps you might consider adding this suport?
Something along these lines: SOUND_NEW_SFX_WIND mysound1.wav LOOP=(TRUE) DISTANCE=(5), where DISTANCE is the number of tiles away the effect can be heard (getting progressively quieter).
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Background music/sfx
Having messed around with various combinations of triggers and the like, it's not really possible to create sound effects and ambient sounds yet. I think that these would require a new trigger type, something like this:
FLOORITEM_SFX 2 2 2 ACTIVE SOUND=(MYSOUNDEFFECT) DISTANCE=(5)
These could be affected directly using other triggers, switching them from ACTIVE to INACTIVE to start and stop the sound. Perhaps a distance of -1 would mean the sound could be heard over the entire level. Couple this with my previous post and the dungeon designer will have loads of possibilities for creating ambience within the dungeon. This is the kind of the thing that will take RTC way above DMJava in terms of atmosphere and flexibility.
FLOORITEM_SFX 2 2 2 ACTIVE SOUND=(MYSOUNDEFFECT) DISTANCE=(5)
These could be affected directly using other triggers, switching them from ACTIVE to INACTIVE to start and stop the sound. Perhaps a distance of -1 would mean the sound could be heard over the entire level. Couple this with my previous post and the dungeon designer will have loads of possibilities for creating ambience within the dungeon. This is the kind of the thing that will take RTC way above DMJava in terms of atmosphere and flexibility.
You can sort of do this in DM Java so it sounds (haha pun not intended
) possible.
Also, the slightly quirky DM port on the SNES had both music and ambient sound effects. The music was pretty cool and added to the atmosphere, partially making up for it's horrendous graphics and easier dungeon layout. (I guess back in the day the developers responsible thought console owners a lot more stupid than Amiga and Atari owners...)

Also, the slightly quirky DM port on the SNES had both music and ambient sound effects. The music was pretty cool and added to the atmosphere, partially making up for it's horrendous graphics and easier dungeon layout. (I guess back in the day the developers responsible thought console owners a lot more stupid than Amiga and Atari owners...)
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
I've been experimenting a bit with using music and ambient sounds in the latest version of RTC using pressure pads that have the sounds applied as the 'trigger' sound.
Generally works well for short sounds and short musical 'stings'. But for longer stuff it's not really suitable as there's no way of selectively stopping a track that's already playing. And for ambient effects that requiring looping, it's a no-no.
I think these features would be fantastic:
1) A SFX trigger (as discussed at the top of the thread)
1) Ability to selectively stop a sound by it's name or some kind of internal ID
2) Ability to selectively faed in/out a sound by it's name or some kind of internal ID
3) Ability for RTC to respect sustaining loop meta data embedded in WAVs (so that the designer can make the wav loop and RTC doesn't need to do anything further with it) -- or if this is no good, to have a 'looping' parameter.
4) Ability to specify directional or non directional volume for a sound -- so that ambient loops would play at a fixed volume but static sounds such as a fountain trickling would get louder and quieter as the party move to and from the source.
As you're using DirectX for the sound layer, it should be pretty straightforward to add this kind of functionality in. I read up on some background info about DirectX sound and pretty much all the hardwork is done for you. You only need to call the relevant functions through the API.
I have some wonderful ideas for creating atmosphere in RTC scenarios but it's simply not possible at the moment. I realise that this is your personal project George and you're a very busy man, but it's incredibly disappointing to have had no discussion on this subject for FOUR years.
I have always wanted to produce a DM type game with much more atmosphere and ambience than was possible back in the day. Technology now allows me to do that, and I could use *any* engine out there to great effect - Source, Unreal, etc. But these FPS style engines, while stunning, don't have the feel of the old 'step' type games which is what I (and many others) still love about the genre. I could make the switch and put my energies into one of these engines and find some way of retaining the old-style gameplay. But I don't want to do that, I want to support RTC.
I have an inkling that one reason we don't hear from you about these possible new features is that you might be of the mind that you won't add anything new until we've proved that we can create something decent with the engine as it stands. That's a very fair point. It's just unfortunate that the decent things some of us want to produce really do require a few features that currently don't exist in RTC. A terrible Catch-22 that likely leaves both you and us frustrated.
Maybe that kebab might persuade you?
EDIT: I mocked up some editor screens to show how they might be implemented. I know this is the easy bit.
Maybe it will inspire you?




Generally works well for short sounds and short musical 'stings'. But for longer stuff it's not really suitable as there's no way of selectively stopping a track that's already playing. And for ambient effects that requiring looping, it's a no-no.
I think these features would be fantastic:
1) A SFX trigger (as discussed at the top of the thread)
1) Ability to selectively stop a sound by it's name or some kind of internal ID
2) Ability to selectively faed in/out a sound by it's name or some kind of internal ID
3) Ability for RTC to respect sustaining loop meta data embedded in WAVs (so that the designer can make the wav loop and RTC doesn't need to do anything further with it) -- or if this is no good, to have a 'looping' parameter.
4) Ability to specify directional or non directional volume for a sound -- so that ambient loops would play at a fixed volume but static sounds such as a fountain trickling would get louder and quieter as the party move to and from the source.
As you're using DirectX for the sound layer, it should be pretty straightforward to add this kind of functionality in. I read up on some background info about DirectX sound and pretty much all the hardwork is done for you. You only need to call the relevant functions through the API.
I have some wonderful ideas for creating atmosphere in RTC scenarios but it's simply not possible at the moment. I realise that this is your personal project George and you're a very busy man, but it's incredibly disappointing to have had no discussion on this subject for FOUR years.
I have always wanted to produce a DM type game with much more atmosphere and ambience than was possible back in the day. Technology now allows me to do that, and I could use *any* engine out there to great effect - Source, Unreal, etc. But these FPS style engines, while stunning, don't have the feel of the old 'step' type games which is what I (and many others) still love about the genre. I could make the switch and put my energies into one of these engines and find some way of retaining the old-style gameplay. But I don't want to do that, I want to support RTC.
I have an inkling that one reason we don't hear from you about these possible new features is that you might be of the mind that you won't add anything new until we've proved that we can create something decent with the engine as it stands. That's a very fair point. It's just unfortunate that the decent things some of us want to produce really do require a few features that currently don't exist in RTC. A terrible Catch-22 that likely leaves both you and us frustrated.
Maybe that kebab might persuade you?

EDIT: I mocked up some editor screens to show how they might be implemented. I know this is the easy bit.





- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Taking your screen shots in order...
1) Directional-ness - no
2) Volume distance - no; change the vlolume of the source file instead!
FYI - volume in RTC is a function of both absolute distance but then also modified by walls / doors that are in the way etc. Changing the volume by any more parameters starts getting very messy!
3) Looping - should be OK (presuming there's a suitable DX API)
4) Stop / start controls - fine.
5) Fade - possibly (again depending on DX APIs)
Note that all of this would require a substantial re-write of all the sound code in RTC. In particular it would need to keep track of what is playing, volumes etc (at the moment it just hits play and forgets about it). For example, it has to cope with the party walking over a fade in pad then saving. When you re-load, it has to then find the right place in the WAV file, set the right volume and keep playing. It might all seem trivial but under the covers it's a big ugly mess!
So to answer your direct question (!), a) yes, it's all do-able, it's just a question of its complexity and the time available. b) some of it probably yes. First up would be the ambient and fixed point sounds (with optional looping) together with a stop pad. Anything else would be at a much lower priority...
1) Directional-ness - no
2) Volume distance - no; change the vlolume of the source file instead!
FYI - volume in RTC is a function of both absolute distance but then also modified by walls / doors that are in the way etc. Changing the volume by any more parameters starts getting very messy!
3) Looping - should be OK (presuming there's a suitable DX API)
4) Stop / start controls - fine.
5) Fade - possibly (again depending on DX APIs)
Note that all of this would require a substantial re-write of all the sound code in RTC. In particular it would need to keep track of what is playing, volumes etc (at the moment it just hits play and forgets about it). For example, it has to cope with the party walking over a fade in pad then saving. When you re-load, it has to then find the right place in the WAV file, set the right volume and keep playing. It might all seem trivial but under the covers it's a big ugly mess!
So to answer your direct question (!), a) yes, it's all do-able, it's just a question of its complexity and the time available. b) some of it probably yes. First up would be the ambient and fixed point sounds (with optional looping) together with a stop pad. Anything else would be at a much lower priority...
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
So spot effects such as a fountain trickling in the center of a room can't be done? This seems to contradict your very last point. ("First up would be the ambient and fixed point sounds"). If a sound has a fixed point in the dungeon, by extension, it *must* be directional. If you step right of it, the sound would come from the left speaker, etc.1) Directional-ness - no
Perhaps I need to explain better what I meant:
Directional: sound comes froma fixed point and as the party move towards/away from it, it gets louded/softer (like a fountain)
Non-directional: Sound can be heard throughout the level at the same continuous volume (like a low wind loop)
I think that's overkill -- just remembering what was playing and starting it again from the beginning would be more than fine.When you re-load, it has to then find the right place in the WAV file, set the right volume and keep playing
I'd be pretty happy with that!First up would be the ambient and fixed point sounds (with optional looping) together with a stop pad.

I had another thought. Maybe there should be some way of distinguishing sounds that are ambient and sounds that are music? And then giving some sort of sound control to the user so that if they turn off music, atmopsheric ambience will still play?
How many kebabs do you want?
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Ahhhhh....I thought you meant by directional something like a sound can only be heard from the West of it etc - i.e. the sound is being directed in one direction....i.e. directional.Quote:
1) Directional-ness - no
So spot effects such as a fountain trickling in the center of a room can't be done? This seems to contradict your very last point. ("First up would be the ambient and fixed point sounds"). If a sound has a fixed point in the dungeon, by extension, it *must* be directional. If you step right of it, the sound would come from the left speaker, etc.
Perhaps I need to explain better what I meant:
Directional: sound comes froma fixed point and as the party move towards/away from it, it gets louded/softer (like a fountain)
Non-directional: Sound can be heard throughout the level at the same continuous volume (like a low wind loop)
All sounds are already processed in surround sound (so a sound coming from the back left of your party will play out out the back left speaker louder than the others - if you've got that kind of kit in your computer) so a fountain playing louder / softer / left /right you'll get for free once there's code to specify the sound at all.
Interesting - could be a config option I suppose. Mind you I can't really think why someone would want one sort of background noise and not another.I had another thought. Maybe there should be some way of distinguishing sounds that are ambient and sounds that are music? And then giving some sort of sound control to the user so that if they turn off music, atmopsheric ambience will still play?
Depends on how many pints precede itHow many kebabs do you want?

- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Funny how it should have been that obvious! Apologies.Ahhhhh....I thought you meant by directional something like a sound can only be heard from the West of it etc - i.e. the sound is being directed in one direction....i.e. directional.
Most modern games have a soundtrack that you can disable if you don't like it, but atmospheric ambience will be unaffected. I can imagine that some would want to switch music off.Interesting - could be a config option I suppose. Mind you I can't really think why someone would want one sort of background noise and not another.
As for pints, these days probably 3. Ten years ago it would have been 8 or 9....
- DragonsLover
- Craftsman
- Posts: 110
- Joined: Sat Jun 14, 2003 12:37 am