What the hell are you doing with cocos2dx? :(

As i can see, CCPoint and CCRect now derived from CCObject. Just for PointArray? Hmm.

Such often used structs must be POD. Guys, instead adding features you MUST sometimes stop and review your code. Performance one of most important features for game library.

What is wrong with changing them to CCObjects? I was planning on switching to the new version of cocos2dx, but if there are big problems with it then I won’t, so I am pretty interested in what the problem is.

Looked into CCPointArray… why does it really need to be based on CCArray, why not std::vector? Do points in it really need to be reference-counted?

Anyway, even for CCArray we can make CCPointObject wrapper for CCPoint inherited from CCObject instead of making all CCPoints CCObjects.

BTW CCPointArray does reallocate in a heap every CCPoint passed to it so why not to allocate different object (CCPointObject) and leave CCPoints POD?

totally agree…
and now if I switch to new version, I have to modify thoundsands lines of my code (in order to FIX the old version bug :frowning:

I think the author just let the user do this on their own if they REALLY need it, not hardcoded these in engine.

If author really need to change something in future version, you guys can just discuss on forum about why the engine need to be change,
(this is what forum do, discuss things!)
but not change this because someone need this.

I am sorry about that.
We will discuss it in future.
Because it is the first stable version, i think it will not happen again.

Jeffrey Walraven wrote:

What is wrong with changing them to CCObjects? I was planning on switching to the new version of cocos2dx, but if there are big problems with it then I won’t, so I am pretty interested in what the problem is.

Nothing is “wrong”, but this is not so good as it can be. So I started this thread to make cocos2dx better.

Minggo Zhang wrote:

We will discuss it in future.

Thanks. All in all i think that this is good release.
We’ve successfully migrated to it in current game and so far everything is working well :slight_smile: Only changes are http://github.com/cocos2d/cocos2d-x/pull/1286 and http://github.com/cocos2d/cocos2d-x/pull/1289 and some changes in retina- logic. Probably we make pullrequest with it later.

Thank you.