Having just seen the video from the Arm conference where Ricardo talks about some of the improvements to to Cocos2dx in version 3, I thought I’d take a quick look.
First I had to upgrade my version of C++ to 4.7 so I could compile it. Thanks Ubuntu for putting it in a test PPA instead of being generally available. A few apt-* commands later and I’m compiling up the source. At least this time the cmake configuration is much easier to understand. Another recompile after configuring Box2d (why do you insist on making Chipmunk the default!) and the test code is running much faster on my creaky old laptop. Using a later opengl driver has really helped.
The dilemma is should I abandon my previous code and setup and recreate everything in version 3, all the while having to mentally switch between CCSprite and Sprite class names etc. Also a lot of the tutorials are geared to version 2. It might be a bit of a mental stretch too far.
Anyway for now I’ve decided to give it a go and keep up with the latest and greatest. At this rate I might even get out a game before the stable release instead of the beta version.
So I’ll have to go through the same steps again.
All set up!
So after a lot of mucking around I now have coverage working – the next step in getting my TDD groove together.
It took a while to get to that point, because as soon as I added the flags to the makefile to enable coverage, I found cocos2dx had been compiled up by default for Chipmunk physics and not Box2D, which is what I want to use.
Just a quick rant. I wanted to add coverage logging information for my unit test stuff. So I add the flags, only to find out that libcocos2d extensions library is not compiled correctly.
Now I’m just repeatedly fixing coding errors in their tests. Grr.
I’ll be back with real info on setting gcov, lcov and getting code coverage in general soon.