Compressing assets to reduce size #24
Labels
No Label
bug
Critical Priority
duplicate
enhancement
help wanted
High Priority
Low Priority
Medium Priority
Meta
needs more info
question
refactor
wontfix
bug
Critical Priority
duplicate
enhancement
help wanted
High Priority
invalid
Low Priority
Medium Priority
Meta
question
wontfix
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Cavemanon/SnootGame#24
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The backgrounds are about 100 MB of the 550 MB total. Most of the backgrounds are just photos run through a filter anyway so converting them to jpg isn't going to lose much detail. I did a quick conversion of all the backgrounds and it drops to ~25 MB. I eyeballed the results and I can't tell the difference from the originals, even for the non-photo backgrounds.
I did suppose doing this to the artists and they kinda didn't like the idea because they were afraid of quality loss. Though, I wouldn't mind having some more backing to counterbalance the artist's wishes. If it can be sufficently proven there is no loss of user experience from this change to the artists, I think they would be fine with it.
I know this is to reduce the image sizes, but there might be an argument to revisit why certain songs are in .wav, making just two of them take up 55 MBs. If there is a good reason for them to be as they are, it's fine. If not, we could convert them to high bitrate mp3/ogg/whatever and probably gain around 30 MB back.
Convert backgrounds to jpg to reduce sizeto Compressing assets to reduce sizeupdated title of post to reflect the nature of the issue.
Sound for sure could be made into the ogg format to reduce some filesize. I doubt a simple ffmpeg conversion would do much harm.
Don't know what we can do for the backgrounds other than converting and have the artists check if they're fine with the results?
On linux I just ran
in the backgrounds folder to convert everything using imagemagick. There are some settings you can tune (and other tools as well), but even this looks good to me.
Some of the backgrounds end up with some dark lines at the edges but I think that's because the original backgrounds have some transparency there.
For the audio, yeah you should just convert everything to ogg vorbis or opus, you won't notice the difference and it will be much smaller.
FYI there's a bunch of unused assets that are still being shipped, e.g.
/game/audio/effects/336640__audiojacked__alarm-air-raid-siren-test-devonport-sony-pcm-m-10
/game/audio/prom_chatter_loop_2.zip
so those are easy wins
pls just
mogrify *.png -verbose -format jpg
and save yourself the code typing.also linux is a kernel, how are you running userland applications on it ;)
should we keep those pngs or just use webps for those? I am leaning towards webps with low compression but I know people get really mad about those for some reason.
Probably will end up doing this. Seems like an easy fix.
may end up making the compression branch soon enough. Patchy-patch5 is going to get tons of love.
pls no bully. lel I don't work with this stuff too often so I just went with the simplest thing I knew.
I'm pretty sure it's just a mistake from when the backgrounds were generated, it's a small strip (3px) at the right edge. I think we should just fix it and use jpg.
I'll make a PR for this soon enough then for people to check out and make complaints about. I don't know how happy the artists will be, but if the worst thing thats being seen in quality loss is werid stuff on the edge, then I doubt we'll be in trouble
theres a branch called compress for this. Waiting for https://git.snootgame.xyz/Cavemanon/SnootGame/pulls/17 to be merged before making a PR
Gitea is giving me a 500 error when trying to make a PR to merge the compress branch in with Patchy-Patch. Anyone mind doing it?
Note that it shaves off 300MB~ and also still needs some tweaking to fit in with the rest of the script.
Tried several times now, also getting a 500 error.
fun.
could always do a merge on my end. You guys can check the branch out and whatnot. I guess I will work on it solo and merge it into patchy patch.
ok got it done lmao, scream at me if this is broken.