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

WASM port using Emscripten #154

Open
rollerozxa opened this issue Jan 1, 2024 · 0 comments
Open

WASM port using Emscripten #154

rollerozxa opened this issue Jan 1, 2024 · 0 comments

Comments

@rollerozxa
Copy link
Collaborator

Porting Principia to run in the browser with WASM and WebGL using Emscripten would be awesome.

Initially, the goal of the port could be to only allow playing community levels inside of the browser. This would make the lack of GTK3 dialogs less of an issue (and the small amount of dialogs you come across when playing levels could be provided by the WIP Imgui dialog backend).

I do know that cURL, Freetype, libpng, libjpeg and zlib work to build for Emscripten (see https://github.com/paradust7/minetest-wasm for some build scripts for those dependencies). SDL2 obviously supports Emscripten and they have a page with notes on porting an SDL2 app to Emscripten: https://wiki.libsdl.org/SDL2/README/emscripten.

From what I've read WebGL appears to be compatible with OpenGLES 2.0 (WebGL 1.0) or 3.0 (WebGL 2.0). Unsure what GLES version the Android version uses, but doing what the Android version does to display graphics sounds like a good start for the port.

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

1 participant