Cocos2d-JS v3.0 alpha release: Feedbacks

Cocos2d-JS v3.0 alpha release: Feedbacks
0.0 0


Hi, community

As Cocos2d-JS v3.0 alpha have been released on 15 March, we are happy to announce that now Cocos2d-html5 and Cocos2d-JSBinding are merged into one single project: Cocos2d-JS. It provides a consistent development experience for no matter what platform you want to distribute, web or native. Code once, run everywhere will become even more simple in 3.0. First of all we will focus on unify the API of JSBinding with Cocos2d-html5. Secondly, Cocos2d-JS provides a script tool cocos console to simplify the creation of the project.

We hope you enjoy the new workflow and new javascript API of Cocos2d-JS. But we do know that the API changes of this version may be too much to some developers, and upgrade from 2.2.2 to 3.0 is not that easy neither. So we have prepared a bunch of documents to save you some time.

This topic is created to collect all your feedbacks for Cocos2d-JS v3.0a, any questions, suggestions, issue reports, complains are welcomed here, please help us to improve Cocos2d-JS and the community appreciate your contribution in any form.

Best regards
Huabin LING
Cocos2d-JS engine developer

Should we use Cocos2d-JS 3.0 alpha or cocos2d-html5 2.2.2??

I’m using it. I’m very happy with the new API. :slight_smile:


I’m getting an internal error when trying to access any of the docs, (release notes, upgrade guide, etc.)


@vyrin We have a problem on our server right now. Maybe for the Fools day:P
But if you change the base url from to, it will work.
Sorry for the inconvenience.


@pandamicro sorry ,we just change the cocos-docs repo on github. It’s OK now.No internal error again.


Cocos2d-JS v3.0 alpha发现几个问题:


In 3.0a, I can’t find the userdefault ,is there any alternative oject to replace it ?
My project will release to andorid and ios .
Thanks a lot!



I’m not sure I understand you. Can you be more specific about userdefault?



  1. It is a known issue related to Cocos2d-x PhysicsSprite.
  2. I will check on that, thanks


今晚我在尝试用cocos2d-html5 3.0 alpha做这个东西:如何使用CCRenderTexture创建动态纹理
0、ch5中 setBlendFunc 似乎不起作用?我试了好几个参数似乎都没用,jsb里是正常的。
1、没有cc.Color4F。现在好像只有一个 cc.color ?
2、jsb 里没有cc.rand()函数,而ch5版本里有。
3、没有定义 cc.DST_COLOR。我直接使用 0x0306 ,jsb里竟然好使,哈哈。

我把我的代码和资源传上来了,你们有空的话可以试试看,jsb 和 ch5 显示的画面是不同的。



A great thanks for your feedbacks!

0, I will check this
1, Yes the basic types like point, size, rect, color have been refactored for a much simpler use experience. Details are here: Basic data refactoration
2, This will be added into the alpha2 version
3, This will also be added into the alpha2 version



@pandamicro 不好意思呀。
“0、ch5中 setBlendFunc 似乎不起作用?我试了好几个参数似乎都没用,jsb里是正常的。”
这个我清理了一下 chrome 的缓存,代码就生效了!之前可能是老代码,哈哈。Chrome 经常这样呀,头疼 :stuck_out_tongue:


color 的值以后只有 0-255 之间了呀。但 beginWithClear 这个函数的参数还是接受 0-1 的值,每次使用的话还得用颜色 /255。我觉得是不是还是统一一下更好,让 beginWithClear 的参数也在 0-255 之间。:slight_smile:


Yes, I agree, I will add this issue


Hi there,
I was using Coco2d v2.2 I updated to v3.0 and I am having problem with sounds.
In v2.2 I had both sources (“ogg” for android and “mp3” for iOs). To play the sounds, I used the following function:

It worked fine without having to specify if it was "mp3"or “ogg”.

Now in version v3 I had to change my code to:
I had to specify if it was “ogg” or “mp3” because I was getting an error.

My question is if I am doing it correctly and if there is a way to verify the Operational System is android or iOs.
Also, the sound plays fine in my iMac but it is not working on my iPhone while it is working working fine on my android phone.



Every time i run my batch file with “ run -s c:/MyGame -p web” in it, the spinning hello world displays.

I edited index.html, main.js, app.js, and resource.js. As a user from cocos2d-html5 v2 I am not sure what is actually happening when I run from my source code.


@cronx the script only create a local host and run your index.html on it.

So if you modified the js files, it should take effect. What you have met is probably linked to the browser cache, try it on Chrome and disable the cache.


First I want to say that the CLI tool is really good idea! Much more easier to create projects. I have two things that I could not understand though:

  1. How to deploy to an iOS device? Can you actually do that with the CLI tool? If not, is there an Xcode project I can use? (Update: I just found the project in frameworks/runtime-src/proj.ios_mac. Maybe just add info to the readme file. )

  2. The structure of the created project is not very clear.For example do I need to checking /tools to source control? What exactly should be under source control?

All in all, it seems that v3.0 is much better than the previous. Good work!



  1. You can do that with the built in Xcode project: frameworks/runtime-src/proj.ios_mac, we will add this information, thanks for the feedback
  2. There is only bindings generator in /tools, if you don’t need to modify auto binding yourself, you won’t need it. But we will add also the structure intro into README



There is a error on the for interator of the tilemap/CCTMXXMLParser.js on line 616. It is overwriting the variable of line 573. That error is preventing the parser to iterate trough all tile sets. Changing the variable name fixed that :slight_smile: