joelwross / wc_master

2 stars 4 forks source link

AUDIO #21

Open joelwross opened 12 years ago

joelwross commented 12 years ago

Causlings should make sounds so we have audio feedback.

Also maybe background music?

And probably controls to turn sound on and off...

dLobatog commented 12 years ago

I added a way to play a sound whenever a causling is doing a particular interaction. I tuned it so it works for both HTML5 capable browsers and not capable browsers. I tested it on an iPad (not capable html5) as it sounds like a suitable device to play this. I can't attend tomorrow's meeting due to a lab but let me know what kind of sounds do you want. Playing a sound every time a causling settles, etc, is what I've tested now but the problem is that it requires as many GET calls as causlings are in the game. Problem is, that's very time consuming, and might delay the application, and there's no way of caching audio streams with HTML5 as of now, I'm looking for a work around because that would solve a big problem. Anyway we might add some certain sounds for the demo just so they know something is going on.

joelwross commented 12 years ago

Hi Daniel,

Thanks so much! I'm not sure what sounds to use exactly, but if you could dig around for something we can use for free, that would be good. Or we can record something ourselves maybe. I'll check in with the group tomorrow.

On Tue, Apr 10, 2012 at 5:58 PM, Daniel Lobato Garca < reply@reply.github.com

wrote:

I added a way to play a sound whenever a causling is doing a particular interaction. I tuned it so it works for both HTML5 capable browsers and not capable browsers. I tested it on an iPad (not capable html5) as it sounds like a suitable device to play this. I can't attend tomorrow's meeting due to a lab but let me know what kind of sounds do you want. Playing a sound every time a causling settles, etc, is what I've tested now but the problem is that it requires as many GET calls as causlings are in the game. Problem is, that's very time consuming, and might delay the application, and there's no way of caching audio streams with HTML5 as of now, I'm looking for a work around because that would solve a big problem. Anyway we might add some certain sounds for the demo just so they know something is going on.


Reply to this email directly or view it on GitHub: https://github.com/highbulp/wc_master/issues/21#issuecomment-5060101

Joel Ross University of California, Irvine http://www.ics.uci.edu/~jwross/

dLobatog commented 12 years ago

Hey I have sounds for both when causlings get to the correct island and when they die. Problem is that there are too many causlings and this causes a huge delay, and neither Javascript or HTML5 provide anything good for concurrency. It will make like 200 noises at a time but the application will get stuck at some maps like expert=1 when there are too many causlings getting to an island on time. On top of that the way different browsers support this differs a lot. Should I upload the version I have right now?

joelwross commented 12 years ago

I wouldn't upload a non-working version at this point...

I expect that maybe one solution would be to only ever queue up a max of 3 sounds or something. So if some people arrive without chirping, that's fine, but we'd get some responses? Just a simple counter/lock system would probably do it I'd expect.

On Thu, Apr 12, 2012 at 8:34 PM, Daniel Lobato Garca < reply@reply.github.com

wrote:

Hey I have sounds for both when causlings get to the correct island and when they die. Problem is that there are too many causlings and this causes a huge delay, and neither Javascript or HTML5 provide anything good for concurrency. It will make like 200 noises at a time but the application will get stuck at some maps like expert=1 when there are too many causlings getting to an island on time. On top of that the way different browsers support this differs a lot. Should I upload the version I have right now?


Reply to this email directly or view it on GitHub: https://github.com/highbulp/wc_master/issues/21#issuecomment-5107896

Joel Ross University of California, Irvine http://www.ics.uci.edu/~jwross/

dLobatog commented 12 years ago

I already tried doing that, it doesnt work because with such a large number of causlings, some of them arrive to an island or die at the same time and there's no mechanism to prevent that. I tried setting a limit of 3 sounds at a time and it doesnt work for the same reason, several causlings will try to play a sound at the same time (at a certain particular moment when it is valid) and when that happens multiple times it gets the game stuck. It's just that HTML5 nor JS are designed to play multiple sounds asynchronously yet that is what we need.

I can limit the number of sounds and it would work but obviously we'd be missing out most of the sounds, maybe that's fine for tomorrows demo if you explain to them what's going on.

joelwross commented 12 years ago

Missing out on most the sounds is fine. I wouldn't expect everybody to make a sound (even if we could do it, 500 people chirping at once would be obnoxious)

If you can get that to do something sensical, I'd love to see it :)

On Thu, Apr 12, 2012 at 9:11 PM, Daniel Lobato Garca < reply@reply.github.com

wrote:

I already tried doing that, it doesnt work because with such a large number of causlings, some of them arrive to an island or die at the same time and there's no mechanism to prevent that. I tried setting a limit of 3 sounds at a time and it doesnt work for the same reason, several causlings will try to play a sound at the same time (at a certain particular moment when it is valid) and when that happens multiple times it gets the game stuck. It's just that HTML5 nor JS are designed to play multiple sounds asynchronously yet that is what we need.

I can limit the number of sounds and it would work but obviously we'd be missing out most of the sounds, maybe that's fine for tomorrows demo if you explain to them what's going on.


Reply to this email directly or view it on GitHub: https://github.com/highbulp/wc_master/issues/21#issuecomment-5108173

Joel Ross University of California, Irvine http://www.ics.uci.edu/~jwross/