Page 1 of 1

Port to HTML5/JavaScript with Emscripten

PostPosted: Sun Apr 06, 2014 5:56 pm
by Skylab
I've been trying to port the game to HTML5/JavaScript but have been unsuccessful. I'm using Emscripten. It seems simple enough but I lack some skills to complete this. Is it possible? And if so, can we make it available? This might be a whole lot easier to bring on new people to the game if they don't have to download a single file.

Re: Port to HTML5/JavaScript with Emscripten

PostPosted: Mon Apr 07, 2014 12:27 am
by Skylab
Can't figure this out. Here's the latest in my attempt to compile this
http://pastebin.com/KeWJAFfY
Which occurs after I run ./emcc silencer/game.cpp

Re: Port to HTML5/JavaScript with Emscripten

PostPosted: Mon Apr 07, 2014 2:01 am
by admin
Hmm, I am not sure that this would be very easy to do at all. Actually this would probably be a pretty big project to try to get working on javascript. Also, I am not sure how fast it would be even if you get it all working. zsilencer does everything including the rendering on the cpu itself, which is probably 95% of the cpu time, and doing that in javascript would probably be very slow. I have seen some gameboy emulators in emscripten and even those run quite slow, and they don't have to deal with networking and all that either. This is a big task and I'm not familiar with emscripten so I would not be much help in this.

Re: Port to HTML5/JavaScript with Emscripten

PostPosted: Mon Apr 07, 2014 2:40 pm
by Skylab
Good point. I'll continue to experiment with this.

On the games that support Emscripten, there have been some major games on it including Quake3 (http://www.quakejs.com/). A recent announcement actually says Unreal Engine 3 has been ported to Emscripten. More information here https://github.com/kripken/emscripten/wiki .