funkaster at March 23rd, 2012 15:06 — #1
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.
funkaster at March 23rd, 2012 15:08 — #2
Oh, also… since we’re using clang to parse the headers, we’ll try to do the same for cocos2d-iphone.
walzer at March 23rd, 2012 20:43 — #3
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.
l4u at March 23rd, 2012 21:55 — #4
very cool! i’m trying it out.
funkaster at April 16th, 2012 18:41 — #5
a more functional version is on my fork:
CCPoint CCSize CCRect CCDirector CCNode CCSprite
CCScene CCSpriteFrameCache CCSpriteFrame CCAction
CCAnimate CCAnimation CCRepeatForever CCLayer
sparkart at April 16th, 2012 20:55 — #6
Dang, sounds extremely exciting.
funkaster at April 17th, 2012 15:46 — #7
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
jandujar at April 18th, 2012 05:59 — #8
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.
l4u at April 18th, 2012 06:38 — #9
Probably you need to write js wrappers for cpp, and cpp wrappers for objective c/ java
funkaster at April 18th, 2012 13:09 — #10
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:
jandujar at April 18th, 2012 13:12 — #11
Thank’s Rolando, I will begin using the JS binding on my next project. Any date for the Android version?
funkaster at April 18th, 2012 13:25 — #12
Later this week we’ll have Android support, I’ll update this thread as soon as we have that ready.
walzer at April 21st, 2012 05:12 — #13
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
funkaster at April 23rd, 2012 12:23 — #14
kellog at May 18th, 2012 08:07 — #15
walzer at May 28th, 2012 01:23 — #16
@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.
kellog at May 28th, 2012 03:16 — #17
Thanks for the reply. I guess Metro apps can be authored using HTML5 cocos2d.
martinj at June 1st, 2012 02:38 — #18
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…
jandujar at June 1st, 2012 02:48 — #19
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)
funkaster at June 1st, 2012 12:23 — #20
`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 →