Cocos2d-java Game engine birth record

Source: Internet
Author: User
Tags lua

Summary : Cross-platform Cocos2d-java game engine and matching CocosEditor2.0 game development tools bring the Gospel to many developers, using the Java language to develop cocos2d Cross-platform game out.

Cocos2d-java's birth background ~

All along, in Java and C + + two languages, PK is very powerful, whether in the programmer's circle or the language of the leaderboard, always hear a variety of words of war and controversy. C + + direct control of memory and its unique efficiency, is a lot of game engine to choose it, but because of C + + itself difficult to learn, so many developers are daunting, and Java because easy to learn, flexible and fast features widely welcomed by programmers, and many games need rapid development of transplant release, Can't blindly pursue the game high performance misses the changeable market, performance and agile development need to find the balance point. Cocos2d-java team in the continuous attempt and successive improvements in the Cocos2d-java, the technology is mainly relying on cocos2d-x, just a layer of JNI package, at the same time produced a set based on IntelliJ The plugin development tool on idea cocoseditor.

Cocos2d-java Principle and Performance ~

principle : Similar to js-binding and lua-binding, the use of JNI way to encapsulate Java C + +, so all the foundation is still cocos2d-x;

performance: ported to Android: higher than Cocos2d-js; ported to iOS: Same as Cocos2d-js

Why you can cross-platform Android and ios~

Porting to Android, naturally, can be ported to iOS, because iOS itself does not have a Java virtual machine, and the Cocos2d-java team modifies an open source project avian (Java Virtual machine), which is packaged in a user-developed iOS game, So the successful implementation of Cocos2d-java running on iOS system, development tools Cocoseditor after your development project compiles all Java code will be compiled into iOS available. A library, using Xcode to import the library and the Java Virtual Library, porting can be done easily.

CDK (Cocos2d-java Develop Kit) Development Kit ~

CDK is a Cocos2d-java development package that can develop Cocos2d-java games through any Java development tool, such as Eclipse. Of course in the development tool Cocoseditor, it is already built in;

Bin directory : stored in the computer operating system running Java Virtual machine, as well as cocos2d-x C + + Core library are playing in the DLL file;

Extreas directory : Store third-party libraries, including advertising, payment, sharing, etc.;

Lib directory : This is where the JNI libraries dealing with the underlying C + + are stored, the core of the entire Cocos2d-java

Engine API structure, basic compliance with-X,-JS structure, including Sprite, Direction, Layer,event,particle,ui,audio and other basic concepts; the right side can clearly see how JNI is defined:

Public native static Sprite create (String fileName);

Cocos2d-java code style. See the following code style, the function is: Create a new wizard, set the relevant properties, join the root node, and then Runaction. Basic as long as familiar with cocos2d children's shoes are likely to start soon;



CocosEditor2.0 Tools Introduction

Cocoseditor2.0 is a mobile game development tool based on the IntelliJ idea Open platform, which runs on the WINDOW/MAC system, and the 1.x version supports the JS and Lua scripting languages. The 2.x version is temporarily supported in the Java language, and all game release packs can be quickly ported to Android and iOS platforms. Tool collection code editing, can be seen in the scene design, animation, font design, picture packaging, particle editing, physical systems, maps and other functions, and debugging convenient, and real-time simulation. If you are interested to know the source of the tool, you can directly view IntelliJ idea Community source, in addition to Google's Android studio is derived from the IntelliJ idea open platform

Next is about more detailed introduction to the CocosEditor2.0 tool >>> View the remaining full text

Cocos2d-java Game engine birth record

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.