After one year’s hard work, we are happy to announce that cocos2d-x v4.0 is released. If you want metal support on iOS/macOS, then you should use this version. If not, then you can still use v3.x.
Spine runtime is not included in the zip file as the codes is not merged in Spine runtime official repo. But you can check out the PR 3 to use spine runtime. Or you can get the patch file 3 and do patch by yourself. The patch file is generated by git diff commands.
Version 3.17.2 focuses on bugs fixing and performance opimization on OPPO devices.
FileUtils::listFiles()
can not work correctly if the file path starts with assets/
on AndroidVideoPlayer
can not play video in obb file on AndroidVersion 3.17.2 focuses on bugs fixing and performance opimization on OPPO devices.
FileUtils::listFiles()
can not work correctly if the file path starts with assets/
on AndroidVideoPlayer
can not play video in obb file on AndroidMore detail change log please refer to ChangeLog.
The 3.17.1 release focuses on bug fixing.
The 3.17 release focuses on stability and increased performance with some under the hood enhancements that will make cross-platform development easier.
v3.17 has been tested using Android Studio (3.0, 3.1, 3.1.1) with NDK r16
Android tool version tested in this version:
creator_to_cocos2dx
creator pluginThis release brings bug fixes and API maintenance, as well as these highlights:
Prior to 3.13 the cocos command would find an Android API level >= a specified
Android API level inorder to build source codes on Android. For example, if the contents of
APP_ROOT/proj.android/project.properties is:
target=android-13 // the default android api level
android.library.reference.1=../../../cocos/platform/android/java
then the cocos command will find android-13 in ANDROID_SDK_ROOT/platforms
. If android-13
is not found then it will try to find android-14. If android-14 is not found, then it will find
android-15 and so on until it finds one.
This algorithm has a problem. If you only download Android 21, then your application will be built with
Android 21 even though the default API level is 13. If your application runs on a device with a lower Android OS,
such as Android 4.0, then your application may crash. Building with a higher API level does not ensure that your
application will run on devices with a lower Android OS.
Starting in 3.13.1, the cocos command will stop if it can not find a specific API level. The default
is android-13. If you want to build with a higher level Android SDK, you should explicitely specify it.
Example:
cocos compile -p android --ap android-19
Keep in mind that, after running this command, the contents of APP_ROOT/proj.android/project.properties
will
be changed, android-19 will now be the default API level.
There is a map between Android API level and Android OS version that you can refer to for detailed information.
There is also more detailed information in our GitHub repo about this issue.
We are happy to announce the release of Cocos2d-x v3.13!
We are happy to announce the release of Cocos2d-x v3.13!
Support for Gear, Deepoon, Google Cardboard and Oculus has been added. Read about VR in our Programmers Guide
Thanks halx99's contribution, now cocos2d-x supports ETC1 alpha channel by default.
If want to use ETC1 alpha chaneel, you should put xxx.pkm
and xxx.pkm@alpha
in the same folder, and use it like this:
auto sprite = Sprite::create("xxx.pkm");
xxx.pkm@alpha
is the resource for alpha channel. @alpha
subfix is required by engine to load alpha texture automatically.
More detail usage can refer to the implementation of Sprite1ETC1Alpha
in tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp
.
As you can see, the blue block in the middle of the picture is an ETC1 picture with alpha channel.
AudioEngine uses OpenSL ES on Android, and it supports decoding audio source file to PCM data in codes since Android 4.2. Now AudioEngine uses this feature to fix the performance issue. The performane is the same as before if running on Android 4.1 or lower version. Should preload first, or there is not performance improved for first time playing of the audio.
In v3.12, we improved WebGL renderer in the web engine, this version have brought the dirty region algorithm to improve canvas renderer performance. Basically, it detect every region that have been changed between frames, then only render these parts instead of refresh the whole canvas. This technique is beneficial for many games in which the dynamic region is often limited, it can improve frame rate and reduce CPU usage, power consumation. It's desactivated by default, to activate it, you can do the following:
// Enable dirty region algorithm
if (cc._renderType === cc.game.RENDER_TYPE_CANVAS) {
cc.renderer.enableDirtyRegion(true);
// Maximum dirty region count to activate the partial rendering process
cc.renderer.setDirtyRegionCountThreshold(6);
}
// Detect if dirty is enabled
var enabled = isDirtyRegionEnabled();
Now we provide arm-64 bit 3rd party libraries, which means can build 64-bit apps on Android. You can use the command to build 64-bit apps:
cocos run -p android --app-abi arm64-v8a
cocos2d-x switch to use clang in v3.12
, but developers reported some crash issue that caused by using clang+gnustl_static
, so we switch to use gcc 4.9. We will change to use clang+c++_static
when c++_static
is stable.
Because CURL has a bug about connect to IPV4 numerical IP address in NAT64 environment, and it is fixed in v7.50.0, so we upgrade to this version when v7.50.0 is released.
We are happy to announce the release of Cocos2d-x v3.12!
We are happy to announce the release of Cocos2d-x v3.9. Following are the highlighted features, improvements and API updates in this version.