otclient icon indicating copy to clipboard operation
otclient copied to clipboard

Port to Web Browser

Open davifo opened this issue 11 years ago • 5 comments

Using Google Native Client( NaCl ) or FlasCC. Someone else has interest in running client in the browser?

davifo avatar Jul 10 '14 13:07 davifo

This would be cool. Not sure who wants to try port it, but I'd help.

BenDol avatar Jul 10 '14 14:07 BenDol

I'm trying, though unsuccessfully, and also i can help! Not seem so hard, but still do not know design architecture and dependencies completely.

davifo avatar Jul 10 '14 15:07 davifo

This is possible, but would need a lot of reworks. First you would need to port (or find it ported) all otclient dependencies (openal, boost, openssl, lua51, libogg, libvorbis, glew, physfs, etc) which I don't think it's a simple task. Then you would need to implement a new PlatformWindow and Platform classes for NaCL in the src/framework/platform/ directory. Luckly otclient already has an OpenGL ES 2.0 compatible implementation which is almost equal to WebGL (there would need some little changes, for example, I recall that VBO usage in WebGL is not optional but a must).

There is also emscripten which I think it's a better choice because It would run in any browser capable of HTML5, the efforts would be similar, however ofcourse it would run much slower, because everything would be converted to javascript bytecodes, even though I think it would be fair the performance on most computers capable of WebGL. Also networking would require to be done via WebSocks, so would need changes server side too, because I don't know if at he current moment there is a javascript to use raw TCP connections in browsers.

I have give much though on both options NaCL and Emscripten already, it sure can be done, just requires efforts from someone willing to do it, but it's nothing simple. Nowadays I don't have time for such huge task, but It would be a breakthrough.

edubart avatar Jul 10 '14 17:07 edubart

I wouldn't recomend NaCL. It was dropped by Google in an early development state.

aseverino avatar Nov 21 '14 19:11 aseverino

About port to Web Browser: https://otland.net/threads/otclient-on-browser-via-emscripten.241028/#post-2331002

EgzoT avatar Jan 26 '18 21:01 EgzoT