4.0
04 Dec 2019

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.

3.17.2
27 May 2019

Version 3.17.2 focuses on bugs fixing and performance opimization on OPPO devices.

Highlights

  • Performance optimization on OPPO devices
  • Fixed bug thatFileUtils::listFiles() can not work correctly if the file path starts with assets/ on Android
  • Fixed crash caused by Audio on iOS
  • Fixed bug that VideoPlayer can not play video in obb file on Android

Version 3.17.2 focuses on bugs fixing and performance opimization on OPPO devices.

Highlights

  • Performance optimization on OPPO devices
  • Fixed bug thatFileUtils::listFiles() can not work correctly if the file path starts with assets/ on Android
  • Fixed crash caused by Audio on iOS
  • Fixed bug that VideoPlayer can not play video in obb file on Android

More detail change log please refer to ChangeLog.

Show Less
3.17.1
25 Dec 2018

The 3.17.1 release focuses on bug fixing.

Highlights

  • Fix Lua loading performance drop bug introduced in 3.17
  • Renderer limit glClear invoke times, reduce power consuming
  • optimize CMake script,fix some linking issues
  • Android use CMake as default PROP_BUILD_TYPE value
  • Android upgrade Gradle to 4.6, SDK 28, android gradle plugin 3.1.0
  • upgrade LuaJIT to 2.1.0-beta3, fix random crash in 3.17 Lua release mode
  • upgrade libwebsockets to
3.17
21 May 2018

The 3.17 release focuses on stability and increased performance with some under the hood enhancements that will make cross-platform development easier.

Android Requirements

v3.17 has been tested using Android Studio (3.0, 3.1, 3.1.1) with NDK r16

Highlights

  • added support for iPhone X
  • added support Android Studio 3.0+
  • CMake is now supported on all platforms
  • upgraded Spine runtime to v3.6.39
  • upgraded GLFW to 3.2.1
  • misc bugs f
3.16
10 Oct 2017

Android tool version tested in this version:

  • Android Studio 2.3.3
  • NDK r14

Highlights

  • better support creator_to_cocos2dx creator plugin
  • add LayerRadiaGradientLayer
  • update to support Android Studio 2.3.3
  • fix the issue that lua projects will crash on iOS simulator with Xcode 8.0+
  • revert CocosStudio reader and flatbuffer
  • fix compling error with iOS 11
  • use prebuit bullet t
3.15.1
27 May 2017

Highlights

  • add optimization codes for Huawei devices

3.15
21 Apr 2017

Highlights

  • full Android Studio supports: include editing, compiling and debugging c++ codes: doc
  • audio engine uses tremolo and MP3 Decoder Library to decode audio files on Android: high performance and more adaptable to different Android devices
  • WebSockets and SocketIO supports SSL
  • AssetsManagerEx is more stable
  • update Spine runtime to v3.5.35
  • update flatbuffer to v1.5
  • remove support for Windows 8.1 store and phone
  • update OpenSSL to v1.1.0
  • <
3.14.1
22 Jan 2017

This release brings bug fixes and API maintenance, as well as these highlights:

  • [NEW] Add Spine binary file format support
  • [NEW] Action: add a method to get the number of actions running in a given node with specific tag
  • [NEW] Action: new actions: ResizeBy and ResizeTo
  • [NEW] Button: can set title label
  • [NEW] Can disable multi touch on Android
  • [NEW] EventDispatcher: Add hasEventListener to check listener existance
  • [NEW] EditBox: add horizontal text alignment
  • [NEW] EventDispatcher: added hasEvent( ) to check if an event is added
  • [NEW] Sprite: support sli
3.13.1
14 Sep 2016

Bug fixed

  • Label color broken
  • application will crash in debug mode if don't specify a design resolution
  • may crash if coming from background by clicking application icon on Android
  • AudioEngine can not play audio if the audio lies outside APK on Android
  • AudioEngine::stop() will trigger finish callback on Android
  • application will crash if using SimpleAudioEngine or new AudioEngine to play audio on Android 2.3.x
  • object.setString() has not effect if passing a number on JSB

Cocos command modifications

