UE4 and webGL what is the safest road?

Hi Guys !

I know that the HTML5 exporter is currently in work in progress. I have a small interactive app that i want to prototype in UE4 and then port into a WebGL app. My question would be : if you are a pretty decent coder in C and Python but not a killer web developper (node.js / Go / etc … ) what path would you follow :

  1. use the EPIC exporter that is still in work in progress ?
  2. use three.js instead as the doc and community is more mature ?
  3. use an other framework that i haven’t mention here ?

If answer 2 is the best path , i know that three.js is pretty cool to load and display geo in the viewport, my big grey area is how do you rewrite the game logic in three.js ? you can’t do that i guess ?

  1. so you have to use external lib ?
  2. write all the logic by yourself ?

Sorry for the long post, and thanks for your help !

Cheers

Emmanuel

I would choose option 2 for quick prototyping of smaller projects.
It is pretty easy to create app prototypes by using the vast collection of examples that Three.js community provides.

However, the game logic you will have write by yourself because Three.js is a 3D library, not a game engine.
You can of course try to search some JS library that implements a general game logic. But if your project is small, as you said, its game logic is probably quite easy to write.

I advice that you dive into source code of games made with Three.js, such as http://hexgl.bkcore.com/
(More at: http://gamedevelopment.tutsplus.com/articles/how-to-learn-threejs-for-game-development–gamedev-11787)

Later, if you know your project will be bigger and you need some features that UE4 has to offer, I would recommend prototyping your app using the UE editor. And then, depending on your requirements, wait for the HTML5 exporter to mature or use the existing HTML5 exporter. You can continue developing and testing your app in the UE editor while you wait.

Many Thanks for your answer KillerFox it confirms my first thought :

  1. Use three.js at the moment as it is the most mature library
  2. Code your game logic yourself by taking inspiration from other project
  3. Keep an eye on the UE4 exporter but wait for a more mature release
  4. Use UE4 as a prototyper / learning device for the moment

I’m quite fascinated by the emscripten project. As i really hate javascript i was also wondering if at the end a third way was not possible. Using C / SDL / OpenGL to make small and optimized game and then use emscripten to make them run in the browser. But i’m afraid that the conversion steps will add lot of complexity. On top of that writting a game engine from scratch is not an easy task.

Create an interactive framework like three.js but base on C/SDL/OpenGL/emscripten could be a great way to build

  • advanced user app
  • fast games

Inside a browser.

Cheers !