Dungeon Dilettante
Posts: 3
Joined: Friday, 17th February 2017, 16:52
Enhancements to the sound system which I want to add
I feel like sound in a game like DCSS is really promising, because audio cues really speed things up. I don't have to scan carefully through the text log to know that I've just been hit. I also immediately know if I miscast a spell, or if my enemy (or I) resisted/dodged something. And then even small interactions (like the footsteps using stairs or the "Ka-ching!" for buying items) feel really nice and help bring the game alive.
However, this system still leaves much to be desired. Here are some of my issues with it:
- It's difficult to enable. Currently, if you want sound support in a text-based environment, you have to edit sound.h. I haven't tested it for a long time, but I think the sound system doesn't even work right when using Tiles.This is not good user experience.
- It largely depends on regular expressions. This is beyond terrible! For one thing, it's almost impossible to tailor sounds to certain things, like dodging attacks, because there are so many possible dodge-text strings. (Do you barely miss? Did you hit but do no damage? Do you resist? Barely resist? Easily resist?) This also sucks because this system falls apart if you try translating DCSS.*
- It crunches sounds all the time! It just sounds wrong to have this 3 or 4 sounds play all at the same time. It's messy, unpolished, and even dangerous. (If enough sounds play at once, they could combine and produce something far louder than originally intended.)
- It buries important sounds. If some powerful foe is trying to slaughter me, I care a lot more about her actions than the actions of a few lowly orcs. Thus, if she does anything major like cast a spell or attack me, I'd like to hear it! The orcs don't matter in this scenario.
- It limits sounds to being short ones. This one is a little weird, but we as players dictate the speed of the game. We might make several moves in one second, or several minutes to make a single move. This makes it really hard to set up any kind of fanfare or draw attention to any one event, like joining a religion, picking up a rune, leveling up, or putting on a cursed item. Sounds usually have to be short clips to avoid them spilling into many turns.**
- Lastly, it can be downright annoying. I have to be careful about where I put my sounds. I initially had a sound play when the user begins casting a spell. At times, it felt really good because it was a sort of a wind-up effect. However, it also gets really grating when you're casting your 30th Magic Dart, so I turned this sound off.
** There are times I can get around this. For example, when I get a level up, I tend to read it to see what leveled up. Thus, this gives my little fanfare audio-clip enough time to play. Of course, not all people may be like this.
But I'm more than happy to fix these issues! (Just...not right now. I'm actually really really busy atm. This is something I'll do much later. Maybe during the summer?)
I have a few ideas, but I want to know what others think about them.
- Simplify the compilation process. It shouldn't necessary to edit sound.h when compiling without tiles. If SDL can work in the text-based mode (I assume it can), then the text-based mode should use it! The external command should be a plan B for those who cannot/do not want to use SDL or whatever library we go with.
- Make more specific sound triggers. I don't want to go overboard with this, because it means adding function calls to basically every part of the game. However, the regular expression system is really bad.
- Use a sound 'buffer'. I'm using the term 'buffer' really loosely here. When a normal sound is going to play, it should get put into this buffer of sorts. Only one sound can be in the buffer at a time. Whenever control passes back to the player (i.e. the "--More--" prompt appears or all the text messages have been displayed), then the sound in the buffer gets played. This ensures that only one sound gets played a turn, instead of flooding the player with insignificant trash.
- Consider the importance of each sound. Sounds would be ranked in their importance. Mundane occurrences, like picking objects up, changing equipment, and getting attacked by weak monsters would get low rankings. Major things, like receiving nasty ailments, miscasting dangerous spells, or receiving divine punishments would get higher rankings. Since only one sound can be on the buffer at a time, this would be a way of deciding what sounds get priority.***
- Recognize "key sounds." "Key sounds" are those that denote really significant things, and the triggers are decided by the config files. If a key sound is about to be played but there is already something in the sound buffer, it would force a "--More--" prompt. When the user moves past the "--More--" prompt, then the key sound plays along with its associated message. The user cannot interrupt this, and entire sound plays out. Once the sound is done, the game continues as normal. This allows for longer fanfares. This could get annoying for some, so it's entirely up to the configuration being used.
- Provide options for variable sounds. I could achieve this by allowing a list of sounds to be provided. The game would pick one at random. This is a rudimentary solution, but it's easier to configure than allowing for random pitch/volume/speed shifting.
What are your opinions? Please, let me know! Do you have any suggestions or concerns? (Note that I'm not planning on making sound effects from scratch. I'm just going to test the system with my BindTheEarth sound configuration. I'm a coder, not a sound designer!)
EDIT: Fixed a couple typos.