2014-06-17 21:13:49 +08:00
# cocos2d-x v3.2-alpha0 Release Notes #
2014-01-07 08:33:14 +08:00
2014-01-07 08:26:48 +08:00
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
2014-06-17 21:18:08 +08:00
- [cocos2d-x v3.2-alpha0 Release Notes ](#user-content-cocos2d-x-v32-alpha0-release-notes )
2014-05-20 08:02:30 +08:00
- [Misc Information ](#user-content-misc-information )
- [Requirements ](#user-content-requirements )
- [Runtime Requirements ](#user-content-runtime-requirements )
- [Compiler Requirements ](#user-content-compiler-requirements )
- [How to run tests ](#user-content-how-to-run-tests )
2014-06-17 21:18:08 +08:00
- [Mac OSX & iOS ](#user-content-mac-osx--ios )
- [Android ](#user-content-android )
- [Windows ](#user-content-windows )
- [Linux ](#user-content-linux )
2014-05-20 08:02:30 +08:00
- [How to start a new game ](#user-content-how-to-start-a-new-game )
2014-06-17 21:18:08 +08:00
- [Highlights of v3.2 alpha0 ](#user-content-highlights-of-v32-alpha0 )
2014-05-20 08:02:30 +08:00
- [Features in detail ](#user-content-features-in-detail )
2014-06-17 21:18:08 +08:00
- [Animation3D ](#user-content-animation3d )
- [fbx-conv usage ](#user-content-fbx-conv-usage )
- [Sample code ](#user-content-sample-code )
- [captureScreen ](#user-content-capturescreen )
2014-05-20 08:02:30 +08:00
2014-01-07 08:23:06 +08:00
# Misc Information
2014-06-17 21:18:08 +08:00
* Download: http://cdn.cocos2d-x.org/cocos2d-x-3.2alpha0.zip
2014-06-17 21:13:49 +08:00
* Full Changelog: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.2alpha0/CHANGELOG
2014-05-20 07:56:33 +08:00
* ~~API Reference: http://www.cocos2d-x.org/reference/native-cpp/V3.0/index.html~~
* v3.0 Release Notes can be found here: [v3.0 Release Notes ](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md )
2014-01-07 08:23:06 +08:00
# Requirements
## Runtime Requirements
* Android 2.3 or newer
* iOS 5.0 or newer
* OS X 10.7 or newer
* Windows 7 or newer
2014-05-20 07:56:33 +08:00
* Windows Phone 8 or newer
2014-05-20 08:03:53 +08:00
* Linux Ubuntu 12.04 or newer
2014-01-07 08:23:06 +08:00
* ~~Browsers via Emscripten~~ N/A for the moment
## Compiler Requirements
2014-05-20 07:56:33 +08:00
* Xcode 4.6 or newer for iOS or Mac
* gcc 4.7 or newer for Linux
* gcc 4.7 and ndk-r9 or newer for Android
* Visual Studio 2012 or newer for Windows (win32)
* Visual Studio 2012 or newer for Windows Phone 8
2014-01-07 08:23:06 +08:00
2014-04-21 14:50:27 +08:00
## How to run tests
2014-03-04 18:15:30 +08:00
### Mac OSX & iOS
* Enter `cocos2d-x/build` folder, open `cocos2d_test.xcodeproj`
* Select `iOS` or `OS X` target in scheme toolbar
* Click `run` button
### Android
2014-03-07 08:37:33 +08:00
You can run the samples...
2014-03-04 18:15:30 +08:00
2014-03-07 08:37:33 +08:00
**Using command line:**
2014-03-04 18:15:30 +08:00
$ cd cocos2d-x
2014-03-06 14:44:33 +08:00
$ ./setup.py
2014-03-04 18:15:30 +08:00
$ cd build
2014-03-14 15:01:11 +08:00
$ ./android-build.py cpp-empty-test -p 10
$ adb install cocos2d-x/tests/cpp-empty-test/proj.android/bin/CppEmptyTest-debug.apk
2014-03-04 18:15:30 +08:00
Then click item on Android device to run tests. Available value of `-p` is the API level, cocos2d-x supports from level 10.
2014-03-07 08:37:33 +08:00
**Using Eclipse:**
2014-03-04 18:15:30 +08:00
$ cd cocos2d-x
2014-03-06 14:44:33 +08:00
$ ./setup.py
2014-03-04 18:15:30 +08:00
$ cd build
2014-03-14 15:01:11 +08:00
$ ./android-build.py cpp-empty-test -p 10
2014-03-04 18:15:30 +08:00
Then
* Import cocos2d-x Android project into Eclipse, the path used to import is `cocos/2d/platform/android`
2014-03-14 15:01:11 +08:00
* Import `cpp-empty-test` Android project into Eclipse, the path used to import is `tests/cpp-empty-test/proj.android`
* Build `cpp-empty-test` Android project and run
2014-03-04 18:15:30 +08:00
### Windows
* Enter `cocos2d-x/build` , and open `cocos2d-win32.vs2012.sln`
2014-03-14 15:01:11 +08:00
* Select `cpp-empty-test` as running target
2014-03-04 18:15:30 +08:00
* Click run button
### Linux
$ cd cocos2d-x/build
$ ./install-deps-linux.sh
$ cd ../..
Then
$ mkdir build
$ cd build
2014-03-14 15:01:11 +08:00
$ cmake ../cocos2d-x
2014-03-04 18:15:30 +08:00
$ make -j4
Run
2014-03-14 15:01:11 +08:00
$ cd bin/cpp-empty-test
$ ./cpp-empty-test
2014-03-04 18:15:30 +08:00
2014-03-06 14:44:33 +08:00
## How to start a new game
2014-05-20 08:05:05 +08:00
Please refer to this document: [ReadMe ](../README.md )
2014-03-04 18:15:30 +08:00
2014-06-17 21:13:49 +08:00
# Highlights of v3.2 alpha0
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
* `Animation3D` /`Animate3d`, new nodes for 3d animation. lua-binding and WP8 is not supported now.
* Updated libcurl.a to use OpenSSL v1.0.1h, [news ](http://cocos2d-x.org/news/286 ) for it
* Added `utils::captureScreen` to take screeshot
2014-01-07 08:23:06 +08:00
2014-05-20 07:56:33 +08:00
# Features in detail
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
## Animation3D
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
Animation3D is skeletal animation in 3D Game. It allows the artist animate a 3D model using bone in 3D modeling tools. Then export the model file and use it in the game.
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
Work flow
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
* Artist produce 3D models in modeling tools and then export it to FBX file
* Use `fbx-conv` convert FBX file to c3t file
* Load c3t file in the game
2014-03-07 08:37:33 +08:00
2014-06-17 21:13:49 +08:00
Note
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
* The API may change in final version
* binary format of c3t will be added in final version
* the bones in the FBX file should not be more than 50.
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
### `fbx-conv` usage
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
* windows
2014-01-07 09:04:12 +08:00
2014-01-07 08:23:06 +08:00
```
2014-06-17 21:13:49 +08:00
cd COCOS2DX_ROOT/tools/fbx-convert/win32
fbx-conv FBXFile
2014-01-07 08:23:06 +08:00
```
2014-06-17 21:13:49 +08:00
* mac os x
2014-01-07 08:23:06 +08:00
2014-05-20 07:56:33 +08:00
```
2014-06-17 21:13:49 +08:00
cd COCOS2DX_ROOT/tools/fbx-convert/mac
./fbx-conv FBXFile
2014-05-20 12:07:43 +08:00
```
2014-06-17 21:13:49 +08:00
### Sample code
2014-05-20 12:07:43 +08:00
```c++
2014-06-17 21:13:49 +08:00
//load Sprite3D
auto sprite = Sprite3D::create("girl.c3t");
addChild(sprite);
sprite->setPosition(Vec2( 0, 0));
//load animation and play it
auto animation = Animation3D::getOrCreate("girl.c3t");
if (animation)
2014-05-20 12:07:43 +08:00
{
2014-06-17 21:13:49 +08:00
auto animate = Animate3D::create(animation);
sprite->runAction(RepeatForever::create(animate));
2014-05-20 12:07:43 +08:00
}
```
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
Full sample please refer to [Sprite3D test ](https://github.com/cocos2d/cocos2d-x/blob/v3/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp ).
2014-01-07 08:23:06 +08:00
2014-06-17 21:13:49 +08:00
## captureScreen
2014-01-07 08:23:06 +08:00
2014-06-17 21:18:08 +08:00
Please refer to [here ](https://github.com/cocos2d/cocos2d-x/blob/v3/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp ) for usage.