FreezingMoon / AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺
https://AncientBeast.com
GNU Affero General Public License v3.0
1.65k stars 568 forks source link

optimize image assets #1500

Open DreadKnight opened 5 years ago

DreadKnight commented 5 years ago

All image assets from the project should be optimized when building for production before being copied to the /deploy folder, using some webpack plugin that relies on imagemin npm package. This should make the game way smaller to download and therefor faster to play, especially in the long run (sprite sheets).

https://github.com/itgalaxy/imagemin-webpack https://github.com/Klathmon/imagemin-webpack-plugin https://github.com/tcoopman/image-webpack-loader

ashik112 commented 4 years ago

Do you want lossless or lossy optimization?

DreadKnight commented 4 years ago

@ashik112 probably lossless to start with and move from there. File formats need to remain the same.

DreadKnight commented 4 years ago

@ashik112 about that, I tend to manually optimize files using https://tinypng.com or https://tinyjpg.com

DreadKnight commented 4 years ago

If we're going for lossless, it would be ok to optimize them directly in the assets folder, to be used for development purposes too and cut down times even when building for production, just copying them to deploy.

ashik112 commented 4 years ago

@DreadKnight okay. I will look into it.