Tips for optimising your VN's filesize


Filesize optimisation is something that, honestly probably really doesn't matter a whole lot, especially if your game is only a little over 100mb. Despite this, it's something I find myself weirdly caring about, and I put decent bit of care in most of my own VNs to keep the filesize down, Ren'py itself already takes up 20-40mb the fat bastard! As a result, I originally wrote a small guide on it in the patch notes for SHOW ME THE BODY, and I figured it'd be nice to repost those thoughts instead of keeping it tucked away on the patch notes of one game! I hope these tips can be somewhat helpful, and maybe even teach you a bit more about files formats and filesize optimisation in general!


Audio optimisations


Audio is the big thing that can bloat your VNs size. It will probably take up the most space in your project, and has been the case for me in the past (maybe not if you go lighter on audio than I, though.) What I reccommend is to only have your files as .oggs and really push how low the bitrate can be, I generally think 128kbps is a good spot for most music tracks as it basically has no quality loss. 96kbps is also pretty good if you don't mind barely lower quality - sometimes I even think lower quality audio can add a lot! This is typically very noticable in percussion, and most of the music in SHOW ME THE BODY was exported at 56kbps for example, because I really loved how it shaped the character of the music! Additionally, I think most one-off sfx you won't expect to hear often can genuinley just be exported at 32kbps when it's an ogg, as if it's short and infrequent, it'll barely be noticable. Generally, most sfx can be exported at a lower bitrate than the music, though of course some exceptions will apply. This will help SIGNIFICANTLY in keeping the space your audio takes up down, seriously, do not use .wavs or other lossless formats for your game, ever, and I think you should avoid generally mp3s because they struggle with exporting low bitrate tracks and also loop much worse than oggs. Oggs are just kind of the goat for game development, they compress better than mp3s, loop better, and still sound great even at the lowest possible bitrates.


Another note to keep in mind is to try and keep any loops as small as you can. It's good to have some variety in your audio to keep it sounding fresh (ambient works get away with a little less) but this doesn't mean you should be letting audio files be unnecessarily overly long. Realistically, especially for something like a VN, no track should really be more than 4 minutes at most, even for longer scenes just even 2 minutes of audio that varies enough will stay really fresh. Of course, there are exceptions to this and I encourage you to have a lot of fun with the music for your game, and I've even composed longer tracks for particularly intense moments before, but just be mindful of how long a specific loop is. There's no reason to repeat your song twice in one loop. I think ambience can also afford to be really short generally, if the goal is to make something that'll blend into the background, it'll often only take a few minutes to achieve that. Of course, there are excpetions to this rule, but it's always worth taking a step back and thinking "Does this audio loop really need to be so long?" Keep in mind that proper compression with oggs will always be far more important than track length, and should be the main priority with optimizing audio, but this is a nice thing to take into consideration sometimes.


Image optimisations

So, images are generally compressed pretty well, and there's not a whole lot you can do. Pngs are very efficient and keep the filesize down a lot already, I'd generally recommend pngs over jpgs because they usually compress better in very small cases, though in some cases a jpg may be more appropiate as they tend to have better compression algorithims especially for bigger images, just experiment a little! Keep in mind that jpgs don't support transparent backgrounds. If your engine supports webps, that's even better, though! Webps can be exported losslessly, and will likely halve the size of your image just by proxy of being a webp! they support transparency and animation, webps are really good at this! A lot of art programs don't support webps, though, but Krita and GIMP both support exporting as webps, so if you already draw in one of those... Great! And if you don't, and are willing to go through with the effort, why not reload all your art up in GIMP and re-export it as a webp? But that's pretty tedious and I'm just a bit of a freak to do that for 100+ images...


One key thing to note about image filesize optimization is the resolution you put them in the game at! There's few reasons putting art in your game that's a ridonkulously high resolution if your game is never gonna be rendered at higher than a standard 1280x1080, most of the time your VN's art should really not be exceeding the resolution you've chosen for the game! For example, SHOW ME THE BODY was at 1024x768, and there's practically no reason to ever have my images at a higher resolution than this in the files because they're just going to be crunched down to the game's resolution anyway. Of course there are some exceptions to this to create some cool effects where you move across a piece of art that's bigger than the screen etc. But generally speaking, the images should not be bigger than what the game is going to render them at. If you draw at a higher resolution, don't worry about crunching your art down for the game, it'll still turn out looking great! (It'll probably turn out better if you do it yourself than if you let an engine crunch it for you anyway and you can have much more control over exactly how it's going to look!) Consider distributing all the high res art as a seperate download as an extra goodie if you really want to, instead of leaving super high res art in your game's folder when it's not even going to get good use out of it!


Something like videos are generally very easy to get compressed down - just use .webms. SHOW ME THE BODY had 5 video files but because they're all webms they barely even reach 5mb. This one's just kinda simple, videos tend to be very heavy files especially as mp4s or other formats, so where you can you should really strive to use webms because of how lightweight they are, and they normally work just as well as other video formats with minimal quality loss. I don't have much to say on it, because it's pretty simple.


Extra goodies

So, I like to hide some silly bonus files in my stuff, and I know a lot of people do! It's nice to give file snoopers a few things to peek at, and it's just kinda fun! Extras are just a generally really fun way to give people a little something more, and add a bit of a personal touch to show you had fun making your project, but you try to make sure these don't take up too much space either. It's fun to include things like the actual art files (i.e. .clip files for CSP, .kra for Krita etc.) but keep in mind how big these can get! Sometimes these files can get pretty hefty, I've had CSP files up to 30mb before, and when these add up they add up to a LOT.


I don't think you shouldn't include these extras, but if they're gonna start taking up a significant amount of space, you should probably put them in a seperate archive to be downloaded at the reader's discretion. I love seeing extras for games and getting to see the creators thought process, which is why I include some in my VNs too! But I only included very small files that collectively take up 6 mb, if you feel your extra files are beginning to take up a significant amount of space (e.g. starting to hit 100 in just little extras) then please consider distributing them separately of your own game! Those who'll want to see the extras then have the option of downloading them separately, and those who don't want them won't need to! Again, there's always exceptions... Maybe you're 'extras' are actually integral to the artistic experience and play a huge role! Neat! Remember, there's always exceptions to basically everything I've mentioned here.


Conclusion


In the end, this doesn't matter a lot, but I still think you should do your best to keep your VN or other game's filesize down. It's just kinda nice to not be taking up so much space sometimes is all, I think, as a few hundred megabytes could be deceiptively large, though in almost every case this really doesn't matter and I'm just being a weird lil' freak about this for no real reason :P It's really not that big a deal, and these are just some light tips you can sometimes use!


You are not doing anything wrong by not doing this, or potentially not having known any of this. Don't let some loser on the internet dictate your artistic decisions and what you should do with your game, and there's almost definitely exceptions to all of the cases I might've listed above. You don't have to do this, nor do I think you should listen to me, but I thought it'd be nice to share some advice on something I know a little bit about! Thanks for reading, and happy writing/developing!








Keep it cool... Keep it low. Annesiac 2026.