Cocos2d-Java game engine and related development tools installation configuration, cocos2djava

Source: Internet
Author: User

Cocos2d-Java game engine and related development tools installation configuration, cocos2djava

If you find that the blog image is unclear or you have any questions, click "go to CocoaChina" to view the clear picture and post

Http://www.cocoachina.com/bbs/read.php? Tid = 225761



Two Methods: CocosEditor2.0, the Official development tool, and Java development tools such as Eclipse. Recommended CocosEditor, built-in Cocos2d-Java Development Kit and jdk, including interface design, physical system, image packaging, font design and other powerful functions. Eclipse only supports code writing and debugging and simulation.


CocosEditor2.0 Tool


  • Download (go to the official website to download CocosEditor For Java)

Select tool-CocosEditor For Java (Cocos2d-Java)

CocosEditor Official Website: http://cocoseditor.com/download.htm



  • Configure Hello under Windows Development Platform

Note: Do not use spaces or other special characters in the file path in the step;


1. Download the tool zip package, decompress it, open the BINLOG, and find cocoseditor.exe. You can send the icon to the desktop shortcut for later startup;


2. Double-click cocoseditor to start the tool;


3. On the Project page, click Create New Project;




4. Select cocosjava and click next;




5. Specify the project directory location




6. Name "hello" and click "Finish;



7. Confirm creation;




8. Enter the development interface;




9. click the button in the figure to configure the cocosjava project;




10. Click "Green +" to create a cocosjava project;

 



11 name hello, select Main class, select hello module, OK;




12. Run the java project in the green triangle;




13. The simulator runs successfully;



14. Check the configuration and check that the Java Virtual Machine and working directory have been automatically configured;





  • Hello-android

1 File-New Project: Create a Project;


2. Select cocosjava-android and click next;



3. Place the project in the same directory of the hello java project and name it hello-android;



4. Open the project structure dialog box;



5. Open the project structure and add a new android sdk;



6. Click the New button and select Android SDK;



7. Select the location of your Android sdk;



8. Select the corresponding Android SDK;



9. For example, the Android API appears;




10 now Import the hello Module, click "Green +", and click "Import Module;


11 select the hello. iml file, import the hello project module to the hello-android project, and click OK;


12 The following structure appears. Now you need to add reference hello module in hello-android



13. Click the plus sign and select the Module Dependency;



14 select the hello module, OK;




15. The final structure is changed. Pay attention to the comparison;



15 now open hello-android, click Android, and modify the Asserts directory to target/asserts of the hello project;



16 to the following structure, click OK to confirm;



17. The project structure is being configured. Wait for a while;



18 configure the parameters of the android project now;



19. Click the plus sign and select Android Application;



20 name "hello-android", select "hello-android", and select "real-machine debugging". OK;



21. The green triangle control button appears. connect to your android real machine and click "green triangle" to run;



22. android runs successfully;





  • Configure Hello on mac Development Platform
Not released yet. Please wait .....





  • Hello-ios
Not released yet. Please wait .....






Two CDK + Eclipse environment Configuration:

Coming soon .....






Cocos2d-x engine development game, I will only java, not c ++, ask to choose this engine suitable

Not suitable! Cocos2d-x is based on C ++ development, the format used in all is C ++ format. However, if you are good at java, it should be easy to learn. After all, the program principle is the same. The key is that you need to change cocos2d principles, know what is a scenario, Director, layer, Genie, action, and other concepts. It's easy to learn. It will take some time for flexible applications.
Hope to help you.

A few simple questions about the game engine of Cocos2D-X,

1. Theoretically, the cocos2d-x official indicated that the supported platform without a doubt you can transplant, this is its cross-platform advantage.
2. The cross-platform feature of cocos2d-x is embodied in the use of C ++ as programming language development, and provides a solution for compiling and running of various platforms. You can develop your code in any development environment. Your writing process is nothing more than using C ++ to write code logic. Of course, you finally want to deploy the service on various platforms and perform some special operations. For example, for ios, You need to configure the development environment in mac, install xcode, install certificates, etc. For android, you need to install NDK and ADT. I will not go into details. In the specific process, we searched for tutorials on the Internet step by step. First, get caught in a development environment and target platform you are familiar with, such as using VS for development, compiling to Android or xcode for development, and running to ios.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.