Skip to content

Instantly share code, notes, and snippets.

@casaval
Forked from jacopocolo/guide.md
Created December 17, 2020 18:10
Show Gist options
  • Save casaval/901b76020de1079ad30c185c3c06693a to your computer and use it in GitHub Desktop.
Save casaval/901b76020de1079ad30c185c3c06693a to your computer and use it in GitHub Desktop.
Making a Bitsy game compatible with the Nintendo 3ds browser

The Nintendo 3ds browser is capable of running Bitsy games! And it's a delightful Bitsy machine.

To make games compatible, we just need to teach the 3ds browser to speak the language Bitsy is written in: modern Javascript!

To do that we need two things:

  1. The html page that contains your game
  2. A <script> </script> html element we'll add at the top of the page that translates modern Javascript to somewhat Javascript.

The whole script element is here. Just select the whole thing and copy.

Then open your Bitsy html with either Notepad or a code editor like Atom and paste the code above the line that says <script type="text/bitsyGameData" id="exportedGameData">.

That's it! Save and publish your game as before. The Nintendo 3ds browser should be able to play it, even from itch.io.

(Credit where credit is due: these are all polyfill functions I found already made online. The assign and includes polyfill are from developer.mozilla.org, the map polyfill is by Eric Wendelin.)

@WebReflection
Copy link

gosh there's some very old polyfill of mine going on in here 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment