Play MakeCode Arcade Game In App

How to make a MakeCode project an emulator which works like an app(exe)

1 Like

I don’t think you can @Pixiloom, you can only save the game on the arcade website, to your Microsoft account, or as a png which can be dragged and dropped into the editor to instantly load all of your code.

Opening arcade files as apps would be fun though… maybe the MakeCode Team could review this?

Very interesting topic, @Pixiloom! I have been researching the same thing myself lately, without making any real progress.

But I have made some observations that I would like to share here as an attempt to answer your question(and maybe others could help us further?), where I understand “app” as a broader definition of a “one-click solution to launch a MakeCode Arcade(MCA) game/program on the desired system/platform”, even though you specifically mention exe(Windows executable) in your question:

Executable:

  • Windows executable: Though I still have not found out how to compile a simple native Win32-type executable, the open GitHub pxt source code is full of references to WinRT, UWP etc. I am not sure whether the functionality is restricted on makecode.com and if it might be possible with a local instance of the pxt server running, or if I just have not found the right “magic” URL flags yet.
  • Linux executable(at least for ARM/RPi, haven’t tried x86/x64 yet): However, a solution for compiling and running a standalone executable for Linux, is already there:
    https://github.com/Vegz78/McAirpos
  • UWP app: There’s also an interesting GitHub project by @eanders for running MCA games as an UWP app: https://github.com/eanders-ms/arcade-uwp-demo.
    I managed to compile and run this from Visual Studio, but I get an access violation referencing the provided pxt.dll when I try to swap the included “castle-crawler” game with any other game(compiled with as experimental VM pxt64 file). I am not sure yet if there are other variations possible of the pxt64 files to compile to than the VM, if there are version differences or what is preventing this from working. It is also a very impractical solution, since every appx deployment has a size of 10-100MB for each MCA game file of 150-500kb, and the produced exe file in this project does not execute standalone with Windows standard shared libraries.

VM
There is a VM solution included(but deprecated?) in MCA, which @mmoskal describes as:

But the wheres, whats and hows regarding the VM simulator(a standalone app somewhere?), to actually run the pxt64 bytecode on Windows, MacOS and Linux is still unclear to me, and - as mentioned above - I am not sure how it is connected to @eanders’s project and whether they also could be compiled as standalone native Windows executables?

Web links
As a final suggestion for achieving a one-click solution, could be a collection of Web-links to the shared full screen playable web links of online MCA games, which would open be played in Microsoft’s web simulator inside your preferred or a minimal (kiosk) browser from the desktop, a folder, RetroPie/-Cake etc.

Supported hardware
Just for completeness, I will mention the standard and well-known uf2 boot image solution for loading and playing MCA games on various supported (handlheld microcontroller) devices.

Any new information about and solutions to this(especially the standalone Windows executables and a VM solution not requiring 100MB of UWP for each game) is very helpful and greatly appreciated!

You can just turn the website (share the game) into an app with this website.

https://appmaker.xyz/web2desk

1 Like

Hmm yes but still it would be unsupported after you make it an app since it won’t be the official app, meaning that you’ll be stuck with the same glitches that the current version of MakeCode Arcade has.

Also if you were going to say just redownload it every time there’s a patch, think about the pain your computer has to go through to download something like Office apps, and multiply that by 10, that’s the torture you’re putting the computer through. (Jk do whatever you want with your computer lol)

For anyone skilled enough to contribute and inclined to share, or just curious or interested enough to learn more about the pxt build system and figure out how to make MakeCode Arcade games run as (experimental and as of yet unsupported)standalone apps/native executables on Windows, Mac and Linux etc., there is an ongoing GitHub issue about this in @eanders’ explorative UWP repo here:

As I understand it, this should definitely be possible, with such native and VM build targets already envisioned at some time and included in MakeCode/pxt, but with “a couple regressions” today that should be possible to fix.

For me, this looks a little like the perfect community project, befitting MakeCode’s open source, its mission statement* and its friendly and knowledge thirsty users, where everyone can be creative and have fun together while learning from, and finding and developing new use cases for technology. -Maybe MakeCode Arcade even carries a little bit of the spirit of will it run Doom? :wink:

Looking forward to seeing the first MakeCode Arcade game playable on a bread toaster!!!

*“Microsoft MakeCode is a free, open source platform for creating engaging computer science learning experiences that support a progression path into real-world programming.

1 Like

Since there was no online multiplayer support, the MakeCode Arcade kiosk solution under development is probably a subject more befitting to this thread about playing MCA games in/as app.

Maybe, as @personalnote is on to, that this could be bundled/framed/compiled/packaged somehow to run as a cross platform and offline app/PWA, and a possible solution alternative to what @Pixiloom is searching for?:

By the way: Anyone who lately has gained any experience or new knowledge about the mysterious experimental/beta VM option in the hardware selection menu in the editor?

With reference to this, just recently about some developments on Kiosk Mode, but now back a bit more on topic here:
https://forum.makecode.com/t/cabinet-with-raspberry-pi-ran-out-of-disk-space/16221/9

Just checked out https://arcade.makecode.com/kiosk, and it looks good, and seemingly multiplayer capable as well.

But how would one go about making for instance a school arcade project with student’s games on some minimum capable and low powered hardware/pad, with for instance the shoebox controller, but not with the official shared makecode.com site and preloaded games or others’ uploaded games in the mix(and maybe no stable internet)?

The idea is that you put the RPI in kiosk mode and have it load this webpage fullscreen. This page accepts gamepad input, so you can build a cabinet using gamepads or an arcade button kit with gamepad support. You can add new games using a phone and the button in the top right.

Is the idea only to run this official site, or also to run a local kiosk server on the device or another connected device. Is it(will it be) also a self-contained (boot)image or app that one can download? How to isolate it from the default game/other users(log in/user profiles/session cookies?)? How to configure it; the menus, artwork, school logo etc.? Does it have to be a mega Chrome-based browser, or would lighter/minimal browsers work?

I understand it is cool with many new opportunities, and enabling the use of new devices and OS’es, but then, as I almost imagined a use case “as/like an app” or a project, it eluded me… Sorry for being slow here.

Anyone have examples of it in use that they would like to share for inspiration?