Time to consider again making Codea more cross-platform (e.g. possibly by compiling Codea to single file html/js/.wasm?)

Dear Codea Developers,

With all the great additional features being released in Codea updates, I was wondering if it would be reasonable to re-inquire about developing the capability for Codea to compile user projects to singe file html/js/wasm files (in addition to the current functionality of exporting project to Xcode)? Codea’s lack of cross-platform support is the only thing that holds me back from coding with Codea for 100% of my projects. Currently, I venture out into the Love2D and microStudio’s communities at times so can share projects/develop with non-iOS users. Single file html/js/wasm files seem currently the best cross-platform solution in that such files could be distributed to mobile and desktop users independent of OS. I mention html/js/wasm rather than html/js as I suspect (but don’t know) that would be easier to compile such an engine/IDE as Codea into .wasm and retain all of its feature then to try and convert Codea code to all html/js.

Will cc: @Steppers also for input as I know he has does some amazing things with html/js (and perhaps .wasm)?

Thanks! :blush:

4 Likes

Hey @SugarRay,
I too have had similar dreams of publishing Codea projects to the Web!

My main concerns at this point would be:

  1. Lua performance in WASM. In my limited testing I was not overlay impressed so some projects could have trouble here.
  2. Porting the Codea runtime to JS. Some of this could be simple, e.g. the shape rendering API but others would be trickier (Craft, though that’s just from a Codea user’s perspective)
  3. With Codea 4 moving to using the Metal API, we could potentially hit even more limitations with the web environment that simply cannot mimic the native APIs.

Having said that, I’m personally happy to take up the challenge. WebRepo 3.0 is moving towards a fully web based interface so enabling the preview of projects within the browser would be an awesome feature (in my opinion).

Cheers,
Steppers

Thanks for your input, @Steppers! :blush:

PS, for inspiration-- not a perfect port of Love2D to wasm but a good start (if hadn’t already seen)

1 Like

This is a great idea and we hope to make the new renderer open source

It does render to Metal in the backend, but it uses BGFX to do the abstraction, so in theory it should be able to be transplanted to other platforms

2 Likes

Thanks for considering this :blush:

I am delighted to see this suggestion. For users, it allows them to publish their projects to a wider range of platforms, and for developers, it has the potential to attract a larger user base. However, this may also lead to increased workload and technical challenges.

Here is another open-source 2D game engine, which is a project that has been ongoing for several years. It supports multiple platforms including Linux, Windows, macOS, Android, and iOS, and is compatible with many programming languages. It might be worth considering for reference.

Neat, thanks for sharing that, @binaryblues! :blush: