Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

Rise from your grave, old thread!


So I was having the same issue and it led me to this thread. I got music to work but only if I opened the hacked .html file in my browser. If I try and run it through the Bitsy editor or Bitsy Savior, it doesn't play the music. Is that intentional?

Here are my hackOptions. I put the mp3 in the same directory as the hacked .html file.

var hackOptions = {
    // Put entries in this list for each audio file you want to use
    // the key will be the id needed to play it in dialog tags and the musicByRoom options below,
    // and the value will be the properties of the corresponding <audio> tag (e.g. src, loop, volume)
    // `src` can be either a string, or an array of strings (to support fallbacks in different formats)
    // Note: you can add <audio> tags to the html manually if you prefer
    audio: {
        // Note: the entries below are examples that should be removed and replaced with your own audio files
        'siltStrider': { src: './Silt Strider.mp3', loop: true },
        // 'example sfx ID': { src: './example sfx filepath.mp3', volume: 0.5 },
        // 'example with multiple formats': { src: ['./preferred.mp3', './fallback.ogg'] },
    },
    // Put entries in this list for every room ID or name that will change the music
    // If the player moves between rooms with the same audio ID, the music keeps playing seamlessly.
    // Undefined rooms will keep playing whatever music they were last playing
    musicByRoom: {
        // Note: the entries below are examples that should be removed and replaced with your own room -> audio id mappings
        0: 'siltStrider',
        1: 'S', // This room is silent - it will stop music when you enter (see `silenceId` below)
        2: 'another song ID',
        h: 'a song ID for a room with a non-numeric ID',
        'my room': 'a song ID for a room with a user-defined name',
    },
    silenceId: 'S', // Use this song ID to make a room fall silent.
    resume: false, // If true, songs will pause/resume on change; otherwise, they'll stop/play (doesn't affect sound effects)
};
OSZAR »