Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Chrome's Native Client

  • 06-03-2012 02:49PM
    #1
    Registered Users, Registered Users 2 Posts: 2,062 ✭✭✭


    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

  • Posts: 0 ✭✭✭ [Deleted User]


    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, Registered Users 2 Posts: 2,062 ✭✭✭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