TIPS FOR FILE SIZE REDUCTION/COMPRESSION OF YOUR PROJECT

Posts

Pages: 1
Hellows fellow RPG lovers!
I didn't find any tutorial section, so I figured this might be a good enough place to share some tricks I have come up with for reducing the size of the game.

I am sure many of us would have loved to try out certain games, but we ended up hesitating to download because of huge file sizes. Happened to all of us at least once, right? It's like people wanting to avoid doing the sidequest of killing that giant with huge amounts of HP.
Especially after the release of RPGMV, I see some games which cross 400-500MB in size even after they use the exclude unused files option.
Though most developers understand it, some developers might question the importance of cutting file sizes, so I am going to point out a few benefits anyway:

- Faster uploading on multiple locations for the developer.
- Faster downloading for players.
- Players will feel less hesitant to download your game. (especially those on a slower internet)
- Sometimes bigger filesizes generate bigger expectations that the game has a huge amount of diverse contents. When that is not the case, it only brings about disappointment.
- For those wishing to create android versions of the game, google play store apk size limit is 100MB. Now unless you wish to add external download sources for your android game (which is not easy for non-programmers), you will need to keep the file size below 100MB. Now this might seem unrealistic for your standard epic RPG with open world and diverse graphics, it is certainly possible without any significant reduction in quality.

I want to share some of the techniques I have used to reduce the file size of my game by over 60% AFTER excluding the unused files.

Manual Exclusion:

Even after using the exclude unused files option while deploying your project, you will find that some unused files often remain, most of which are image files. In my case multiple system files and all the extra titlescreen images still remained after the exclusion and I managed to reduce about 15-20MB by deleting them manually after the deployment.
Additionally, this has nothing to with file size reduction, but it is recommended to check if used files got excluded aswell. Sometimes the files that are linked with plugins get excluded as well as the engine can't recognize their use. A good example would be enemy's attack animations.

Pictures:

This is where the maximum file size reduction can be obtained.
PNG files especially ones used in RPGMV can be quite big in size, much more than they ought to be. I figured that the only way to reduce my game size further would be to compress the PNGs, but I didn't want to lose any quality either, so I tried downloading softwares which provided advanced lossless PNG compression. But it barely gave my like a 10% filesize reduction, and I lost all hope as if I went deep into a dungeon and ready to fight the final boss, but fighting all the small fries along the way made me use up all my supplies and my mana, and I can't go back either.
It was then that I suddenly found a secret treasure hidden very near the boss, which gave me all the items I needed for beating the big progress blocker. That treasure was in the form of advanced lossy compressions.
So wait?... If it is lossy compression technique, it probably reduces quality as well, right?
That's what I thought at first, so I was reluctant to open the chest containing the treasure, fearing that it might be a trap or a mimic... but it turned out it wasn't!
Check the two RTP images given below:

Before Compression - 341kb


After Compression - 66kb


Now, I'm too lazy to do the math (just like I was back in school), but I presume that's about 80% in file size reduction.
Yup, and that's lossy as well, but I got a fairly good set of eyes and they can't tell any major difference in quality between the two.

This applies for animations, tilesets, charsets and every other RTP graphics that you are using.
However, they did a pretty good job compressing the battlebacks along with the version 1.1 update, so you won't need to take the extra effort to compress them. You can still get another 20% reduction if you compress them though.

So how to do it?

- Download any compressing software that gives advanced lossy compression, don't go for ones that claim to be 100% lossless.
- Or, you can compress them from tinypng.com. Basically as a free user you may only be able to upload 20 at a time, so it might take a while to get all your graphics compressed, but I guarantee it's worth the effort in the end. 

With these techniques I managed to save at least around 90-110MB, it maybe more for larger games.

Audio:

Audio can be the most difficult part to compress or cut down on size. Lossless audio compression is very difficult, and reduction in audio file size will most likely give a noticable change in the quality of your music. It's like making a moral choice in a game, where you get to choose to save one and let the other die. We normally end up saving the cute girl and letting the dude die anyway though.

Here are some points that I suggest, though these are more of opinions than facts though:

- Sound quality matters if your game is for PC or MAC, but not to the point that it does on high end AAA games. Personally, I believe that quality of the music should be at par with the quality of graphics that you are using in your game. There is no point in having 300MB of music for a game that has only 100MB of other resources. I believe using the compressed RTP audio files that came with it are good enough for your PC game if you are using RTP resources. External music you will use will probably be comparatively higher in size, but I recommend compressing them to around 1MB to 2MB based on your needs.

- Android users wouldn't really care if your audio is HQ or not. To meet the 100MB requirement, you will need to compress both your pictures as mentioned above, and your audio. I would prefer to keep my BGMs around 200-400KB each for the android version of my game.

Miscellaneous:

The audio and the images take up maximum space in any RPG Maker game. However, there are a few more points you can take a look at before you put your game out there:

- Remove all unused plugins from the plugin manager, do not keep them in OFF as they will not be excluded when you deploy your project.

- Reduce the maximum number of items, skills etc. after you have finished making them. For example do not keep a maximum of 500 skills if your game uses only 100 skills. This will reduce it's feel size a bit as well.

- Pretty basic, but it's always good to use the "Best compress" option in WinRar after everything else is done and you compress your game/demo and put it out into the ocean.


Well... that's pretty much all for now, I will add some more points if I learn anything else along the way. Please feel free to add your tips as a reply if you have something to share.

Thanks for reading my post and have a great day.
You're awesome!
NeverSilent
Got any Dexreth amulets?
6299
There is in fact a tutorial section on this site, but since tutorials are meant to be engine-specific, this would probably be more useful as an article instead. You can add things to the articles section right here (check out your top bar under the header "Submissions" as well).

