Questions on putting sound on a web game

For discussions about game development that does not fit in any of the other topics.
Post Reply
Zyviel
Posts: 75
Joined: Tue Jun 08, 2010 8:12 pm

Questions on putting sound on a web game

Post by Zyviel »

I was looking at putting sound in a game that I am making but based on what I have read there seems to be differences between how to get browsers to use sound. I was wanting to have sound effects when an attack hits, misses, is blocked or parried.

Is there a css, html, or javascript commad that will play a wav file that works in most browsers? Thanks in advance for any help or advice anyone can give me about this.
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Questions on putting sound on a web game

Post by Chris »

You could use JavaScript to load a media player plug-in, but your best option would be to use flash.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Questions on putting sound on a web game

Post by Jackolantern »

You could also check out GameQuery, as it has a choice between severak sound APIs that are put together just for browser-based games.
The indelible lord of tl;dr
Post Reply

Return to “General Development”