1. 程式人生 > >Cocos3.0測試版釋出(中文)

Cocos3.0測試版釋出(中文)


最新的cocos2d-x 3.0版本,我們的目標不僅是改進渲染機制,增加對2.5D的支援,基於元件的系統功能,和更好的Label功能。同時

我們希望能夠進一步優化引擎,並且使用更友好的C++ API
For cocos2d-x v3.0, not only we want to add great features like an improved renderer, 2.5D features, component-based

system, and better Labels; but also we want a polished and C++ friendly API.
所以這次的pre-alpha版本,我們將全部的精力放在移除目前引擎中Objective-C模式,提升C++的使用體驗,並且增加了很多C++11的

新特性。
So, for this release (pre-alpha0), we put all our energy in removing the Objective-C patterns, and in adopting C++

best practices, including some C++11 features.
我們對這次的版本非常滿意,我們認為目前版本的引擎,會讓你的遊戲更容易使用,而且更容易維護。同時這個版本能夠向下相容

2.1版本的API,但是2.1版本的API會在編譯器中被標記為“不推薦使用”(deprecated)
We are very happy with the result. We think it is easier to use, and easier to maintain. And we were able to make

all these API changes, while preserving backward compatibility with the v2.1 API. Although the v2.1 was tagged as

deprecated.

以下是這次新版本的要點:
Here is list of the most important changes:

移除了引擎中的Objective-C模式,所有類和通用函式中的CC及cc字首被移除。
Removed objective-c patterns. The CC and cc prefixes were removed from class names and free functions.
使用C++11的std::function<>用以支援MenuItem和CallFunc。這意味著可以像使用函式回撥一樣使用Lambda表示式。
Added C++11 std::function<> support for callbacks in MenuItem and CallFunc. That means that Lambda objects could be

used as callbacks!
新增了Cocos2d_c++_coding_style(cocos2d_c++程式設計風格)編碼規範,未來將在引擎中遵循此規範(進行中)
We started the Cocos2d_c++_coding_style document. We are following those guidelines in our code. (work in progress)
全部的Test例子將採用新的API實現,並有大量改進內容。
Updated all samples to use the new API, including major improvements in Test Cpp
全部的iOS或Xcode 工程合併到同一個Xcode工程中,包括全部的庫及示例。
All iOS and Mac Xcode projects were merged into one big Xcode project that includes all the libraries an samples.
移除Android和iOS專用templates,使用create-multi-platform-projects.py的指令碼檔案建立多平臺工程
Removed Android and iOS specific templates. Use the script named create-multi-platform-projects.py to create multi-

platform projects instead.
使用Android資源管理器在APK中讀取檔案,速度提高約40%
Uses Android asset manager to read files in the APK, which is about 40% faster
在全平臺增加ETC1支援
Added ETC1 support on all platforms
支援Lua繫結openGL ES
Added Lua bindings for OpenGL ES
更新SpiderMonkey到Firefox v22
Updated SpiderMonkey to Firefox v22
更新Chinpmunk2d至v6.1.5版
Updated Chipmunk2d to v6.1.5
增加QT creator的工程部分
Added project part for QT Creator
以及其他
and much more

譯註:這個版本最重要的就是支援了C++11,終於開始告別在C++中模擬OC的時代了!C++11有很多強大的特性,目測將大幅提升開發者速度,但傳聞VS2010對C++11的部分特性不支援,所以建議VS使用者繼續升級至2012