Multiplatform strategy, javascript or c++ ?

Multiplatform strategy, javascript or c++ ?
0.0 0


Hi, I´m new to the cocos2d ecosystem and I´m kind of block looking for the best path to follow.
My goal is to have a game running in web browsers, iOS and Android devices, with only one code base.
I know more javascript than C++, and I have no experience with Objective C.
It’s possible to start a game in cocos2d-html5 and compile it to iOS without knowing Objective-c , and the same with Android without Java?
I read an article in the zynga blog about writing the game in cocos2D-x and then compiling to javascript for execution in browsers.
Is that approach more mature than the other way around (from html5 to iOS) ?
I’m a bit confuse about how the conversion between multiple frameworks works.
Any link to multiplatform sample projects written in javascript would be a awesome.
I tried this tutorial

But it seems a bit outdated.
Thank you.


the advantage of JS is that also supports web browsers. As far as I know, you make the games with cocos2d-html5 and then process them by JS bindings.


If you are targeting WEB, then use cocos2d-html5 with JS bindings. If not, use cocos2d-x.

It’s a bit complicated to start from the beginning with cocos2d-html5.

By the way, you can use emcripsten to compile cocos2d-x project to web.


I haven’t seen commercial game based on cocos2d-x emcripten port, it hasn’t been proven yet.
Generally speaking, native games market (uses cocos2d-x, c++ or lua) is mature, many big companies are there. HTML5 games market (cocos2d-html5) is emerging, the revenue is uncertain but you may have more opportunities.


@Zhe do you consider JS Bindings mature enough to make professional cross platform (“native binded” on mobile and desktop web browser)? or you think is better to stay on C++ until JSB is more stable?



@Jesus, There’re already some commercial games released. It’s mature on technology, but still lacking documents.
My suggestion is that big companies can use JSB approach to distribute native and web channels, for indie developers, if you have no energy to publish on multiple channels/stores, then just use c++ or lua with is easier and have more documents.


I bet my project on JSB. It’s not very matured but matured enough to develop a good game. And JS is much much better than c++ to do job.