Convert your MakeCode Arcade games to Electron apps

I’ve created a script that makes it easier to convert your MakeCode Arcade games into standalone offline-capable Electron apps!

It results in a nice responsive window without visible controls and an icon that can be full-screened (F11) or can be dragged around and everything. Since the “packaging process” downloads the necessary simulator files, this game can be played offline! And since it’s Electron, you can compile it on all the platforms (Windows, macOS, Linux) to generate binaries for all of them! Also, data saved with the settings extension will save!

If you would like to convert your own games, follow the instructions in the repo README. It is still a quite involved process as you need to have Python, Node.js, and ImageMagick installed and also have a MakeCode Arcade game deployed to GitHub Pages. Command line knowledge is highly recommended.

Please let me know if you want any more features, any bugs for me to fix, etc!

15 Likes

Make it so you could make an electron app including various makecode games
like a library!

2 Likes

Seems like a good idea, I’d like to try this out later…

3 Likes

Really cool and great work, @UnsignedArduino!!!

With or without @RedSprite good idea to include multiple games in one app - or maybe even letting the electron app load other games somehow (simulator byte code or something) - how small of a file size could you theoretically compile such a single-game binary to, you think?

1 Like

Maybe you could convert it back to a script so you can make an actual library of games!

I do want to make a MakeCode Arcade Launcher, where you input a GitHub repo (ex. Unsigned Arduino/Racers) and it will automatically download the assets/js/binary.js file and the rest of the simulator files so you can play offline. I also plan on having a version and save file (settings extension, etc) manager.

2 Likes

Sounds awesome and I am looking forward to following the development!

If it can launch whichever game you want, the file size doesn’t matter as much as it would’ve if this was about compiling separate standalone games, either.

Cross-platform is also really great!

2 Likes

(just realized I forgot to reply to this)

I’m experimenting with Tauri which should definitely reduce file sizes (I believe by an order of magnitude) as it does not bundle an entire browser - it uses the OS’ browser engine instead to save file size. So your puny MakeCode Arcade game does not take up 270 MB.


Also, ImageMagick isn’t required anymore as a dependency, it uses Python’s pillow instead so it should be easier to use. :grin:

1 Like

I might be stupid but I’ve been trying to get this to work for me for almost an hour now and I can not figure this out.

I’ve followed the instructions as closely as possible and nothing ends up happening it might be because I’m used to watching someone show me how to do something because there are parts where i feel like i missed something.

I have a new tool that does this as well:

Try that instead. The README and examples should help.

3 Likes