Audio for Webtiles


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

Dungeon Dilettante

Posts: 2

Joined: Sunday, 13th December 2015, 17:32

Post Sunday, 13th December 2015, 18:19

Audio for Webtiles

Apologies if this is in the wrong section

I've been playing Dungeon Crawl for a few years now and it didn't struck me until today that it would be awesome to have Sound effects/Music.

Apparently there is a way for your local crawl to have sound which blew my mind!
However, is there a way to get the sound to work on the online webtiles? I would prefer to play online, have the chat available and people to be able to spectate me while I can hear sound.

Is there a way to connect your Local crawl to the servers? If not...


Would it be an idea to implement this? For example, I would be willing to try and make a Chrome/Firefox extension that works the same way sounds work on your local crawl.

When it detects a line of text it will play a certain sound depending on what it says.

There could be a trigger on:"Welcome to WebTiles!" that downloads sound effects from an online server incase the player hasn't got the files yet.

Then it just plays the sounds downloaded, depending on what happens in the game.



What do you guys think?

For this message the author Beldrama has received thanks:
Cab

Ziggurat Zagger

Posts: 8786

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

Post Sunday, 13th December 2015, 20:40

Re: Audio for Webtiles

Connecting local Crawl to the servers opens up a huge can of worms as far as cheating. Let's say you somehow manage to perfectly prevent all forms of cheating via savescumming and memory editing etc. Then you still have to worry about players being able to see the state of the PRNG. That's not a hypothetical scenario, it actually happened once and Crawl had to completely change its PRNG as a result. I don't know how much the devs/server admins actually care about bogus games in their records, but it's something to consider.

If you just mean a local client for online games that doesn't actually run the game itself, then ignore that last paragraph. That client could be nice to have for a lot of things - players would ACTUALLY only download tiles once, and a lot of interface features would be easier to implement - but because it would be another program to maintain on top of Crawl and Webtiles themselves, I have my doubts that it would be worth it. IANAD, though.

Dungeon Dilettante

Posts: 2

Joined: Sunday, 13th December 2015, 17:32

Post Sunday, 13th December 2015, 21:17

Re: Audio for Webtiles

Thank you for the reply!

Ah, yes I understand why connecting with your local crawl could pose a threat for savescumming. Didn't think of that...

but what about an optional browser plugin that enables sound when playing webtiles on your browser? That the players can download, if they feel like going the extra mile to get optional sound?
It shouldn't be too difficult to make since it only responds to text, right?

"You hit the Quokka" - *Triggers a sound where you hit something*
"You have entered the sewers" - *Plays a short ambient dripping sound*
User avatar

Vestibule Violator

Posts: 1591

Joined: Saturday, 3rd August 2013, 18:59

Post Sunday, 13th December 2015, 21:56

Re: Audio for Webtiles

I've always liked the thought of crawl having music, but not so much sound effects. Music would be difficult, it would need to be something that wouldn't be repetitive. Fortunately, there are so many branches in crawl that the changes in music would probably make this less of an issue.

That being said, actually creating music for a game like this seems challenging.
To all new players: Ignore all strategy guides posted on the wiki, ask questions in the Advice forum, players with lots of posts normally have the best advice.

crawl.akrasiac.org:8080 <- take this link to play online or spectate.
User avatar

Zot Zealot

Posts: 982

Joined: Monday, 29th September 2014, 09:04

Post Sunday, 13th December 2015, 23:38

Re: Audio for Webtiles

Currently, there are no sounds in the crawl repository. There may be support for playing sounds locally but I don't think anyone actively uses it. Before asking for online sound support, I suggest you make sure offline sound support still exists/works, and then find some sounds.

re: lightweight online crawl client. It's not impossible. The reason you have to redownload all crawl tiles every time the build changes is an artifact of the sprite sheet storage of online tiles. With HTTP2 the use of sprite sheets is mostly irrelevant, and we could share tiles to the user in a smarter fashion (eg, some way that doesn't force a redownload when the crawl version changes). You could then distribute a crawl app that had 90% of the resources already downloaded.

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Sunday, 13th December 2015, 23:54

Re: Audio for Webtiles

Offline sound support doesn't still work. Neither I nor several other people have been able to get any sound out of Crawl -- on Linux, which AFAIK is what the sound system is designed around (it shells out to a sound player -- aplay IIRC -- to do the sound playing. Or at least, that is what it thinks it's doing; I have no idea what it is actually doing.)

In regards to tile redownloading: Can't we track the hashes of the tile sheets in question, and only redownload them when the hash on server differs from the hash of cached file?

Cab

Lair Larrikin

Posts: 17

Joined: Thursday, 4th August 2011, 17:53

Post Wednesday, 16th December 2015, 14:58

Re: Audio for Webtiles

I like the idea of sounds!

I've been playing around with JavaScript and the messages are accessible in the DOM by the id 'messages'. The browser extension could subscribe to keyboard events, and then check this element. There is, however, an issue that needs to be solved: AFAIK the DOM doesn't contain any indication of what message (or messages, up to 6 at a time) just appeared - the messages div will contain a certain number at all times, acting as a fixed-size message queue. We don't know how many lines will appear at a time, which complicates the problem.

The solution I can think of now is to have an internal message queue in the extension, and then when the next event occurs we basically take the difference between the newly arrived queue and the previously stored queue. The "basically take the difference" may be done by some sort of matching algorithm.

Any other ideas?

Crypt Cleanser

Posts: 714

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

Post Wednesday, 16th December 2015, 16:40

Re: Audio for Webtiles

Just chiming in that sound effects would be so damned cool. Have a folder with wavs and mp3s and let people swap in the music they like.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 121 guests

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