Mozilla recently put Doom on JavaScript and HTML 5. The demo is playable from Safari or Firefox and if our initial tests have encountered some problems, it's still a great achievement by the developers according to the explanations posted on the publisher's website, used the Mozilla source code the demo of Doom released by id Software.
He first used to go Clang C source code to a bitcode LLVM. He then turned to Emscripten, LLVM compiler to JavaScript. The code was then optimized with closure-compiler. Doom is rendered using the SDL API, which is a multimedia library implemented in JavaScript by Emscripten. It offers access to audio, mouse and graphics chip with OpenGL.
The video was posted using the HTML5 element "canvas." Mozilla also stresses that the lack of a universal API for sound forced him to use the Mozilla API Audio Data. This could explain why there is no sound when the demo runs on Safari. Firefox 4.0.1 for Mac OS X, things are unfortunately not much better.
The sound was choppy and very unpleasant. Overall, the demo and the backup system worked well and we shot at 25 frames per second. There are still some bugs. In addition to the disappearance of textures during the game, the mouse has never been recognized and many keys were inactive. The game refused to run on Chrome.
Mozilla recognizes that there is a problem with the V8 engine. The demo would also be very slow on Opera, according to the publisher. For the record, Google had made a similar demo last year. He ported Quake 2 in JavaScript and HTML 5. His plan had the merit of being more impressive by its scale and size of the game window Nevertheless, in both cases, especially appreciates the work of developers who show what can be done with JavaScript and HTML 5.
He first used to go Clang C source code to a bitcode LLVM. He then turned to Emscripten, LLVM compiler to JavaScript. The code was then optimized with closure-compiler. Doom is rendered using the SDL API, which is a multimedia library implemented in JavaScript by Emscripten. It offers access to audio, mouse and graphics chip with OpenGL.
The video was posted using the HTML5 element "canvas." Mozilla also stresses that the lack of a universal API for sound forced him to use the Mozilla API Audio Data. This could explain why there is no sound when the demo runs on Safari. Firefox 4.0.1 for Mac OS X, things are unfortunately not much better.
The sound was choppy and very unpleasant. Overall, the demo and the backup system worked well and we shot at 25 frames per second. There are still some bugs. In addition to the disappearance of textures during the game, the mouse has never been recognized and many keys were inactive. The game refused to run on Chrome.
Mozilla recognizes that there is a problem with the V8 engine. The demo would also be very slow on Opera, according to the publisher. For the record, Google had made a similar demo last year. He ported Quake 2 in JavaScript and HTML 5. His plan had the merit of being more impressive by its scale and size of the game window Nevertheless, in both cases, especially appreciates the work of developers who show what can be done with JavaScript and HTML 5.
- DOOM Ported to JavaScript and HTML5 (01/06/2011)
- The original DOOM ported to your browser with HTML5 & JavaScript (01/06/2011)
- FunctionSource: From (amb) to amb(): Solving Problems In JavaScript (01/06/2011)
- JavaScript Gets Visual With Waterbear (05/05/2011)
- Doom Ported To the Web (31/05/2011)
JavaScript (wikipedia)  HTML5 (wikipedia)  
No comments:
Post a Comment