Skip to main content

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

Bitsy Museum Hack 2.0

Hello! I'm new to Bitsy and was very interested in Odd Hour's Bitsy Museum Hack that allowed you to nest multiple bitsy files into one single bitsy index file (essentially making a hub world that allows you to travel to and play multiple different bitsy .html files. At the time of writing this post (April 2023) the hack unfortunately no longer worked with the latest version of Bitsy. I posted in the Bitsy Forums asking if anyone had attempted more recently to make it work, and Adam Ledoux was kind enough to reply with a solution that works with the current version of Bitsy. This is a tutorial I've put together for the Bitsy Museum Hack 2.0 based on Odd Hour's original tutorial and Adam's edits to that tutorial so it's all in one place! 

BITSY MUSEUM HACK 2.0

Step 1: Collect all the games you wish to showcase

  • Put the HTML files of all the games you wish to showcase in one folder.
  • You can rename the files for ease of use if you wish.

Step 2: Make the Museum

  • Make your Bitsy Museum base game. I recommend making this one room with a tile or sprite to interact with for each game you wish to showcase.
  • Add an ending for each game you want to showcase.
  • Make the ending text the filename you want to open (without the .html)

  • Download the game using the download tool and put the HTML file in the same folder as all your showcase games.
  • Rename it as "index.html"

Step 3: Hack it

In each of the showcased games, locate the following in the code (you can do this by right clicking the HTML files and opening in notepad on PC, then using edit>find) :

   // clean up state if the game is ending
    if (isGameOver) {
        bitsy.log("game over");
        reset_cur_game();
    }

And replace that block of code with this:

    /*     BITSY MUSEUM HACK:
           instead of reseting on ending it takes player back to the museum
           also removes need to click button to reset */
     if (isGameOver) {
         window.open("index.html", "_self");
     }


Then in the Museum (index.html), locate this code:

    if (end) {
        startEndingDialog(end);
    }

and replace it with this:

    if (end) {
        window.open(dialog[end.id].src + ".html", "_self");
    }

Step 4: PLAY!

That should be it! Now when you open your index.html file, the endings you places will open the corresponding bitsy files, and when you finish those games, it will take you back to the index.html file.

Support this post

Did you like this post? Tell us

In this post

Mentioned in this post

Open Bitsy files from within a Bitsy game - make a museum!
Run in browser