hobg0blin / dataville

In-progress Ren'Py game.
0 stars 0 forks source link

optimize build size #38

Open hobg0blin opened 1 week ago

hobg0blin commented 1 week ago

it's 6GB right now which isn't great. low-hangingest fruit is probably just compressing all the images but worth seeing if there are any simple renpy tricks that would help

habmin commented 1 week ago

Where are you getting the 6gb from? I'm getting 2.5 for the whole repo (includes the renpy library and examples), and our builds are currently around 1gb.

The image folder is mostly to blame though. There's a lot of unused assets in there. Now that we're at MVP level, we can probably just go ahead and delete them.

After that, if our builds are still hefty, I think we'll have to triage individually through the bigger pngs (jpegs are already really compressed, so we wouldn't save much space) and decide what if we want to:

  1. Resize or crop anything above 1080p - I know that till will affect how some things are positioned in renpy, but will be fine.
  2. Remove the alpha level data if they don't need transparencies.
  3. Find a balance with compression where the quality doesn't suffer too much.
hobg0blin commented 1 week ago

This is from actually building it into a Mac/PC app with RenPy. It's not clear to me why it's getting so much bigger by using their build process but I reckon this is documented somewhere - if the extra ~4GB isn't coming from images, then there's probably just some dumb flag or something we need to disable.

Where are you getting the 6gb from? I'm getting 2.5 for the whole repo (includes the renpy library and examples), and our builds are currently around 1gb.

The image folder is mostly to blame though. There's a lot of unused assets in there. Now that we're at MVP level, we can probably just go ahead and delete them.

After that, if our builds are still hefty, I think we'll have to triage individually through the bigger pngs (jpegs are already really compressed, so we wouldn't save much space) and decide what if we want to:

1. Resize or crop anything above 1080p - I know that till will affect how some things are positioned in renpy, but will be fine.

2. Remove the alpha level data if they don't need transparencies.

3. Find a balance with compression where the quality doesn't suffer too much.
habmin commented 1 week ago

okay yeah I have no idea what's happening then, every build I make and unzip is under 2gigs.

habmin commented 1 week ago

oh wait, how much is in you audio directory? I just have the basic stuff from the google drive, about 370mb.

hobg0blin commented 1 week ago

Oh good catch, I think the music files are adding most of that. I'm meeting with Matt on Sunday so I'll check with him about compressing those.

oh wait, how much is in you audio directory? I just have the basic stuff from the google drive, about 370mb.

hobg0blin commented 1 week ago

Just cutting the accidental zip files got it down to 1.03GB - gonna see what it's at once matt is done with music stuff.