Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Bitsy Game Maker

Make little games, worlds, and stories! · By Adam Le Doux

Adding a sound/music assets to a bitsy game

A topic by Tom Ciccone created Sep 29, 2017 Views: 5,777 Replies: 13
Viewing posts 1 to 7

Hey Guys, 

So I made this forum post because I would like to make a game in bitsy that uses some interesting sound design and music (even if its just a background loop), so Adam requested I start this topic so we can discuss how to do this in detail. If anyone else has some insights into how they do this, please feel free to post your comments below. Thanks!

Tom Casey


so for a background loop, you need to

  • make the game in Bitsy
  • download the HTML file
  • make a folder (name it after your game probably) and put the HTML file in it
  • rename the HTML file to "index.html"
  • get your sound file (let's say it's called "sound.wav") and put it in the same folder (this step is important so the HTML page knows where to look for the sound)
  • open "index.html" in a text editing program like Notepad (Windows) or TextEdit (Mac)
  • find the game canvas by searching for the following text: <canvas id='game'></canvas>
  • put a new line under the canvas and add: <audio src="sound.wav" autoplay loop display="none">
  • save it and open "index.html" in your browser
  • tada! you have a looping background sound!

to publish the game with this sound

  • take the folder you put the HTML file and the sound file in and turn it into a ZIP file (there should be a right-click option to do this)
  • upload the ZIP file to

there are a lot more complicated stuff you can do with sound in HTML but this is the easiest thing to start with. if you want to learn more about the <audio> tag, you can read an article like this one: or if you just google "html5 audio" you should find a bunch of resources.

admittedly, this isn't the most fun way to add sound, and I am hoping to add real music and audio support to Bitsy in the future so you don't have to do these hacks. if you have any suggestions on what you'd like to see in that area, please let me know!

in the meantime, I hope this helps you get started :)


Hey Adam,

I tried experimenting with some other functions for using audio within Bitsy.

One thing I was curious about was using the access key function (alt + x) to trigger different sound files within the game. I got inspiration from seeing this example used with hyperlinks:

<a href="" accesskey="h">HTML5

So...I tried using this within the game canvas id object:

<audio src="my_music_track1.wav" accesskey="c"> <audio src="my_music_track2.wav" accesskey="v">

However, this didn't seem to work. Neither did this:

<audio src="my_music_track1.wav" accesskey="c" audio src="my_music_track2.wav" accesskey="v">

This probably has to do with my lack of HTML5 knowledge, but I'm now skeptic that access key functions work with audio objects, since they don't seem to be listed here:

One thing I would like to ask: is there is a specific object that corresponds to different rooms within the game file. In other words, I'd like to experiment with trying to trigger different audio files based on the room you enter, since it appears that you can't trigger different audio files using the accesskey function (although, again, I may be just ignorant about this).

If you get a chance, could you let me know what object name is used to signify the rooms the player enters?

Thank you!

Tom Casey

Hey Adam,

Thank you so much for giving this detailed explanation. I managed to find some time to make a game. There's really not much to it, but I love making soundtracks, so that might give the game some charm:

I really appreciate the help (my HTML knowledge is abysmal!). I'm sorry I didn't have enough time to submit to your game jam, but I will be sure to make another game in the future. I always love having an excuse to make another soundtrack! By the way, I'm definitely going to post again on this thread if I come up with any new interesting ways to use <audio> tags in a bitsy game.

All the best

Tom Casey

@Tom Ciccone Wow, your game really pushes Bitsy to it's limits and it's only your first game! I liked the music too.

Hey Thanks man! I've since released another game

Thanks for the follow too. Really appreciate the support!

Tom Ciccone

hey sorry this took me so long to respond!

this turned out great! I love the music and I love the mysterious feeling of the train and its occupants :)

looking forward to future games/music you make!


I'm glad you enjoyed it!

I actually have another game on the way, it was supposed to be released for the "ruins" jam last month but my computer crashed, so I couldnt make another soundtrack for it. I'm definitely going to release it soon though. 

I had no idea you updated Bitsy by the way! I'm definitely going to check out the updates as soon as I get a chance. 


oh nice - can't wait to play it!


what do you mean line

I'm not sure if this post is too old, but after following what you guys are doing, the audio doesnt play? I'v named the file correctly in code + the file name. Any suggestions?

Yeah I have exactly the same problem, I did the same things that you mentionned (the only thing that I change was using a .mp3 instead of a .wav but I think it doesn't change anything) and there's no music playing... Can we get some help?


here's a tool to do this all for you:

bless you for this