The-Aether icon indicating copy to clipboard operation
The-Aether copied to clipboard

feat: jar size reduction

Open rhysdh540 opened this issue 1 year ago • 7 comments

changes

  • compressed all png images with ect and oxipng
  • compressed all sounds with optivorbis
  • added a small script that minifies json files and re-zips the jar with java/zlib's highest compression setting
  • removed datagen .cache/ folder from jar

should save at least 2-3 megabytes, probably more when combined with https://github.com/The-Aether-Team/Nitrogen/pull/21

I didn't realize that there was a commit naming policy, if necessary I can redo this, but squashing this pr should fix it anyways


I agree to the Contributor License Agreement (CLA).

rhysdh540 avatar Jan 28 '24 19:01 rhysdh540

I can't check this out at the moment, but do block textures like leaves still have their transparent cutout parts made black when opaque with fast graphics? That has been an issue in the past with texture optimization attempts.

bconlon1 avatar Jan 28 '24 20:01 bconlon1

They do. leaves (the berry bush not becoming opaque also happens with the non-pr branch)

rhysdh540 avatar Jan 28 '24 20:01 rhysdh540

Apologies for not having been able to get around to reviewing this yet. We've been in the middle of a porting period which has been taking longer than expected, so I plan to look more in-depth at this after we release the 1.20.4 port and focus on the 1.5.0 update milestone.

bconlon1 avatar Mar 20 '24 18:03 bconlon1

I suggest to please update the description to reflect that you are not using machete anymore, it will probably be easier for the Aether team. Thanks!

mrjasonn avatar Apr 03 '24 01:04 mrjasonn

sorry! it should be more accurate now.

rhysdh540 avatar Apr 03 '24 11:04 rhysdh540

Should I do that by creating a new PR or by switching the branch on this one and merging everything?

rhysdh540 avatar Apr 21 '24 21:04 rhysdh540

Should I do that by creating a new PR or by switching the branch on this one and merging everything?

Switching branch and merge everything then encompass new things and updated things etc (just would be my personal preference)

mrjasonn avatar Apr 25 '24 08:04 mrjasonn

Ended up implementing a different implementation of the first iteration of this as #2196. Keeping the image optimizations to the script instead of manually updating them on the repository is better for future-proofing, and the sound designers are more in charge of the audio optimizations. Using the machete plugin will also likely be better for maintainability from its simplicity.

bconlon1 avatar Jun 19 '24 00:06 bconlon1