Doom in a web page
Written by Alex Denham   
Wednesday, 01 June 2011

If you’re sitting waiting for a really, really slow compile to finish, how about a quick game of DOOM to keep you occupied? Or how about using a compiler that converts C++ to JavaScript?

Alon Zakai of the Mozilla mobile team has 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 is intended to simplify the conversion of applications into web apps. You start with code in languages such as C++, convert it to LLVM bytecode, then Emscripten compiles it as JavaScript so it runs on the web. Video output is done by an HTML canvas element. You can check out Emscripten here https://github.com/kripken/emscripten:

 

DoomHTML

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

“Emscripten can probably compile most reasonable C/C++ codebases (albeit with some manual intervention in some cases). It is my hope that Emscripten can help against the tendency to write non-web applications, such as native mobile applications (for iOS, Android, etc.) or using plugins on the web (Flash, NaCl, etc.).“

His aim is to make the web a more attractive platform for developers, by letting them use their languages of choice, such as C, C++ or Python.

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

He also says

“Loading and saving games do work, but only until you leave the page. TODO: Use IndexedDB for persistent storage.”

 

Banner


Learn Cryptography Without The Math
09/07/2024

Are you sick of the math associated with cryptography?
You don't have to be any more. Applied Cryptography from the University of Tartu shows cryptography without the math! At last, a hands-o [ ... ]



Controlling 5,000 Autonomous Drones
21/07/2024

With the skies full of drones, how can drone collisions be avoided? Inspired by flocking models in nature, researchers in Hungary have come up with an algorithm to handle large volumes of autonom [ ... ]


More News

Last Updated ( Wednesday, 01 June 2011 )