Code Monkey home page Code Monkey logo

arcade-uwp-demo's People

Contributors

eanders-ms avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

arcade-uwp-demo's Issues

Launching MakeCode Arcade games as standalone app/executable

Hi Eric, and thanks for an interesting MakeCode Arcade(MCA) UWP project!

I get it to build and run for the included castle-crawler game. But unfortunately I am unable to swap out this game for other MCA games, even though I compile and download them as similar pxt64 VM files.

With reference to e.g. this forum thread, there might be quite a few people out there apart from yourself and I, that are interested in finding ways to run MCA games as standalone apps/executables.

From what I have read* and gathered from browsing the various pxt source codes and your projects, there seems to be at least 2 viable approaches to achieve this:

  1. VM: Like you have done here; to compile the MCA games to VM pxt64 files, which then somehow with a native SDL interpreter should be possible to run on Windows, MacOS and Linux desktops.
    (I understand that this approach should also be possible on ARM and other platforms, and your UWP-approach is of course interesting, as the game would also run on XBox. But I have still not figured out how to get this SDL VM interpreter to work, and if it's like the web simulator/uf2 boot image, with a menu where you could choose among various games, or if each game needs to be bundled with its own interpreter...)
  2. Native executables: Directly compile native x86_64 executables on Windows(WIn32 exe), MacOS(Mach-O) and Linux(elf).
    (Already solved for ARM/RPi Linux .elf, but I have not yet figured out how to do this on Windows, MacOS and Linux x86_64. But it should be possible, and maybe you know how?)

There might, of course, be other interesting approaches, like appifying online shared MCA games, integrate the online shared MCA games or downloaded .js of the games with WebView2, get the simulator to run locally etc.

However, the 2nd alternative might be the most straight forward and with the smallest storage footprint per game? In any case, both approaches are very interesting to explore further, with many different applications and use cases.

On a local pxt server, I have managed to compile the following:

  • binary.asm files with various contents(what looks like the IR(VM?) bytecode or ARM assembly, but I am unable to assemble)
  • binary.js, which I understand is the file type that the web simulator runs
  • binary.pxt64 which I understand is the VM bytecode
  • binary.uf2 for all the listed handheld MCU hardware
  • binary.elf for ARM/RPi native executable
  • A dockercross folder with what seems to be the C++ source code for pxt.dll(or the game with pxt.dll?), which I am unable to compile yet, but I suspect might be possible to compile somehow with multiarch crossbuild.

But I have not yet found a way to get pxt to output x86_64 executables for Windows, MacOS or Linux, nor a ready compiled pxt.dll.

Would you be interested to please help us make this black magic work, document the various approaches, and maybe find the documentation for win32 binaries etc.?

Sources:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.