Cocos2d-x--ios platform LUA encryption into Luac resource method and JSC file <mac Platform Development trial--windows Platform Research >

Source: Internet
Author: User

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!




















































































































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.