Author Topic: Has anyone tried compiling Solarus for the web?  (Read 3788 times)

0 Members and 1 Guest are viewing this topic.

alexgleason
  • Full Member
  • ***
  • Posts: 128
  • Vegan on a Desert Island
    • View Profile
    • Vegan on a Desert Island
Has anyone tried compiling Solarus for the web?
« on: November 02, 2018, 09:16:31 PM »
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

stdgregwar
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Has anyone tried compiling Solarus for the web?
« Reply #1 on: November 04, 2018, 09:41:42 AM »
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
Code: [Select]
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