Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

bitsy

a little engine for little games, worlds, and stories 路 By adam le doux

Does Bitsy Muse work in editor?

A topic by Cosmonaut Collective created 28 days ago Views: 108 Replies: 5
Viewing posts 1 to 2
(1 edit)

I added Bitsy Muse to my project (I added it myself) and the track never plays in editor. Neither Bitsy Savior (any version) or Bitsy Web. Is this intentional?

However if I open the .html file in my browser, it will play the track no problem. The struggle here is when I'm playtesting my game the music doesn't play and it kind of defeats the purpose.

  • The .mp3 file is in the same folder as the hacked .html file
  • Used Borksy and Candle's tool but same thing: file only worked when opening in browser
  • I made sure I was patching any saves via Bitsy Savior

FWIW here is my hackOptions

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)
};

I believe none of the hacks work in the editor, including Bitsy Muse. It is intentional in the sense that the hacks are additions to Bitsy games, not additions to the editor. 

To playtest your game with the sound, you'll need to play it in your browser, which you can do! You said you were able to open the html in your browser, so you should be able to play it that way once opened. If you need to make changes due to finding bugs etc in your playtest, then you can go back to the editor, or edit your game file directly if you're comfortable doing so.

ah thx for the reply!

You said you were able to open the html in your browser, so you should be able to play it that way once opened. If you need to make changes due to finding bugs etc in your playtest, then you can go back to the editor, or edit your game file directly if you're comfortable doing so.

Just so I'm understanding correctly, the workflow should be:

  • Load the hacked .html in my browser
  • Make any changes I want in-editor (Bitsy Savior)
  • Save the .html (or in the case of Bitsy Savior - patch the file)
  • Then go back to my browser and reload the .html if I want to see changes I made alongside the hacks.

Is this accurate?

Yes, I believe that workflow should work, though if you are using an editor, you may have to re-apply the hacks in between edits. I know the standard bitsy editor will automatically remove any hack code upon load/save, but I'm not sure about bitsy savior as I don't use it. So you may have an extra step between your step 3 and 4 that is "re-add hacks to .html file."

Generally my workflow from start to finish is:

  • Create and edit the bulk of the game in the editor, making notes of what hacks I'm planning to use but not implementing them yet
  • Playtest the game in its current form in the editor until satisfied
  • Download the .html
  • Add hacks
  • Load the .html in browser and check that everything is working as expected
  • When there are errors or things to change, right click the .html file and open it in notepad, then edit from there.
  • Retest .html file in browser as necessary until game works the way I want

This allows me to skip having a "re-add hacks" step, but does mean monkeying around in the code a bit, so it depends on what you are comfortable with.

Lovely! Thanks for the workflow breakdown. I feel confident I can get something working here. Thanks for all the help 馃挏

No problem! Good luck with your game creating!