By the way, I don't actually see any images in that section about picture compression. And in your second paragraph, the sentence starting with "Most of my" seems to have been cut off or left unfinished.

Thanks for sharing this.
Thanks, I just realized that there was a tutorials and articles section outside the forums after posting it, and tried to delete this post, but I couldn't.
Anyway, I have edited the thread and the pictures should be visible now. I will post it up as an article anyway.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
First of all, I wouldn't worry at all about pictures. They typically make up less than 5% of your file size. Audio nearly always makes up more than 80% and typically makes up about 95% of your file size, and is the only thing that's ever worth worrying about.

Second of all, I wouldn't actually recommend reducing the quality of anything in your game, beyond converting your .WAV music and sound effects to .MP3 or .OGG. The quality of RPG Maker games is bad enough already, and no one actually cares about the file size of your game unless it's more than about 2GB, which it isn't unless you're Xenomic.

Deleting unused plugins and reducing the database size is absolutely not something you should ever do. You will cut off like 2KB of file size in exchange for making it more difficult to edit your game later and often inadvertently causing bugs in the process.

In fact I wouldn't actually even recommend compressing your game in a program like WinRAR, as RPG Maker already compresses your game when it creates the installer. The difference in download size is not worth the hassle of having a zip file instead of an installer, since many less experienced computer users have little or no experience with zip files and don't understand how they're different from folders.

It's not 1998 dude, no one is on dialup.
Maybe that was the case in older versions, but if you are creating a game with the modern RPG Maker MV, you will realize that the pictures take up way more space than it should AND if you can reduce over 80% of image size without any noticable loss of quality, then WHY NOT? I managed to reduce over 100MB in pictures for a 300MB game, so I might not be good at maths but that's not exactly 5%, now is it?

About the music and sounds, I agree.
But I mentioned in that part it was more of an opinion than facts, so it was a subjective viewpoint. The part about android though, no one wants 6MB music files on an android RPG game.
It is true nobody cares about file sizes that much these days on the PC platform, but on android and iphone, it's a completely different story.
Also even on PC, I have seen many people complain if the file size of the demo is too big.

About the unused plugins, maybe you misunderstood what I tried to say. I did not mean manually removing it from the database. If you remove it from the plugin manager section in MV, it will cause the same amount of inconsistency if it is used, if the file is OFF. This is pretty specific to MV, I do not recommend deleting unused plugins manually either or deleting scripts manually in other editors.
Currently, there is no simple way for non-coders to easily link an external download for RPG maker games, so the average developer HAS to keep his game under 100MB to release it on the android playstore.

And finally, thank you very much sir for reminding me it is not 1998.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If you're worried about the Android Play Store file size limit, you should have your game download additional resources automatically after being installed, which is how every other game on the Android Play Store gets around the problem. Surely a script to do this was among the first scripts anyone ever made for RPG Maker MV...?
I have never heard of any such plugin, and I check all the top plugin sites and forums on a daily basis to stay updated on RMMV stuff. If you know of any such plugin, please feel free to share.

To be honest, exporting the game to android properly itself is not a direct process since RMMV only creates a www folder. The compilation of the package has to be done manually or by uploading it to intel xdk. Since RMMV does not directly operate with the apk file (as it will be a violation of google's policies), making such a plugin won't be a piece of cake for any programmer.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
It's possible I have too much faith in scripters. You'd think that would be a built-in core script in MV, if it's designed for Android development and the RTP is larger than will fit in an Android app.
Well, I really hope you're right.

But in the meantime, I don't see why I shouldn't compress my images and save hundreds of MBs of data without any noticable loss, and be able to release my game demo on google play.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
100 MB of images is a little crazy, I don't know that I've ever seen an RPG Maker game with that many graphics files unless it included another four games worth of graphics that it wasn't actually using. But if you're actually using all that shit and you're releasing your game on mobile, then I guess it's a problem you have to solve.

My experience with image compression is that it has always been incapable of handling the edges of the transparencies in a way that doesn't look like shit. Did you find a compression program that doesn't have this problem? I would be super interested to know which one if so, since Photoshop sure can't do it. Your two versions of the cactus hippo look similar enough on a solid white background, but looking good in a game where they move around on a complex background is another matter entirely.
It is, RPGMV is designed for higher resolutions, for starters the default tilesize if 48x48 whereas it is 32x32 for VXAce. If you are using RTP, just the default animations is over 50MB in size. An single average tileset is around 1MB in size.
The reason for this is because they have officially removed all resolution restrictions, and any developer can create a 1280*720 game or 1600*900 game or any other size they want, hence higher resolution images are also essential.

Photoshop by default does not have the option to make a compression like this, but there is a plugin for it that you can use.
I have a pretty good eyesight and didn't notice any major difference, even on a dynamic background. You can use the compressed cactus hippo thingy in a sample project just to try it out.
Ratty524
The 524 is for 524 Stone Crabs
12986
The compressed hippo has a bit of grain going on with its shadow, but it's such subtle difference.

This is useful infomation. Also, for demos, I almost always create a copy of the project folder and delete any assets that I know won't be experienced by the player during the demo.

What people hate about download sizes in general is the time it forces you to take before actually playing a game, and for a demo which will only provide a fraction of the experience? That's a pretty big deal breaker.
Thanks, in MV though, we have the option of exporting the package only with the files that were used in the project, unused resources that won't be experienced by the player will be automatically removed.

Exactly, the same thing happened to me to. If I come across a game or demo that I really like, I don't hesitate to download regardless of the size. However, if it's a game that seems somewhat good, and I am thinking about giving it a try, in that case I will hesitate to download if the file size is too big. I have found myself clicking the back button and go on to browsing other games.
Pages: 1