Games are not the only thing that NaCl can be used for, but they do demonstrate the impressive computational abilities of NaCl.
Native Client applications must adhere to strict rules to prevent escape from the sandbox. An application which does not follow these rules will never be loaded.
You can read more (including the research papers) at the Native Client Website
Native Client is still experimental technology, and may not work on all systems. If it doesn't work on your system, let me know. Please include your OS, version of Chrome, and processor type.
Frames Per Second. The original doom does not have this, but it was added for this demonstration. The original Doom is fixed at 35 fps, since the game physics is tied to the framerate.
The original version of Native Client was developed for Firefox using the NPAPI (Netscape Plugin Application Programming Interface) plugin interface. However, this legacy interface was found to be limiting. A new plugin interface was developed at Google, called Pepper API (PPAPI), to allow Native Client to reach its full potential.
Chrome has PPAPI support, but Mozilla has decided not to implement Pepper.
There are many different types of processors, each with its own type of native code. One of the defining features of the web is that one page (or app) works everywhere: on any browser, processor, or operating system. With native code applications, this can't be true.
Portable Native Client (PNaCl) is the answer to this problem. PNaCl is an extension of NaCl that allows LLVM bitcode to be used as the format for NaCl applications. Bitcode is an abstract form of machine code, which can be converted into the regular machine code of the target machine "on the fly". Thus, a single bitcode executable will run on any computer, any operating system, and (eventually) any browser.
If you are curious, here's the LLVM bitcode file (6MB) which encodes DOOM.
Those are the original 320 x 200 Doom graphics, scaled to fit the screen.
Doom is not really a 3D game, but actually a 2D game with perspective to appear 3D. Everything is software generated, there is no hardware acceleration. There are modern source ports of Doom with higher resolution graphics, but this project uses the original code.
Unfortunately, SDL doom has no support for music.
Of course. nacldoom build directory.
Warning: This is not a highly-polished. I made just enough changes to get everything to work. Be sure to read the README file.