otclient
otclient copied to clipboard
Port to Web Browser
Using Google Native Client( NaCl ) or FlasCC. Someone else has interest in running client in the browser?
This would be cool. Not sure who wants to try port it, but I'd help.
I'm trying, though unsuccessfully, and also i can help! Not seem so hard, but still do not know design architecture and dependencies completely.
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.
I wouldn't recomend NaCL. It was dropped by Google in an early development state.
About port to Web Browser: https://otland.net/threads/otclient-on-browser-via-emscripten.241028/#post-2331002