What does the Minify Script actually do?

0 favourites
  • 5 posts
  • I know it does make the download "smaller and harder to decompile" but by what means?

    At first I assumed it would resize pictures and compress audio (in case I have a 10 megapixel background image I forgot about etc). It could also delete unused things I added to the project. Another thing it could do is renaming assets (e.g. to "3241.ogg" instead of "Super Cool Corporate Music Bought at xxxxx.xxx for five dollars.ogg").

    Does it do any of the above? If not, what does it do?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • pirx

    export your project with minification and without,

    then look at the source code of c2runtime.js

    and you will see what it does

  • I'll do that when I'm at my c2 computer. But solely from your reply I infer that probably all it does is a messy js file <img src="smileys/smiley2.gif" border="0" align="middle" />

    So anyway it would be nice to have a script that does the things I mentioned one day.

  • See also: Construct 2's export-time optimisations.

    "Minify script" itself does not do what you suggested, but a bunch of similar optimisations happen anyway. "Minify script" actually means to run c2runtime.js through Google Closure Compiler's advanced mode. This makes the script much smaller and much harder to reverse engineer in to a project (which would have been very hard to begin with anyway).

  • Thanks for the clarification Ashley. I've just looked at a minified c2runtime and surely it wouldn't be easy to make sense of, let alone turn back into a project.

    As to the link, I'm very interested in what optimizations are happening under the hood... and it turns out there's quite a lot of them. Great!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)