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.