cocos2d/cocos2d-x — pull request #3357 by folecr (2013-08-03 01:50:34+00:00)
Title: Simpler, more modern Android port of cocos2d-x

The goals of this port

* Remove Java/JNI calls in the rendering and event loops (performance critical portions of the code)
* Improve the perceived lag in event (touch, accelerometer) processing. When playing games the event processing feels less laggy!
* Improve readability and maintainability by converting to C++/C where possible. Hopefully this will allow more of the cocos community to contribute to the Android port!

Features

* Rendering uses the NDK API
* Removal of JNI interaction with rendering loop allows future rendering optimizations to be easily shared with Android
* Android lifecycle is managed with the NDK API
* Event processing receives events directly from the event sink in native code (no round trip via Dalvik)
* Lifecycle, rendering, event processing all happen on the same Linux thread
* Updated the CocosDenshion implementation (more below)

Major to do items, in order of priority :

* Lua projects to be updated
* Text input is broken.
* Open GL initialization should be done directly by cocos2d::Director instead of being initialized in the Android platform-specific code (thanks @minggo for review)
* CocosDenshion uses the Java API for sound and music playback on all devices. This needs to be fixed to use the Open SL API on devices where the Java API is known to perform badly.
* CocosDenshion resource loading should be multi-threaded
* A more C++-like design for the Android code : currently it uses almost all C code for the Android port.

Tests

* Cpp and JS projects build successfully
* Games (SimpleGame, CocosDragon, MoonWarriors play successfully)
* Ran through TestCpp and TestJavaScript.