Introduce TinyDrop – Unity3D atlas optimization

BlogLogo

TinyDrop is a PHP script which use Dropbox API and TinyPNG API to optimize automatically your Unity3D atlases.

What was the problem in the first place?

We’ve got a game called “Angry Jew” – Site | Facebook page

Now, for Android if you pass the 50MB the user needs to download another extention of your app. so…we’ve passed the 50MB.

beforeAs you can see it’s not much above 50MB. but the 51MB build is after we managed to reduce all the sound files. and the only thing that left is the atlases wich takes a lot of space. every compression i’ve tried inside Unity didn’t do much.

So we were looking for a solution and we came across TinyPNG, which is an amazing compression engine for PNG files. it can reduce up to 95% of PNG file…that’s crazy!

But their site gives you the option to compress only one image at a time. nobody wants to sit after every build and manually do that…that’s what Hell is for.

The solution

So…after looking at the TinyPNG Developer section, i realized i read really slow and that i can compress through their API automatically. but, there’s a new problem…i need to upload the files again…manually…which is also belong to the Hell section.

After searching for ways to upload files to the server automatically from my local computer  (and if you know a solution with PHP i would like to know how) i’ve remembered we’ve put our project on Dropbox. so maybe they have something that can help. well…they do!

So i’ve take the time to connect everything and this is how good it works:

afterApproximately 39% compression ratio (if i remember how to do math). this is a Game-Saver literally.

What TinyDrop does?

TinyDrop, after the first init, will let you choose the atlases you want to compress, and then with a click will get them from your Dropbox, compress them with TinyPNG and upload them again to your Dropbox. it will even check to see if you’ve already compressed an atlas and will skip it.

Screenshots

after1

after2

after3

Issues

  • If you’ve got graphics with gradiant opacity it won’t compress well, so you can put all those images in one atlas that will be left alone
  • If you find more issues please let me know…i’ll update the docs

Links

TinyDrop on Github

Got question?

Post them in the comments, i’ll do my best to answer…

 

Comments on this post

No comments.

Leave a Reply

Trackbacks and Pinbacks on this post

No trackbacks.

TrackBack URL