First of all, it is really too busy recently, a long time no blog, and today just have time to write about the recent in the game of some discoveries;
In other words, based on the COCOS2DX engine + script to write games, the feeling is that can be incremental updates and instant compilation, and so on, saving a lot of time; okay, no more nonsense, go to the point;
Here I take cocos2d-x-2.2.2 as an example < Actually, write the article when cocos2d-x-3.2 are sealed version >;
Today I will say how to use cocos2d-x3.2 in Cocos-console to bulk encrypt LUA scripts-into luac files, JS files into JSC encrypted files < In fact, very simple line of command can, of course, I here is a Mac platform for example;
Description: This chapter is to teach you to use the Cocos-console in cocos2dx-3.2 to bulk process a path of LUA file encryption to luac the specified path, reducing the hassle of using the previous Luajit+shell script:
First, go to the cocos2d-x-3.2 in the Mac terminal to specify the path: for example, my:
/users/ Your user name /cocos2d-x-3.2/tools/cocos2d-console/bin
You can then enter the./cocos luacompile-h command and the relevant usage instructions will appear,
You can then follow the instructions to do the operation;
Like I'm typing.
./cocos luacompile-s/users/your username/desktop/lua-encode-oldfiles-d/users/ Your user name /desktop/lua-encode-finish
-S: The original path of these LUA files to be encrypted < can also be assigned to the game Engineering src directory >;
-D: The path to storing these encrypted LUAC files < If it is still in the SRC directory of your project >
See
Ok! Here our LUA encryption for LUAC is done, isn't it simple! Now we say JS encrypted into JSC file, the same reason and LUA encryption, in order to save time I directly:
Ok! It is super simple and saves a lot of time.
Next time, talk about the Mac platform for iOS porting to the Android platform! In fact, it is very simple, look at the internet a lot of writing is too complex,
Please look forward to it!