Cocos2d-x is an open-source mobile 2D game framework written in C++.
Over 13 Thousand
Feb 21, 2012 Download cocos2d-x sample apk 1.0 for Android. Cocos2d-x sample. Using APKPure App to upgrade cocos2d-x sample, fast, free and save your internet data. The description of cocos2d-x sample. Cocos2d-x sample. Cocos2d-x sample 1.0 Update. Similar to cocos2d-x sample. According to a recent survey we took, iOS is the most popular deployment target for Cocos2d-X developers, with Android coming in a close second. So that's where we'll start. IOS Project From Scratch. There's now a very simple way to create a Cocos2d-X iOS project from scratch.
#4 inGame,#2 inGame Frameworks
AppBrain analyzes Android apps and games on Google Play and finds the apps that contain Cocos2D-X. We providefree statistics on which apps and games are using these libraries, and a full list of apps can be purchased for a small fee.
Using the stats below, you can answer questions like 'Who's using cocos2d-x', 'Which apps are a showcase for cocos2d-x',and 'How popular is this library?'.
About cocos2d-x usage data
Our market share and usage data is crowd-sourced. This means that we have 100% coverage of popular apps, and the less popular an app is, the more likelywe won't have detected its libraries. However, this doesn't invalidate our statistics, because the power law property of app downloads means that the vastmajority of all downloads is generated by a relatively small number of popular apps, which we all cover.
The 'related libraries' gives a good overview which code is frequently used together with cocos2d-x. Theselibraries may, for instance, work well together, or may be competitors to cocos2d-x.
Statistics
Related Libraries
Google Analytics·Android Jetpack VersionedParcelable·Google gson·Google Maps SDK·Okio·Android Asynchronous Http Client·Android Support library·HttpClient for Android·Sdkbox·AdMob
Add to your website
To keep others updated about Cocos2D-X and its use in Android apps,we offer a widget that you can embed into your website.Click to preview the widget.
Suggest an update
Name changed? Website moved? New icon? Suggest an updateand help us stay up-to-date.
Top apps that contain Cocos2D-X
Market share by category
17.50%
14.28%
13.95%
13.09%
12.43%
11.88%
9.23%
8.81%
8.71%
8.51%
8.09%
6.33%
4.28%
3.78%
3.33%
3.32%
3.17%
1.96%
1.64%
1.53%
1.45%
1.04%
0.79%
0.78%
0.64%
0.31%
0.29%
0.28%
0.23%
0.22%
0.18%
0.18%
0.14%
0.14%
0.13%
0.13%
0.12%
0.12%
0.09%
0.08%
0.07%
0.07%
0.06%
0.06%
0.06%
0.06%
0.05%
0.04%
0.04%
0.02%
The Cocos2d-x engine is an open source, cross-platform game engine that is widely adopted by developers all over the world and gives developers the technology platform from which they can build games that work seamlessly across multiple platforms quickly and effectively.
Download Cocos2d-x For Android Laptop
Using a single C++ codebase you can deploy games to just about any mobile platform and since Cocos2d-x is open-source, you can tweak the game engine if needed.
The Cocos2d API is simple and powerful. With a couple of lines of code you can bring a few images and sounds to life using actions and create your own vibrant game. Cocos2d-x takes that powerful API and makes it portable using C++. It empowers you, the developer, and enables you to choose which platforms on which you want to develop and how to deploy them. In this article, I will explain how to build an NDK app for Android* on Intel® architecture.
Hello World and Cocos2d-x for Android*
Let’s build a “Hello, World” Cocos2d-x project for an Android device. I prefer to do this via a command line since there are no Cocos2d-x project templates available via the Eclipse* IDE at the moment.
The home directory of Cocos2d-x contains a shell script named create-android-projects.sh that you can use to generate the Android project.
Modify the lines above so that the NDK_ROOT_LOCAL variable points to the directory where you installed the Android NDK and ANDROID_SDK_ROOT_LOCAL points to the place where you installed the Android SDK.
Run the create-android-project.sh script from the command line. There are several prompts to input various values. Input the package path and get a list of available Android API’s and their ids. You will need to use the id for the last item. Additionally, assign the project name (I called it: doto).
The created project directory is the line towards the end of the script output. That’s where your Android project has been created by the script. The project location (/home/test/Desktop/doto) will be referred to as $PROJECT_HOME for now.
Cocos2d X Api
Building the Project
There are two steps to building the project: compiling the C++ code with a command line script, and compiling the Java code with Eclipse.
Before compiling however, you will need to define the NDK_ROOT parameter so it points to $NDKROOT directory. Open the $PROJECT_HOME/proj.android/build_native.sh shell script and add the following line at the top of the file:
Modify the above line so that the NDK_ROOT variable points to the directory where you installed the Android NDK ($NDKROOT).
To compile the C++ code, switch to the $PROJECT_HOME/proj.android folder via the command line and issue the following command:
./build_native.sh
This builds the C++ Cocos2d-x libraries, and the C++ code for your project.
To build the Java* code, it is necessary to create an Eclipse project.
Start Eclipse and go to FileNewOther. Choose AndroidAndroid Project from Existing Code, and click Next. Click Browse and select the $PROJECT_HOME/proj.android folder.
At this point the project might have some errors.
One of the errors arises because Eclipse can’t find the resource “@drawable/icon” , so, expand the project tree on the left, open AndroidManifest.xml and change to the AndroidManifest.xml view so you can see the plain text. Look for the following line of code:
Change it by the correct icon name:
Save the file.
The second error arises because Eclipse can’t find some Cocos2d-x Java classes. Select ProjectProperties from the main menu and choose Java Build Path from the list on the left. In the Source tab click on Link Source and Browse to the following directory:
$COCOS2DX_HOME/cocos/platform/android/java/src
where $COCOS2DX_HOME is the directory where you installed the Cocos2d-x resources. In Folder name writecocos2dx-src, click Finish and OK.
Now the project has no errors.
Run the project. Results are presented below.
Congratulations, you have now successfully built an NDK project with Cocos2d-x on an Android device.
Related Articles and Resources
About the Author
Vitaliy Kalinin works in the Software & Services Group at Intel Corporation. He is a PhD student at Lobachevsky State University in Nizhny Novgorod, Russia. His Bachelor’s degree is in economics and mathematics. His Master’s degree is applied economics and informatics. His main interest is mobile technologies and game development.
For more complete information about compiler optimizations, see our Optimization Notice.