Tips: Improve game size

Hi,

I have develop since 2y a game (Stronghold).

​I have learn a few tips:

Compress all you image with tinypng.com (you win 50% of the size of you game)

Choose when you use jpg or png.

For a png choose the number of bits when you save

For a jpg choose the % of quality. If you change the quality from 100% to 90% you can’t see difference and the size is divide by two.

JPG with transparency:

If you want to use jpg and have transparency you can creat mask. (see tuto on mask). The mask will remove all the part you don’t want to display

Use suffix:

You can use suffix to have in the apps different size of each image and choose the good one for each device.

The problem of this use, you apps will be very heavy.

When you build remove all image of suffix you don’t want. If you use  

excludeFiles =  { all="\*@4x.png","\*@4x.jpg","\*@4x.jpeg","\*@8x.png","\*@8x.jpg","\*@8x.jpeg","Thumbs.db"}

You will have a problem because the config file won’t choose correctly files, you have to copy the folder of your app, remove all image with the suffix you don’t want (you can use the search engine in folder). And you have to rename all image you keep.

For that you can use CMD but if you want you can use AntRenamer (it’s free) and rename all file with “@4x” to “”.

Like this it will work properly.

You have to remove also  all “Thumbs.db” file for that you can configure it in build setting file.

With all of that my game was 150mo and now is 50mo in the higher quality.

I am sorry for my English and I hope it can help some of you

Yep, it’s amazing how much 10% or 20% off the quality reduces file size :slight_smile:

Is your game released, or to be released? You presumably know that ‘Stronghold’ is a registered trademark of Firefly Holdings Ltd? I don’t know exactly what territories that applies to, but if I were you I’d be somewhat wary of stepping on the toes of a well known video game franchise with 6 million units sold for the sake of a name.

My game is already on play store and apple store. The license is for computer game, I am not in their market. I don’t do concurrence to them or use their image. Also apple and android are responsable of what they sale.

Not really.  Apple and Google are distributors so if there is any legal action taken it would be taken against you the developer

I always try to use JPEG’s whenever I don’t need transparency. And frequently you can get 50-60% compression on the images without impacting the look.

You can use JPG when you need transparency. But you have to use mask

Yep, it’s amazing how much 10% or 20% off the quality reduces file size :slight_smile:

Is your game released, or to be released? You presumably know that ‘Stronghold’ is a registered trademark of Firefly Holdings Ltd? I don’t know exactly what territories that applies to, but if I were you I’d be somewhat wary of stepping on the toes of a well known video game franchise with 6 million units sold for the sake of a name.

My game is already on play store and apple store. The license is for computer game, I am not in their market. I don’t do concurrence to them or use their image. Also apple and android are responsable of what they sale.

Not really.  Apple and Google are distributors so if there is any legal action taken it would be taken against you the developer

I always try to use JPEG’s whenever I don’t need transparency. And frequently you can get 50-60% compression on the images without impacting the look.

You can use JPG when you need transparency. But you have to use mask