Porting a complete C game engine to html5 through Emscripten