Safe Code

Forum Home Forum Home > Construct 2 Development > Javascript SDK development
 Post Reply Post Reply
Author
610 Rep
Post Options Post Options   Quote rafhelp Quote  Post ReplyReply Direct Link To This Post Topic: Safe Code
    Posted: 30 Mar 2012 at 12:15am
I develope a HTML5 web based game. Ive written a custom plugin for it. It uses an external Javascript file which has to be included in the server install.

I export the game and upload to my server. Is my plugin code etc.. safe or can it esaily by downloaded, decompiled etc..

Can I somehow obfuscrate the external js file I use in the plugin
Back to Top

Scirra Developer
84,379 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 30 Mar 2012 at 2:42pm
Your plugin code is safe as long as the user selects 'Minify script' on export. This compresses and obfuscates the code which should make it very difficult to reverse engineer.

External scripts are not minified. You can minify them yourself if you like with Google Closure Compiler.
Back to Top
610 Rep
Post Options Post Options   Quote rafhelp Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 2012 at 8:13pm
if i put a external javascript file in a plugin folder (used in the game) will the script be minified and included in the exported html5 files automatically
Back to Top

Scirra Developer
84,379 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 2012 at 8:20pm
No, it won't. You can make Construct 2 copy it to the export directory by adding it as a 'dependency' in plugin settings, but it won't be minified.
Back to Top
610 Rep
Post Options Post Options   Quote rafhelp Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 2012 at 10:39pm
is there a tutorial for that?
Back to Top
10,252 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 2012 at 11:21pm
@rafhelp

See edittime.js in official facebook plugin
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down