Jump to content

webassembly


Jadson G Matos
 Share

Recommended Posts

Technically very hard to do as each players copy of the game computes independently the game state and most of those calculations use C++ not JavaScript which is browser friendly then there are differences of each browser's JavaScript engine.A further complication is each players game state must be the same otherwise we get synchronisation errors.

Enjoy the Choice :)    

Link to comment
Share on other sites

  • 2 weeks later...

I don't know the 0ad developers plans, but I think that some dependencies of 0ad would be very difficult to compile with emscripten.

For example, there should be a limitation in JIT generation from webassembly. This is a limitation for the Javascript engine of 0ad, Spidermonkey (https://stackoverflow.com/questions/53760444/is-it-possible-to-compile-javascript-enginelike-spidermonkey-and-run-on-webass). Even without that, making something as complicate as a modern JIT engine to run on an unsupported platform is extremely difficult (if possible at all..).

IMHO even getting rid of Spidermonkey to make 0ad run on webassembly/emscripten would require a too big effort. This would mean to rethink all the foundations of the 0ad engine (pyrogenesis). At this point, it might be even easier to rewrite all 0ad C++ codebase from scratch...

For comparison, just porting the JS engine  (so, most of the code was already written) from version 45 to version 78 took ~1 year 'only' to fix all the API changes.

Edited by Bellaz89
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...