Cocos2d-x Learning (3) development languages supported by cocos2d-x

Source: Internet
Author: User

In cocos2d-x learning bit by bit (1), I thought that cocos2d-x can only use C ++ as the main development language, and later found on the cocos2d-x's official website, it supports Lua and javascript:

As shown in, "O" indicates "OK ".

  Platforms C ++ Lua Javascript
Mobile Platforms IOS O O O
Android O O O
Windowsphone8 O    
Bada I    
Blackberry O    
Meego I    
Marmalade O    
Desktop platforms Win32 O O O
Linux O O  
Win8 Metro O    
Mac OS X O O  
Native Client O O  

Compared with the downloaded EngineCodeAnd the findings are also quite clear:


From top down, representing the core library folder of cocos2d-x, C ++ example, JSExampleAnd Lua'sExamples: in the sample code of JS and Lua, apart from starting to use C ++ for startup guidance, the core code is written to the JS file and Lua file, cocos2d-x uses third-party library to support scripts, for example, JS is to use the cross-platform spidermonkey, a Javascript script engine implemented by C language; and Lua itself is compiled by standard C, almost all operating systems and platforms can be compiled and run.

That is to say, developers can use JS scripts or Lua scripts to complete all development. This is a good news for professional Lua or JS developers.


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.