Has anyone tried compiling Solarus for the web?

Started by alexgleason, November 02, 2018, 09:16:31 PM

Previous topic - Next topic
There are C++ to ES6 transpilers that seem to work reasonably well, like Emscripten: http://kripken.github.io/emscripten-site/

For example, you can see the open source game FreeDink running in the browser: https://play.freedink.org/ This game is written in C++ and ported to the web with Ecmascripten.

I think Solarus would have to be modified for this to work since it reads the filesystem to load the quest and write save data, but it might be possible.
RIP Aaron Swartz

Hello AlexGleason,

I looked at emscripten a lot of time and finally choosed to do the android port first.

The difficulty is the fairly high amount of solarus dependencies that need to be met. The second problem is that solarus uses some secondary threads to do some work like music playback and background loading. And emscripten does not support multithreading well... (nor does EScript).

I'm also really looking forward to it but it's not as simple as CXX=emscripten make. But there huge probability that this will be done next year or in few months... When I or another team member finds the time.

Greg