I went ahead and selected a nice game map called "de desertcomplex" from member "ded OK" with his permision and converted it from the original .bsp map format to a WebGL 3d webpage. It's not as simple as it sounds though, there is some "rotating" and "scale" adjusting to do to the main mesh, not to mention applying "alpha channel" transparency to a few of the textures. I did this just to demonstrate that it can be done. I only implemented the main mesh, none of the "entities" or packaged models are included from the original .bsp map, since they did not translate well through the two conversions. Anyway, before you check it out, please be aware that this is a large 3d scene for it to be WebGL, so after testing out both Firefox and Chrome web browsers, I noticed that you will get a much higher frame rate with Chrome than you will with Firefox. Well, here it is: [WebGL Game Map...](http://titodesign.net84.net/cstrike_de_desertcomplex/Desert_Complex.html)
Very interesting, we are doing a bit of work about integrating WebGL into the site for 3D model previews - I never thought about map previews as well.
Would people here be interested in in-browser previews on map submissions?
As a programmer, I recognize how cool this is. I'm also familiar enough with map formats to know Source's BSP isn't the normal BSP so props to you for reverse engineering it. Unless it's documented somewhere and I just don't know about that, but still, props.
I'm not a fan of this mouse control, though. And draw distances seem a bit shallow. Still, I'm impressed.
Although I'm also aware that Irrlicht has had web integration and BSP support for quite a while and I now wonder if you used that as your base.
I did not use Ambiera's Irrlicht tool, I used their other main tool, Coppercube. Coppercube is basically a WYSIWYG WebGL and Flash editor that non-programmers can use to output WebGL, Flash and stand alone .exe applications. Coppercube can import .bsp maps, but it seems only the Quake 3 level versions, not the ones from Valve. The way I did it, I opened a Counter Strike .bsp map with Crafty, which is a map viewer that can also convert the maps to a .obj format textured mesh. I then imported the .obj map model in to the Coppercube 3d editor, where I did a few adjustments to the mesh and added the fps camera. Once this was done, I published it as a WebGL HTML5 webpage. Coppercube can also import animated models and export playable fps games, all without writing a single line of code! For those of you really interested in all of this, I strongly recommend you check out Ambiera and thier Coppercube tool, and while you are there, check out their nifty WebGL demos.
> **Posted by Sally-2K**
> The fuck I must try this!
Then by all means, go for it! It's easier than you think. If a non-map maker like me can do it, then you can really do it. Now, I do some 3d modeling, but I use other programs, not hammer. By trade, I am a freelance commercial website developer.
> Gj! I like it.
I'm glad the original maker of this map likes it. Now, you mentioned before with Firefox you were only getting something like 15fps and like such it made it difficult to navigate. I strongly recommend if you can, switch to Google Chrome, it does a lot better job at rendering large WebGL scenes than Firefox. With Chrome, you will get almost twice the frames per second as you can get with Firefox.