Tutorial Others Making Your Games Smaller w/o Quality Loss - PNG, JPG, MP3 Optimization

gamersglory

Xpression Games
Donor
Game Developer
Aug 23, 2017
1,356
3,557
WebP can be lossy just like PNG8 depends on settings on xnconvert set the webp converter to webp lossless
 
  • Like
Reactions: Canto Forte

CobraPL

NTR PALADIN
Donor
Sep 3, 2016
1,924
3,781
30-09-2020 - I added TruePNG to exceptions, because it hangs sometimes.
 

Zero_G

Newbie
Jun 14, 2017
75
167
WebP for RPGMakerMV:

DynamiteRedGames said:
The JavaScript library that RPG Maker MV uses already supports WebP image files, but the developers of RPG Maker hard coded the ".png" file extension into its ImageManager.loadBitmap() method, which you can find in rpg_managers.js One solution would be just to edit that file and replace ".png" with ".webp". This however would force you to use WebP for all of your images, including tilesets, system images, etc. I wanted a hybrid approach so that I could use both PNG and WebP files, so what I did was override the ImageManager.loadBitmap() method in a separate plugin, and added a bit of code to check if the PNG file exists. If the PNG doesn't exist, then it trys to load the file as .webp instead. Another unrelated change I made was to change RPG Maker's error handling of missing image files so that the game doesn't hard crash, but just loads a blank texture.
Couldn't find that script, so I ended up making one myself. No loading blank textures on missing files, that would be bad when trying to debug a game.

Be careful though, as this script overrides 3 methods (couldn't do an alias), so if a plugin in the game already did an override of any of those methods, it will break the game. It's easily fixed if you know minimal Javascript to adapt the script.
 
  • Like
Reactions: Darksshades