A serious discussion about sound support


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Crypt Cleanser

Posts: 714

Joined: Saturday, 5th December 2015, 06:56

Post Friday, 14th October 2016, 04:58

A serious discussion about sound support

I think there is a lot of interest in this for crawl and a lot of potential to make the game a more immersive and fun experience. Playing certain mp3s on entering certain parts of the game, being able to associate .wavs with certain in game actions, i would be all over that. I'm sure the community could whip up an open sourced sound pack for the game, if the support structure for sound integration was there.

An option for this in webtiles would be even more awesome, and it looks like on Korean servers this already exists. I suspect at least one member of the dev team may already be working on this, but I just wanted a place for players to voice their support for it. In fact, I would totally be down to put some actual money on it if someone wants to make a kickstarter.

Does Anyone Else share my enthusiasm for sound in crawl? How can we make it happen?

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Friday, 14th October 2016, 05:38

Re: A serious discussion about sound support

Slime Squisher

Posts: 377

Joined: Thursday, 12th June 2014, 06:56

Post Friday, 14th October 2016, 05:42

Re: A serious discussion about sound support

Can't say I'm all that eager, but in particular two things to keep in mind:

1) This needs to be an option, and it needs to default to off. Few things are more annoying than unexpected audio. I keep my computer muted most of the time because so many news sites have adopted the plague of autoplaying videos with sound.

2) Be very careful of using stock (i.e. open-source) sounds. They're kind of like the Wilhelm screams of video games: so easily recognized that they break immersion instead of adding to it. Don't forget that many TV sound editors use them as well (I've definitely recognized sounds from Buffy in Morrowind, for example), and that many of these sounds have been around for decades, with many predating the digital age.

And one thing that would make me actually want an option for sound: Make it so that the game just plays sound files directly from the drive, as opposed to compiling them into a single file. That way, players could easily swap in files they like. I have no idea how easy this is from a technical standpoint, but being able to put in music from my own library would be a great plus. Also, if possible, it should support midis (a lot of the best video game music will be in that form).

For this message the author ion_frigate has received thanks:
dracos369

Crypt Cleanser

Posts: 714

Joined: Saturday, 5th December 2015, 06:56

Post Friday, 14th October 2016, 05:49

Re: A serious discussion about sound support

ion_frigate wrote:Can't say I'm all that eager, but in particular two things to keep in mind:

1) This needs to be an option, and it needs to default to off. Few things are more annoying than unexpected audio. I keep my computer muted most of the time because so many news sites have adopted the plague of autoplaying videos with sound.

2) Be very careful of using stock (i.e. open-source) sounds. They're kind of like the Wilhelm screams of video games: so easily recognized that they break immersion instead of adding to it. Don't forget that many TV sound editors use them as well (I've definitely recognized sounds from Buffy in Morrowind, for example), and that many of these sounds have been around for decades, with many predating the digital age.

And one thing that would make me actually want an option for sound: Make it so that the game just plays sound files directly from the drive, as opposed to compiling them into a single file. That way, players could easily swap in files they like. I have no idea how easy this is from a technical standpoint, but being able to put in music from my own library would be a great plus. Also, if possible, it should support midis (a lot of the best video game music will be in that form).


Agreed with all that, especially #3. One of my favorite games growing up was a 2d MMO, and it had many of its game data files just lying around in directories unarchived. You could swap in your own music and even icons/images and the game would use your custom files. Not sure if this is do-able for webtiles but it would be superb.

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Friday, 14th October 2016, 06:02

Re: A serious discussion about sound support

if you use anything other than MO3 for music i will be mad

Slime Squisher

Posts: 368

Joined: Thursday, 11th April 2013, 21:07

Post Friday, 14th October 2016, 11:24

Re: A serious discussion about sound support

If you compile with SOUND=y, Crawl nominally has sound support already. (For offline tiles builds, it explicitly initialises OGG and MP3 support through SDL_mixer, but it can also trivially load FLAC and MOD files.) There's an Lua function in the crawl lib to play a given sound file, crawl.playsound(filename), that you can pass ingame through Lua to play sound files (this of course also enables playing them at appropriate trigger moments through Lua scripting).

Looking at the code, sound support might not work out of the box for all build configurations: It should work fine for offline tiles, but to get sound working for console builds you may need to uncomment a system-specific line in AppHdr.h.


edit: As far as I can tell, nothing in the game currently calls crawl.playsound() by default, but if your game was compiled with SOUND=y, there is an rcfile option sound += pattern:filepath that you can use to play sounds when any given combat log message appears, with a pattern regex match similar to the force_more_message option.
https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt#L394

Scripting sounds to play independently of combat log messages, without editing the game's C++ code, would require hooking into Crawl's Lua somewhere and conditionally calling crawl.playsound(). Replacing your ready() function in your rcfile, to possibly play a sound at the beginning of each new turn similarly to how qw.rc uses ready(), would probably be the easiest way to accomplish this.

For this message the author Implojin has received thanks:
vergil

Tartarus Sorceror

Posts: 1694

Joined: Tuesday, 31st March 2015, 20:34

Post Friday, 14th October 2016, 15:28

Re: A serious discussion about sound support

lethediver wrote:Agreed with all that, especially #3. One of my favorite games growing up was a 2d MMO, and it had many of its game data files just lying around in directories unarchived. You could swap in your own music and even icons/images and the game would use your custom files. Not sure if this is do-able for webtiles but it would be superb.


Heh, are you talking about meridian 59? That game's still going on various servers you know.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 142 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.