- Add OptiPNG -

Discussion and feedback on Construct 2

Post » Sat Jan 04, 2014 10:02 pm

Just a little idea for big project and well especially for mobile project (well efficient on pc game too).

Why no add an option for using OptiPNG in a release/gold build.
>> http://optipng.sourceforge.net

i personally use it with -clobber -o7 *.png on the directory of data of C2 output.
it's a long process (so the option need to be unchecked by default) event on my intel I7 core but it have really great result in space.

maybe a thinks to add for and future release (not to hard to add ;)).
B
85
S
14
G
6
Posts: 72
Reputation: 7,237

Post » Sat Jan 04, 2014 10:36 pm

There is already some image compression proposed when exporting in Construct 2.
Adding even more compression to it is kind of useless.

One issue with compressed images is that once they are downloaded, they get uncompressed in memory.
So on mobile, the download size is not really that much an issue as the uncompressed size in memory.
And more "optimization" on that end would just end up with people still using too big uncompressed images and wondering why they blow up their mobile's memory in the end.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
291
S
114
G
95
Posts: 7,293
Reputation: 70,144

Post » Sat Jan 04, 2014 11:21 pm

the compression of the file and the memory it take are just 2 different thing at all.

you could use bmp file if it doesn't matter.
file size = memory size.

I know that C2 allready have some optmisation on png the most major one is the "atlas" way it use to eleminate duplicated sprite from the same source.

OptiPNG just optimise the png file without loose quality and don't change decompression time significatly (and after all the memory take is the same).

BUT in mobile, where the actual solution Cocoonjs or IndelXDK take a big part of the project place (xx MO), THE SIZE IS REALLY IMPORTANT.
You can MISS players just because the game is too heavy to load with a slow connection.
And it's exactly the same problem with HTML5 game.

More the data will be small, less the loading date will be (downloading the data) the most important point for mobile+html5 plateform.

For the people using badly Construct2 that an other problem, tell all programmer that come from classic C/C++ background on any SDK from any mobile plateform and they will not have any problem with C2.
C2 just give people without any technic or programmer skill the ability to make visually code.
But they just have to learn and understant some limitation for the target hardware, the blog post : https://www.scirra.com/blog/112/remember-not-to-waste-your-memory

what done in that way, for people without programmer skill to learn that all hardware as limit :)

But we can't not use a tool for make some optimisation because of fear that some people will make bad use if it (Just Uncheck this option by default :))
B
85
S
14
G
6
Posts: 72
Reputation: 7,237

Post » Sun Jan 05, 2014 10:37 am

We already use 2-3 PNG tools to optimise the file size on export, but this is always done losslessly (unless you change the image formats in C2). I doubt OptiPNG could beat this losslessly. What kind of file size savings are you seeing and are you using settings that degrade quality (e.g. forcing 8-bit PNG)?
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,506

Post » Sun Jan 05, 2014 12:54 pm

i just use a basic command
optipng -clobber -o7 *.png

depending of the project and the number of file asset i've very low optimisation (< 5%) or more efficient use (>15%).

in general Construct2 make really good png export with little sprite or sprite that i've imported in a single file, for exemple hud button, title ect...
For more important bitmap (background or heavy sprite), opti png make some good result sometime :)

B
85
S
14
G
6
Posts: 72
Reputation: 7,237


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 20 guests