Do most javascript games avoid sound?

beavoid used Ask the Experts™
if I make a Javascript game, most I see on my phone don't do sound.
Is that the norm? Avoiding sound? I couldn't see .wav or .mp3 in their code
One time ago my dad had game swirling sounds playing loud from his laptop, and the cats became very upset.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Analyst developer
Hi beavoid,

Yes we can play sound in javascript:

<script src="sounds.js" type="text/javascript"></script>

Open in new window

Then edit the sounds object to add your sounds...
"dead" : {
  url : "sounds/dead.wav"
"ping" : {
  url : "sounds/ping.mp3",
  volume : .5

Open in new window

More info in this page.
Brandon LyonWeb Developer/Designer

Games are often built with limited development resources. Adding sound is another layer of complexity. Sound can definitely improve a game but it might get left out unless it is core functionality.

Games are often built for a target audience. On a mobile device this means that if you download sound you'll be spending extra bandwidth on something that you're probably playing in a public setting with the sound off.

That said there are many libraries out there which help to simplify working with audio in javascript, such as
beavoidSelf Employed



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial