Skip to main content

On Sale: GamesAssetsToolsTabletopComics
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

Having the ending link to another bitsy html file

A topic by YahliOnline created Nov 01, 2023 Views: 205 Replies: 1
Viewing posts 1 to 2

Hi! I'm making games in both bitsy and bitsy3d. I was wondering if there was a way to program it so that when you trigger the ending it would start up the next html file. Thanks!

If anyone is interested, I figured it out! Thanks to THIS tutorial from Marlowe Dobbe, ledoux, and the whoever made the Museum hack!

How to start a second bitsy game when another ends

Step 1: Put the html files in the same folder.

Step 2: Rename them something easy (I did index for the first game and page2 for the second game).

Step 3: Add an ending for the first game 

Step 4: In the ending dialogue for the first game, only place the text for your file name (without the “.html”)

Step 5: Download the game and open it up in an html editing tool (I’m using Visual Studio Code). Rename it “index.html”

Step 6: Find the following block:

    if (end) {

        startEndingDialog(end);

    }

And replace it with this:

    if (end) {

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

    }

There you go! Open you index file in your browser and it should work!