Settings

Theme

Zynga Ports Cocos2D-X to Emscripten

code.zynga.com

73 points by jamesg 13 years ago · 9 comments

Reader

sbc100 13 years ago

Cocos2dx is also already available for NaCl so will work in chrome:

https://chrome.google.com/webstore/detail/cocos2dx-test-app/...

Setup instructions:

http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Native_Clie...

fuddle 13 years ago

Great to see, I wonder if it would be possible to run any iOS app in the browser using this technology?

  • robterrell 13 years ago

    This uses Cocos2dx, which is c++. Emscripten does not yet support Objective-C. Even if it did, someone would need to write an Objective-C runtime (probably not too hard, especially if you lean on Cappuccino for objj_msgsend). Once that hurdle is cleared, you'd need to source code for UIKit & whatever iOS frameworks you're using. What's more likely is a port of AppKit using Cappuccino components.

wilfra 13 years ago

"we’ve learned that the successful teams...build on mature (read: “old, creaky”) technologies, because you want to spend time making the game fun, not trying to get the latest and greatest development tool to work."

That, rather painfully, makes a lot of sense. We're 18 months into building an HTML5 game (http://warsocial.com) using rails, node.js, redis, angular.js and a bunch of other 'latest and greatest' technologies. We probably could have gotten where we are now in a couple months if we had just gone with Flash + PHP or something, and put the rest of our time into making the game better.

  • kevingadd 13 years ago

    New technology will always cripple a game project, yeah. The core task of actually prototyping and iterating on mechanics and design until you have something fun is just incredibly expensive and difficult; layering difficult technological challenges on top just makes it worse.

    • tluyben2 13 years ago

      I like to prototype with a scripting language (LUA usually with ZeroBrane) and either Inkscape and/or Blender until mechanics / game design is fun. Not always but sometimes it needs to be almost completely rewritten to C++ or something else more performant than LUA (Cocos2D-x, Monkey language, Unity, Blender gamekit are my among my chosen poisons). Luckily most environments can be extended with a LUA engine, even if it's not supported natively.

  • Stranger2013 13 years ago

    Whatever is the platform there is always a C/C++ for it...

  • cglace 13 years ago

    Curious why node and rails? Is this a common combo?

    • wilfra 13 years ago

      Node came later. Had we known we were going to use it, we probably could have avoided using rails altogether.

      Would not recommend rails for game dev if you can help it. For a multitude of reasons - speed and environment headaches being the big two.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection