Cocos3.0测试版发布(中文)

时间:2021-02-07 04:39:20

最新的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