Bug fixed

  • Label color broken
  • application will crash in debug mode if don't specify a design resolution
  • may crash if coming from background by clicking application icon on Android
  • AudioEngine can not play audio if the audio lies outside APK on Android
  • AudioEngine::stop() will trigger finish callback on Android
  • application will crash if using SimpleAudioEngine or new AudioEngine to play audio on Android 2.3.x
  • object.setString() has not effect if passing a number on JSB

Cocos command modifications

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.

Show Less
3.13
29 Aug 2016

We are happy to announce the release of Cocos2d-x v3.13!

Highlights

  • added VR plugins for Gear, Deepoon, Google Cardboard and Oculus.
  • support ETC1 alpha channel
  • fix AudioEngine performance for Android 4.2+
  • improve canvas renderer performance with dirty region
  • add Andorid arm-64 support
  • switch to use gcc 4.9
  • upgrade CURL to 7.50.0
  • upgrade Spine to 3.4
  • upgrade GLFW to 3.2

The main features in detail of Cocos2d-x v3.13

We are happy to announce the release of Cocos2d-x v3.13!

Highlights

  • added VR plugins for Gear, Deepoon, Google Cardboard and Oculus.
  • support ETC1 alpha channel
  • fix AudioEngine performance for Android 4.2+
  • improve canvas renderer performance with dirty region
  • add Andorid arm-64 support
  • switch to use gcc 4.9
  • upgrade CURL to 7.50.0
  • upgrade Spine to 3.4
  • upgrade GLFW to 3.2

The main features in detail of Cocos2d-x v3.13

Added VR plugins

Support for Gear, Deepoon, Google Cardboard and Oculus has been added. Read about VR in our Programmers Guide

Support ETC1 alpha channel

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 performance for Android 4.2+

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.

Dirty region in canvas renderer

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();

Android arm-64 support

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

Switch to use gcc 4.9 on Android

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.

Upgrade CURL to 7.50.0

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.

Show Less
3.12
07 Jul 2016

We are happy to announce the release of Cocos2d-x v3.12!

Runtime Requirements

  • Android 2.3.3+
  • iOS 5.0 or newer
  • OS X 10.7 or newer
  • Windows 7 or newer
  • Windows Phone 8.1
  • Windows 10 UWP
  • Linux Ubuntu 14.04 or newer
  • Mordern browsers and IE 9+ (On mobile platforms, only iOS and Android 5 activated WebGL support)

Compiler Requirements

  • Xcode 5.1 or newer for iOS or Mac
  • gcc 4.9 or newer for Linux
  • ndk-r
3.11.1
27 May 2016

Runtime Requirements

  • Android 2.3 or newer
  • iOS 5.0 or newer
  • OS X 10.7 or newer
  • Windows 7 or newer
  • Windows Phone 8.1
  • Windows 10 UWP
  • Linux Ubuntu 14.04 or newer
  • Mordern browsers and IE 9+ (On mobile platforms, only iOS and Android 5 activated WebGL support)

Compiler Requirements

  • Xcode 5.1 or newer for iOS or Mac
  • gcc 4.9 or newer for Linux
  • ndk-r10c for Android
  • Visual Studio 2013 or newer for Windows (win32)
  • Visual Studio 2013 updat
3.10
18 Jan 2016

Runtime Requirements

  • Android 2.3 or newer
  • iOS 5.0 or newer
  • OS X 10.7 or newer
  • Windows 7 or newer
  • Windows Phone 8.1
  • Windows 10 UWP
  • Linux Ubuntu 14.04 or newer
  • Mordern browsers and IE 9+ (On mobile platforms, only iOS and Android 5 activated WebGL support)

Compiler Requirements

  • Xcode 5.1 or newer for iOS or Mac
  • gcc 4.9 or newer for Linux
  • ndk-r10c for Android
  • Visual Studio 2013 or newer for Windows (win32)
3.9
13 Nov 2015

We are happy to announce the release of Cocos2d-x v3.9. Following are the highlighted features, improvements and API updates in this version.

3D Module

  • Added 3D MotionStreak to support streak effect.
  • Refined Sprite3D to support material system.

2D Module:

  • Added frame callback function and animation callback function.
  • Added script component system.
  • Reconstruction of 2D physics with Component.
  • Improved EditBo