Suggestion: Platform-neutral interpreted "native" code simulator builds

Games with C/native code are a pain to share for simulators. They only work on simulators running on the same architecture/platform as the machine they were built on. Issues like code signing can also pop up.

What if instead of building simulator versions of native libraries tied to your computer’s architecture, the libraries built to a platform-neutral byte code, like WebAssembly, for which the simulator would have a built-in interpreter. Since our dev computers are so much faster than Playdate, the simulator would still probably interpret “native” code faster than the Playdate could run its truly native version (which would still exist. The byte-code interpreted “native” code would only be used by simulators. Playdate would still use its true native build).

This suggestion would allow users of simulators on any platform to run any game that uses “native” code.

I don’t think I’m in a knowledgable enough position to strongly endorse a particular solution, but I mentioned WebAssembly because (1) LLVM can compile C code to it, and (2) there’s multiple ready-to-embed interpreters already available. But there could be better solutions.

2 Likes

Lua bytecode maybe? :stuck_out_tongue_winking_eye:

1 Like