Doom in a web page


If you’re waiting for a really slow build to finish, how about a little bit of DOOM to occupy you? Or how about using a compiler that converts C ++ to JavaScript?

Mozilla Mobile Team’s Alon Zakai ported DOOM to run in Firefox and Safari, and you can check it out here https://developer.mozilla.org/en-US/demos/detail/doom-on-the-web/:

Zakai is also the author of Emscripten, which aims to make it easy to convert apps to web apps. You start with code in languages ​​like C ++, convert it to LLVM bytecode, and then Emscripten compiles it to JavaScript to run on the web. Video output is performed by an HTML canvas element. You can consult Emscripten here https://github.com/kripken/emscripten:

On his blog (http://mozakai.blogspot.com) Zakai says that

“Emscripten can probably compile the most reasonable C / C ++ code bases (albeit with manual intervention in some cases). Hopefully Emscripten can help fight the tendency to write non-web apps, like native mobile apps (for iOS, Android, etc.) or use web-based plugins (Flash, NaCl, etc. ). “

Its goal is to make the web a more attractive platform for developers, allowing them to use the languages ​​of their choice, such as C, C ++ or Python.

Zakai’s release notes for DOOM state that it will work, slowly, on Opera, and extremely slow on Chrome due to the V8 947 issue.

He also says

“Loading and saving games works, but only until you exit the page. DO: Use IndexedDB for persistent storage. “

Banner


Comments are closed.