## Details for the Doom on the Web demo

### Usage

- The demo works well on Firefox and Safari. Works, but slowly, on Opera. Extremely slow on Chrome due to V8 issue 947.
- Use the normal Doom keyboard controls: For the menu, arrow keys and enter; for the game, arrow keys, control, space and alt (hold to strafe).
- Use your browser's zoom to adjust the screen size (usually control + and control -).
- Loading and saving games do work, but only until you leave the page. TODO: Use IndexedDB for persistent storage.

### Technical details

- The Doom source code was compiled from C to JavaScript using Emscripten and Clang. Optimized using the Closure Compiler.
- Doom renders and handles input using the SDL API, which Emscripten implements in JavaScript.
- Video output is done by an HTML canvas element.
- Typed arrays are used for additional speed, if available in your browser.
- Uses only well-accepted web standards. The only exception is audio which is done using the Mozilla Audio Data API, as sadly there is no universal standard for a simple, usable audio API yet. (The demo will still run if the Audo Data API is not present, just without sound.)

### Additional notes

- Thank you to id Software for releasing the Doom source code under the GPL! Please go to their website and buy their stuff :)
- Complete source code for this demo is here.

Back to the demo