openage icon indicating copy to clipboard operation
openage copied to clipboard

emscripten port

Open franciscod opened this issue 10 years ago • 14 comments

because why the hell no?

https://hacks.mozilla.org/2014/11/porting-to-emscripten/

franciscod avatar Nov 05 '14 05:11 franciscod

+1, I am very interested in seeing this happen, I think it would be awesome for the project. I've been looking into ASM.js since the Humble Mozilla Bundle, and actually just recently considered trying to port openage. It doesn't seem too difficult a task, even given my lack of familiarity with C++ and other compiled languages so I will try to give it a shot when I get some free time. Thank you for the provided link.

cydactyl avatar Nov 05 '14 07:11 cydactyl

:D

i don't know much about emscripten and asm.js but it seems really cool. The Humble Mozilla Bundle was a main inspiration, also i got the link from a website on which i ~~waste~~ spend a lot of time reading

franciscod avatar Nov 05 '14 07:11 franciscod

Huh... didn't even know that existed. However the "no threads" thing seems to be a blocker...

Threads are

  • used internally be SDL (which we may or may not need)
  • used by the job manager
  • more...

mic-e avatar Nov 05 '14 13:11 mic-e

pun intended? lol

franciscod avatar Nov 05 '14 13:11 franciscod

lol no

I guess a "no threads" mode could be added to the job manager, but then the game would hang every time a new sound/texture/whatever must be loaded.

mic-e avatar Nov 05 '14 13:11 mic-e

Apparently 'multi-threading' is possible by using html5 webworkers and high-level message passing API to pass work to individual CPU cores, it's just not how it's traditionally done in C/C++ multithreading in emscripten with html5. I will look into how it would need to be done with existing code, Hopefully I will have some time over the next couple of days.

cydactyl avatar Nov 05 '14 22:11 cydactyl

a PNaCL port would be cool as well, https://developer.chrome.com/native-client

cydactyl avatar Nov 05 '14 22:11 cydactyl

related to #54 somehow

franciscod avatar Nov 06 '14 02:11 franciscod

Emscripten + CMake!

https://github.com/kripken/emscripten/blob/master/cmake/Modules/Platform/Emscripten.cmake

franciscod avatar Feb 05 '15 03:02 franciscod

I doubt we will ever come to this :)

TheJJ avatar Feb 06 '17 23:02 TheJJ

do you already see EoL of the project?

Wandalen avatar Feb 07 '17 06:02 Wandalen

lol no. Then again, somebody might actually do this madness, why not.

TheJJ avatar Feb 07 '17 07:02 TheJJ

Just curious. Python is a problem, by the way. Translation isn't so straightforward process.

Wandalen avatar Feb 07 '17 15:02 Wandalen

Just run python in the browser (there are also other projects, like pyodide, pypyjs, rustpython, or older empythoned). Nowadays emscripten would also be replaced by WASM :)

The conversion step probably doesn't need to run in a browser.

MayeulC avatar Aug 25 '20 11:08 MayeulC