Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very interesting gameplay - I played a bit :)

> We had to implement techniques like client side prediction, server reconciliation and entity interpolation so that players look smooth when they are moving in the 3D space.

Curious: what kind of tools/frameworks could have helped in shipping to wasm faster and better?



Thanks for playing the game :)

I'm Daniel, Diego's brother who also worked on this project. Your question is a bit broad, but I can tell you what it was like to work with emscripten.

We used emscripten to compile our C++ application to WASM and to generate the JS code that loads the application. This part was very easy. We had the game running on the web in no time.

What was much much more difficult was working with emscripten's APIs to do things like handle mouse / touch / keyboard inputs. There's tons of gotchas and weird limitations to work through.

Another huge challenge was in sending data between the JavaScript layer and the C++ application. You have to serialize data and then parse it on the C++ side, which sounds easy until you try to do it.

We faced some tough challenges asynchronously loading the paintings. Our initial solution of using a simple thread pool library which manages web workers didn't run on Safari due to some strange incompatibilities with WebGL 2.0, so we had to go for a purely web worker based approach.

Overall, we are amazed at what you can do with emscripten, but you have to be prepared to face some bad documentation, browser incompatibilities, and to tinker A LOT.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: