sorry for announcing this so late, but here it goes:
And we’re using that on the new bindings.
How do the new bindings work?
As you can see, we decided to move with this in the open source model, so you can join us in the fun and contribute (either just testing, bug reporting, or with code) to this project to make it even better.
What is working today?
We have a working SpiderMonkey for iOS and Android and basic autobindings for properties (fundamental, pointer and reference types), classes and a few other things. We’re adding functions/constructors support as I write this, so that should be there pretty soon. You can check the Readme in the js directory in the js-bindings branch to test it.
Oh, also… since we’re using clang to parse the headers, we’ll try to do the same for cocos2d-iphone.
Great job! gles20 branch is also improving very fast. We can probably merge these 2 branches in April, if each of them are mature, then launch a super release.
very cool! i’m trying it out.
a more functional version is on my fork:
CCPoint CCSize CCRect CCDirector CCNode CCSprite
CCScene CCSpriteFrameCache CCSpriteFrame CCAction
CCAnimate CCAnimation CCRepeatForever CCLayer
Dang, sounds extremely exciting.
for iOS and Android that should be soon (couple of weeks?). For the HTML5 side… I would say more, but maybe the cocos2d-x team has more insight in that.
For now, here’s a sneak peak (iOS only, Android following soon
Would be possible to add non-cocos2d-x clases to the build?
Like Ad-related librarys (admob/tapjoy/etc…)
I’m very interesting in the JS binding, but I need to know If I could extend the funcionality (easily).
I apologiced for my english.
Probably you need to write js wrappers for cpp, and cpp wrappers for objective c/ java
It is possible to use extend the functionally easily. The current bindings are being generated automatically using the cocos2d.h header file, and our purpose is to do the same with other libraries.
Currently you need clang-2.8 and it only works for C++ (so far, we’re trying to extend it for obj-c as well), you can then give a look at the generate_cocos2d_xml.sh script, which basically runs clang and outputs an XML version of the AST:
Now, if you don’t want to generate the bindings automatically, you can always use the SpiderMonkey API (which is very nice!) to create your custom bindings:
Thank’s Rolando, I will begin using the JS binding on my next project. Any date for the Android version?
Later this week we’ll have Android support, I’ll update this thread as soon as we have that ready.
Rolando, gles20 branch of cocos2d-x is much improved recently. FishingJoy2 is using this branch, so I’m sure that it’s mature enough. Could you bind js onto gles20, we can abandon the js-binding feature on 1.x. I saw that CocosBuilder v1.1 and higher only supports cocos2d 2.0
@Paul, We have no plans to run jsbinding in win8 metro currently. But it can work on win8 desktop, using compatible mode the same to most windows programs.
Thanks for the reply. I guess Metro apps can be authored using HTML5 cocos2d.
This JS binding looks amazing! I’m really eager to start learning it. But… Is it possible to submit a JS-binded game to the App Store? Indeed, I’d like to be sure about that before writing a very time consuming application…
As far as I known, the JS-Binding is compiled to native code using a script.
The JS-Bindig is for multiple deployment. (with the same source-code)
`Jose: it does not compile to native. Ideally, however you want to have something like google’s closure compiler to run through your code before shipping it.
next page →