Killer.Penguin Posted February 3, 2014 Share Posted February 3, 2014 Ok, I've decided to code most of the things in UnigineScript. However, I don't get how you compile the final release built. Is there a final compiler? Or do we just copy all the files into a new folder? If so, how do I protect the codes from being modified? (I don't really don't get scons on your tutorial page at all. I tried to follow the instruction, but I couldn't get it working. Does it help with this aspect?) Best, Link to comment
frustum Posted February 3, 2014 Share Posted February 3, 2014 Source code is node required for release builds. You can exclude scripts easily. world_load console command treats second command line argument as script cache name. So if you will use the following world_load command with release engine builds (it's important to use same binaries during compilation and execution): world_load my_world my_cache As result you will have my_cache.cache file in the specified directory. After that you can remove all you sources and still using same world_load command to load you worlds. Moreover this drastically speedups the loading time if you have large source code database. Different engine binaries (debug/release/version) have a different functions scope. Because of that script cache depends on binary type version. Check the world_load command in the OilRush game. Link to comment
Killer.Penguin Posted February 3, 2014 Author Share Posted February 3, 2014 Urghhh... :blink: While I really appreciate your help and kinda get what you mean (using caches and delete actual codes), I still have no idea on how to go about actually doing it... When you said 'compilation', is that done so manually via command line or do you mean engine compilation at the start of program execution? Is there a tutorial or any short guide on this? :mellow: Link to comment
Killer.Penguin Posted February 5, 2014 Author Share Posted February 5, 2014 Hmm.. do you mean that I should run the game, then open the console command and use "world_load" with cache option to load all my scenes one by one to create cashes of all the scenes I have? What if I have a lot of worlds that need to be constantly updated? I also have a lot of linked asset that need to be loaded from its path name, will this be cached too? What about all the Unigine codes, will there be a final compiler to protect them from hacking? Link to comment
elvieness Posted February 5, 2014 Share Posted February 5, 2014 Hi, Please, see https://developer.unigine.com/en/docs/1.0/scripting/language/cache Link to comment
Killer.Penguin Posted February 5, 2014 Author Share Posted February 5, 2014 Do you mean that I should edit "launch_release.bat" and add cache file name to "world_load"? After that I can delete the whole data folder? Link to comment
Killer.Penguin Posted February 5, 2014 Author Share Posted February 5, 2014 Well, I tried it. It kinda works as in a sense that I can delete Unigine's codes from my game folder. However, I cannot remove any of files with the XML format from the game, otherwise the game lost all its resources. Needless to say, XML files like .world are really easy to edit. Wouldn't this expose the game to the hacker then? Link to comment
binstream Posted February 5, 2014 Share Posted February 5, 2014 Use Archiver tool with a password to pack resources into protected .ung packages: https://developer.unigine.com/en/docs/1.0/tools/archiver/ Link to comment
Killer.Penguin Posted February 5, 2014 Author Share Posted February 5, 2014 Arr I see, I thought achiver is only used on . Ung files. Was wondering what those . Ung files are. Can we use path to load node with it though? Link to comment
binstream Posted February 5, 2014 Share Posted February 5, 2014 https://developer.unigine.com/en/docs/1.0/principles/filesystem#file_packages Link to comment
Recommended Posts