- For reducing the size of the game.droid file and game memory usage.
- Textures can be reduced in size by up to 70%.
- Note: Doing this won't guarantee your game will start working in YoYo Loader.
You Will Need:
- UndertaleModTool: https://github.com/krzys-h/UndertaleModTool
- Archive extractor. Example: 7zip: https://www.7-zip.org/
- pngquant Command Line: https://pngquant.org/
- Game files of your GMS game.
Setup:
- Extract UndertaleModTool to a directory on your PC.
- Extract pngquant to a directory on your PC.
- Move your data.win/game.droid to a new directory.
- Make a backup of your data.win/game.droid file.
Step 1: Exporting all embedded texture files
- Open the game.droid file of your GMS game in UndertaleModTool.
- Navigate to the "Scripts>Unpack assets" tab, find "ExportAllEmbeddedTextures.csx" and click to run it.
- A folder will be created in the same directory called "EmbeddedTextures" containing all embedded texture files.
- You do not need to save the game.droid file at this time.
Step 2: Reducing exported texture size with pngquant
- Locate the "pngquant.exe" in your pngquant directory and copy and paste it into the "EmbeddedTextures" folder.
- Launch Command Prompt and change directory to the "EmbeddedTextures" folder:
cd C:\[YourFilepathToTheFolder]\EmbeddedTextures
- Now run the following script in Command Prompt:
pngquant *.png --f --ext ".png"
- This script will use "pngquant.exe" to reduce the size of all textures with no noticeable loss to visual quality.
- Once the conversion is complete, delete the "pngquant.exe".
Step 3: Re-importing all embedded texture files
- Open the game.droid file of your GMS game in UndertaleModTool.
- Navigate to the "Scripts>Repack assets" tab, find "ImportAllEmbeddedTextures.csx" and click to run it.
- Save your game.droid file. It should be smaller in size.
- The "EmbeddedTextures" folder can be deleted.
Step 4: Repacking the assets
- You can now simply drop your new game.droid file back into your APK.
NOTE: Textures can be further reduced from the default pngquant settings, though this will impact visual quality.
- all available options for pngquant can be found by:
pngquant -h