- Nov 23, 2021
- 16
- 47
Let's say you're a dev of renders based RenPy VN. You will have tons of renders to show different situations and scenes.
But while pursuing higher quality images we're often end up with a lot of disk space used. That's where first step to reduce your game filesize is to use WEBP images format instead of PNG or JPG,
that saves us up to 30-50% of filesize depends on conversion settings, usually without losing visible image quality. Example pic below was reduced from 2.69 Mb to 1.97Mb.
But you'll still have tens of thousands renders with ~1-2Mb each? And some of them showing just a little detail changed, like facial expressions or hands movement. And you still have whole separate render just for that. What can we do to reduce filesize even more?
Next step would be to try and strip renders with small changes of similar picture areas to make them transparent and use as sprites on top of background image. So you can leave only face or hands or whatever part of that render has changed since base (background) render). So you go to Photoshop (or any similar software) and manually erase areas where there were no changes.
But that's one render. And you have tons of them.
So we would like to automate this process. That's why i've created this tool
Example of How-To (StormSide MC's Dad scene):
1) we have 6 renders ~790Kb each, total of 4.6Mb:
2) we open the tool, we drag first image that would be used as background:
3) then we select images to be cleaned up into sprites into second field:
4) then we select output folder and other settings (do not forget to hover over each setting and read pop-up hint and do not be afraid to try different settings: tool will not alter original files)
5) press "Convert!" button and get the results:
Now we've easily reduced filesize even further, from 4.6Mb to 890Kb. Results vary depends on each renders batch due to images content, how small are the changes and what settings did you use.
All you have to do now is to code that "background with sprite image on top" system into your game!
Have fun and have mercy on your game players' disk space and net traffic when they download your game!
Any suggestions or code improvements are welcomed!
I've created this tool for Atemsiel to help with his game, but overall this tool is free to use and fork/modify.
But while pursuing higher quality images we're often end up with a lot of disk space used. That's where first step to reduce your game filesize is to use WEBP images format instead of PNG or JPG,
that saves us up to 30-50% of filesize depends on conversion settings, usually without losing visible image quality. Example pic below was reduced from 2.69 Mb to 1.97Mb.
You don't have permission to view the spoiler content.
Log in or register now.
But you'll still have tens of thousands renders with ~1-2Mb each? And some of them showing just a little detail changed, like facial expressions or hands movement. And you still have whole separate render just for that. What can we do to reduce filesize even more?
Next step would be to try and strip renders with small changes of similar picture areas to make them transparent and use as sprites on top of background image. So you can leave only face or hands or whatever part of that render has changed since base (background) render). So you go to Photoshop (or any similar software) and manually erase areas where there were no changes.
You don't have permission to view the spoiler content.
Log in or register now.
So we would like to automate this process. That's why i've created this tool
You must be registered to see the links
Example of How-To (StormSide MC's Dad scene):
1) we have 6 renders ~790Kb each, total of 4.6Mb:
You don't have permission to view the spoiler content.
Log in or register now.
2) we open the tool, we drag first image that would be used as background:

3) then we select images to be cleaned up into sprites into second field:

4) then we select output folder and other settings (do not forget to hover over each setting and read pop-up hint and do not be afraid to try different settings: tool will not alter original files)
5) press "Convert!" button and get the results:

Now we've easily reduced filesize even further, from 4.6Mb to 890Kb. Results vary depends on each renders batch due to images content, how small are the changes and what settings did you use.
All you have to do now is to code that "background with sprite image on top" system into your game!
Have fun and have mercy on your game players' disk space and net traffic when they download your game!
Any suggestions or code improvements are welcomed!
I've created this tool for Atemsiel to help with his game, but overall this tool is free to use and fork/modify.