Why is there a crash?
The difference between quick and cocos2d-x
What parts does quick consist of?
Should I choose Lua or JavaScript?
How to get started quickly
Why is there a crash?
Cocos2d-x is a game engine developed with C++, and its architecture design and API are basically copied from cocos2d-iphone (an iOS game development engine developed with Objective-C).
Because C++ has higher requirements for developers, NetDragon Technology uses the tool of tolua++ to convert the C++ interface of cocos2d-x into lua interface (this library that exports C++ interface into Lua interface is usually called luabinding). Let developers use Lua, an easy-to-understand scripting language, to write games, thus greatly improving the development efficiency.
About the first half of 20 12, our company began to use cocos2d-x+Lua to develop games. However, it was found that there were still many imperfections in cocos2d-x's support for Lua at that time. So I rewrote the whole luabinding support code, which solved the problems of memory leak and callback using only global functions.
After the release of cocos2d-x 2.0, luabinding has made many improvements and improvements. Up to cocos2d-x 2. 1.4, the whole luabinding has been quite stable. Therefore, games like "I am MT" and "Big Head", which make money like printing money, all adopt the solution of cocos2d-x+Lua.
Unfortunately, the cocos2d-x team has been vigorously promoting the JavaScript solution of cocos2d-x since 20 12, so there is basically no big move in Lua support. From the point of view of our developers who use Lua solutions, luabinding needs more powerful functions, so this is the initial reason why we developed quick.
Quick's goal:
Shorten the learning curve
Improve ease of use
Create a streamlined architecture that is easy to expand.
The difference between quick and cocos2d-x
Although cocos2d-x luabinding is perfect, it still needs a lot of basic work to develop a game.
It is the most basic work to repackage the C++ interface exported by luabinding into Lua-style interfaces. The repackaged interface should be easier to learn and use, and some data format conversions between C++ and Lua should also be hidden. This is the first goal achieved by quick.