3 ms·
Another interesting technical detail is that the nethack code contains a lot of synchronous stuff, which is generally hard to port to the web (where events must
by azakai 12y ago
Another interesting technical detail is that the nethack code contains a lot of synchronous stuff, which is generally hard to port to the web (where events must be short-lived). To get around that, the port uses Emscripten's emterpreter-async option to build (as you can see here: https://github.com/coolwanglu/BrowserHack/blob/master/build.sh#L25 https://github.com/coolwanglu/BrowserHack/blob/master/build.... ).
That runs the application in a little interpreter designed for Emscripten output; the interpeter is capable of pausing and resuming code, so synchronous code isn't a problem.
More details on emterpreter here: https://github.com/kripken/emscripten/wiki/Emterpreter https://github.com/kripken/emscripten/wiki/Emterpreter