Skip to content

Instantly share code, notes, and snippets.

@jacopocolo
Last active January 13, 2024 23:30
Show Gist options
  • Save jacopocolo/7dc3a33aea1a8eb6f190330d6540addb to your computer and use it in GitHub Desktop.
Save jacopocolo/7dc3a33aea1a8eb6f190330d6540addb 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.)

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