Best way to port a C ++ game to a website

I understand that the above question is quite broad, so I will judge it. I have a simple opengl C ++ game engine that lives in a static library (can be converted to a dynamic lib).

I was thinking about how to make it work on the Internet. From what I see, I could use ActiveX or Google NaCl to run C ++ code in a browser. But these technologies do not seem easy cross platform? Or maybe I misunderstood.

Another option I've seen is to convert the engine to javascript and WebGL and work in HTML5 canvas. Will it be slower than C ++? That would be a very cross platform though.

What do you think is the best option, or better yet, is there another option that I missed?

EDIT: what about a custom plugin similar to webplayer unity?

+5
source share
4 answers

In fact, there are several technologies to help with this. Here are three that I came across, but with minimal / no experience:

+4
source

There is a library created by @kripken that is still under development. It accepts LLVM bit code and converts to Javascript.

Here you can see the project page with working examples. https://github.com/kripken/emscripten/

+5
source

NaCl.

< > :

  • :. . 3D- , . NaCl Native OS-, 5-10% FPS, Win32.
  • , NaCl, .
  • -. Chrome Windows, Linux, Mac OSX.

:

  • . OpenGL ES 2.0 ( , HTML5).
  • Chrome.
+3

- , Javascript (, , WebGL, IE ).

ActiveX NaCL - , .

, , Javascript , Emscripten ++ JavaScript.

, , . , (, , API, ++, )

+1

All Articles