4 ms·
It's not really clear to me how graphics are being displayed. I assume they're not converting SDL/OpenGL to Javascript. Is there a Canvas library you can link,
by rcfox 15y ago
It's not really clear to me how graphics are being displayed. I assume they're not converting SDL/OpenGL to Javascript. Is there a Canvas library you can link, or something?
- georgemcbay 15y agoThe link that wahnfrieden posted talks about an SDL/JavaScript port, so presumably yes that's how they are doing it. OpenGL wouldn't be involved, though, Doom is old-school 2.5D raycasting to a simple framebuffer. Unfortunately in keeping with the recent theme of cool web demos not actually working for most web users, none of the browsers I tried even run the demo. Tried it on IE9, Chrome and Firefox (obviously Firefox is supported, but it seems like you need a bleeding edge Nightly version).
- azakai 15y ago> Tried it on IE9, Chrome and Firefox (obviously Firefox is supported, but it seems like you need a bleeding edge Nightly version). I tested on Firefox 4 and 7 and both worked, so there must be something else wrong. Are there any JS errors? Also, any idea why it doesn't work in IE9? I was hoping it would.
- georgemcbay 15y agoI've since manually updated to Firefox 4.0.1 and it is working now, not sure what the issue was previously, could have been a local config thing. On IE9 it reports: SCRIPT1028: Expected identifier, string or number index.html, line 7 character 7 SCRIPT438: Object doesn't support property or method 'indexOf' doom.cc.js, line 20 character 63 SCRIPT5007: The value of the property 'clearConsole' is null or undefined, not a Function object index.html, line 73 character 9
- azakai 15y agoThanks for the IE9 info!
- azakai 15y agoEmscripten implements SDL in JavaScript, rendering to a Canvas element. It supports both RGB and fixed palettes. There is also some experimental work to translate (a subset of) OpenGL to WebGL.
- rcfox 15y agoThat's pretty awesome then! I'll have to try it on some of my stuff.