BananaBread: 3D first person shooter game compiled to JS+WebGL
developer.mozilla.org
developer.mozilla.org
Another benefit is C++ compiled to JS tends to be faster than handwritten JS, because it avoid things like GC and property accesses and focuses on things JS engines can easily do fast, like typed array accesses.
Having played it, I must report back to say: this is stunning. It's wicked fast. Wow. Just wow.
Was playable in low-ress mode, though sometimes laggy, on my 2010 MacBook Air with Chrome.
Edit: The "troubleshooting" section on the page might help.
Edit2: If that doesn't help, try clearing the cache and reloading, I've seen that fix things on Chrome, not sure why.
Edit3: And specifically for Chrome, make sure pointer lock is enabled, it's disabled by default.
Edit4: I think I can reproduce this, once every few runs it stalls like that, because Chrome fails to decode audio sometimes. Reloading fixes it for me.
Debug build is up at http://dl.dropbox.com/u/80664946/index.html which tells you what is causing startup to fail in the error console.
It's not too surprising there are bugs here, this is one of the first examples of its kind on the web, and I'd expect issues in browsers and in the game itself. However it does work for me in multiple versions of Firefox and Chrome so I don't have a good guess as to what the problem could be in your case.
For a future version I'll try to put in more debug output, perhaps that will help.
Clicking into one of the text boxes (mouse sensitivity) and hitting backspace caused the browser to go back in my history. :(
I've seen the "go back" bug myself a few times. Not sure yet what causes it, I think I saw it with the middle mouse button on Linux primarily.
Maybe next time ;)
(However, we haven't implemented saving the config file for next run yet, so it will just be for that run.)