It’s been a while since there has been an update so I felt it would be worth adding unstable snapshots of the next release so people can see what’s coming. If you want to give it a test run you’ll find it in the downloads section or you can install using npm.
npm install -g cocos2d@unstable
For a list of notable changes see the change log.
Thanks to Marc Mauger for providing a whole heap of new actions and implementing scene transitions.
There was an issue with the Windows installer version which prevented the development server starting properly. Anyone using this should redownload it, uninstall their current version and install the new version.
If anyone has any issues with it please add a comment or send a tweet to @cocos2djs. Thanks.
You can grab it from the downloads section and checkout the tutorials to get started.
Upgrading Your Project
If you’ve been using the older version available via github here are some notable changes.
- Uses Node.js to serve and compile code (precompiled binaries included)
- No longer requires Python to be installed
- Installed system wide so you don’t need to include Cocos2D’s code in your project
- @super keyword has been removed. (use
- Renamed make.js and config.js files to make.json and config.json respectively.
To upgrade your project follow these steps.
- First install v0.1 by following the instructions in the README.md file.
- Rename your make.js and if you have one, your config.js files to make.json and config.json
- Replace all references to @super with
ClassName.superclass.functionName.apply(this, arguments). Where
ClassName should be the name of your class and
functionName should be the name of the function.
- Completely delete the cocos2d folder in your project.
- Delete the ./cocos and ./cocos.bat scripts in the root of your project
- Test your project by running
If you have any problems upgrading add a comment and I’ll help you out.
require('box2d') and away you go.
I’ve updated the source code for the demo. You can find that on github at https://github.com/ryanwilliams/cocos2d-demo-box2d.
All you need to do to start using it is include the module in your app like so:
var box2d = require('box2d');
And away you go. If you need more help checkout the source code for the Box2D demo I made.