Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Konstructs to run as a web app using WebGL under Emscripten with asm.js/wasm? #237

Open
satoshinm opened this issue Apr 3, 2017 · 1 comment

Comments

@satoshinm
Copy link

Hello, curious if there is any interest in adding a "web browser platform" target to Konstructs (in addition to the current platforms of Linux, Windows, and Mac), taking advantage of WebGL and asm.js/wasm through emscripten? The end goal being to allow the Konstructs client to run directly in modern web browsers, and connect to servers with no need to download/install native software.

I found Konstructs after having gotten a basic port of Craft, Konstruct's predecessor, to function in the browser via Emscripten: fogleman/Craft#175 - and began searching for more developed forks of Craft. There's a lot of advanced features in Konstructs and I understand it is now no longer a fork, so it could be a promising alternative for this purpose if there is interest.

Here's what I have so far:

The biggest hurdle I see is Konstructs heavily relies on #version 330 GLSL shaders, using features not available in WebGL 1's version of GLSL equivalent to #version 100. Maybe would be more feasible after WebGL 2 is widely available, based on OpenGL ES 3.0, supporting these new features. The Nanogui library should also be possible to port, though I haven't gotten that far yet, and have abandoned development for now.

Current status: some progress but nonfunctional, posting this in case anyone wants to pick it up and develop further.

@nsg
Copy link
Member

nsg commented Apr 8, 2017

This is interesting, we have considering adding a WebGL target earlier but dropped it to focus on the current client.

@petterarvidsson and me have actually discussed earlier about the possibility to use a lightweight 3d engine to replace some of the existing rendering code, and that includes nanogui. We have been looking at https://github.com/urho3d/Urho3D with also has has emscripten support.

We think that that WebGL 2 looks like a acceptable solution considering that Firefox, Opera and Chrome already support it, and I guess that the rest will soon catch up.

We have also been planing to replace the current TCP networking with WebSocket. This can also be helpful for a browser based game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants