Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Chrome's Native Client

Options
  • 06-03-2012 3:49pm
    #1
    Registered Users Posts: 2,022 ✭✭✭


    I spent the weekend porting my game to run with Chrome's Native Client and am quite in love with the whole thing, so it was very convenient that this GDC talk was posted yesterday. Answered quite a few of my questions!

    Porting games for Native Client


Comments

  • Registered Users Posts: 5,246 ✭✭✭conor.hogan.2


    I spent the weekend porting my game to run with Chrome's Native Client and am quite in love with the whole thing, so it was very convenient that this GDC talk was posted yesterday. Answered quite a few of my questions!

    Nice how did you find it? Was it worth it and all that?


  • Registered Users Posts: 2,022 ✭✭✭Colonel Panic


    It was easy enough to follow the docs, although the NaCl toolchain is pretty barebones at the moment when it comes to debugging and IDE support so I had to learn a bit about the build system they use and refresh my memory on G++ compiler flags.

    I also had to stub out a lot of external code that uses OS specific calls so my game doesn't do sound or support a controller anymore, but there's an NaCl ports repository on Google and I'll prob have a look at porting some libraries myself to get some open source stuff under my belt.

    I was sort of lucky with my porting experience in the sense that it's a similar experience to making iOS games, in that you run in a sandboxed environment and need to play nice with the main thread, so you run the game on another thread and dispatch stuff asynchronously to the NaCl thread for stuff like FileIO, posting messages to JS running in the same page and batching render commands.

    It was worth it in the sense that it was a great learning experience, seeing 3D graphics run in a browser at 60fps is nice, I like the API and I would love to see it take off.

    As always, there's a port of Quake worth looking at for a general idea...

    https://github.com/davemichael/NaCl-Quake

    quake_instance.h and quake_instance.cc is where you'd start.


Advertisement