Tool Others HTML Ren'Py YAC - Yet Another Cruncher (A Game Compactor) [V3.5]

What do you think?

  • Haven't tried it yet...

    Votes: 44 38.3%
  • It's great!

    Votes: 48 41.7%
  • Needs more features.

    Votes: 15 13.0%
  • Too hard to use.

    Votes: 4 3.5%
  • This thing ate my dog.

    Votes: 20 17.4%

  • Total voters
    115
  • Poll closed .

mantismerc

Member
Aug 14, 2019
151
445
I'm currently looking at how to fix Photoshop itself (if ever possible), but it'd be nice if you could keep the extension in post-crunched files true to what it says.
Ngl I forgot I had this forum bookmarked. I tried this program but I personally found compressing to be better with other software. There might be a Photoshop plugin to support WEBP, all I know is that GIMP and Affinity Photo have no issues with WEBPs.

Anyhow, this kind of operation would require all the game scripts to change every instance of ".png" and/or ".jpg" into ".webp". This is simple to do in Notepad++ for sure, so perhaps OP can make that happen. TBH I'd like that, and extra points if they do this for MP3s and OGGs. However, it's easier to leave the game scripts alone and just mass rename every WEBP into a false PNG or JPG. I recommend or to make them WEBPs again. To mass convert them back into JPGs or PNGs, then or will do you justice.
 

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
Ngl I forgot I had this forum bookmarked. I tried this program but I personally found compressing to be better with other software. There might be a Photoshop plugin to support WEBP, all I know is that GIMP and Affinity Photo have no issues with WEBPs.

Anyhow, this kind of operation would require all the game scripts to change every instance of ".png" and/or ".jpg" into ".webp". This is simple to do in Notepad++ for sure, so perhaps OP can make that happen. TBH I'd like that, and extra points if they do this for MP3s and OGGs. However, it's easier to leave the game scripts alone and just mass rename every WEBP into a false PNG or JPG. I recommend or to make them WEBPs again. To mass convert them back into JPGs or PNGs, then or will do you justice.
Thanks. Mind sharing that software name?

I'm using this because I'm a lazy potato. Make a copy of the game - paste into cruncher and select 2 settings, boom - you get the crunched version of the game with all the folders intact. By "boom" I mean like 10 hours of compressing my 7GB abomination, but still.
And I only now noticed it does something to the files that makes them unopenable (is that a word) in Photoshop. Online image editors work fine, so maybe I should just update the Photoshop itself? (2020 version is not that old, eh?)

If you have an easy-to-use software suggestion with the same usability I'd try that.
 

mantismerc

Member
Aug 14, 2019
151
445
Thanks. Mind sharing that software name?
I don't go the "lazy" route. I go by each file type at a time for what I think compresses the best in the least amount of time possible.

I just use Audacity for audio compression, XnConvert for still images comp., Handbrake for video comp., Unren for extracting RPAs when necessary (sometimes devs has them in folders which I like imo), Notepad++ for necessary script changes, and Advanced Renamer to make the false PNGs and JPGs. I wish it was an all inclusive lazy software, lol. *wink wink nudge nudge @hngg*
 
Last edited:

mantismerc

Member
Aug 14, 2019
151
445

XnConvert with a Ryzen 7 is super fast. It takes literally 10 seconds to convert 100 JPGs into WEPs by using all 16 cpu threads. It has to be in "Replace" mode though for "Use multiple CPU Cores" to work. The default is "Ask" mode.

I personally have "Delete original" uncheckmarked because I can't use my computer until it's done converting. That's because apparently XnConvert lets Windows Explorer do the deleting instead, which results in multiple "Recycling file...Recyl-Recyl-Rec-Re-Re-R-R-R-R-R" and so on messages. Checkmark it if you don't mind not using your computer.
 
Last edited:

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
The main "weight" of my game is in .webm animations (close to 2000 of them), placed in different folders. If I start doing hand-picked compression now, I'll lose my sanity. But thanks for the hint. :HideThePain:
Ryzen 3600 is doing okay, but the files themselves are pretty big and at 60 fps, so it's taking a while (I'm using the highest quality this cruncher allows), something like a minute for 500 frames-animation.
 

mantismerc

Member
Aug 14, 2019
151
445
The main "weight" of my game is in .webm animations
The best Handbrake can do is folder by folder video compression in a way. It's still mind numbing but less frustrating than file by file at least. I'm gonna give it a shot anyway. I just checked out your game and for real I think it deserves a spot in my 2 TB HDD hehe. It looks great. But I need it to not take up so much space, even it being 1.31 GiB compressed is a bit much for me.
 

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
The best Handbrake can do is folder by folder video compression in a way. It's still mind numbing but less frustrating than file by file at least. I'm gonna give it a shot anyway. I just checked out your game and for real I think it deserves a spot in my 2 TB HDD hehe. It looks great. But I need it to not take up so much space, even it being 1.6 GiB compressed is a bit much for me.
:oops:
Yeah, it's not gonna be smaller. That 1.4GB was v0.7b and used the "High" setting of this cruncher.
I'm using "Ultra" for v0.8 right now, since now it's an option. So the size is gonna be even bigger (uncompressed is 7.7 GB now...)
 

hngg

Compress All The Things!
Modder
Game Compressor
Donor
May 26, 2019
574
2,461
Hey. Just wanted to say thank you for making this. Helps a lot! :giggle:

Not sure if you can answer or do something to this, but I have a question:
It seems like the cruncher rewrites the header of .png files (maybe others too), and Photoshop can't open them after being crunched. Error says "not a PNG file". If you open crunched png in notepad++ it says "RIFF WEBPVP8" at the start, so Photoshop struggles with this.

I'm currently looking at how to fix Photoshop itself (if ever possible), but it'd be nice if you could keep the extension in post-crunched files true to what it says.
In that case it'd be best to change the file extensions to .webp before you edit the files in photoshop, then change them back to .png when you're done. Doing so with a script is easy enough so I'll add that in today.

Edit: Photoshop doesn't support webp? Can you try manually changing one of the crunched images to the .webp file extension? FYI webp is a lossy format like jpeg so you shouldn't really be editing them in photoshop; that should be done on the lossless .PNG files, first.

I'm caught up on the conversation now so I'll take a look and see what I can do.
 
Last edited:

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
Nah, that's what happens:

Screenshot_1.png

Left is pre-crunched, right post-crunched.
So, the extension is still .png, but the header is changed. Trying to open a post-crunched file in Photoshop gives the error "not a png file" and refuses to open. It's not super crucial, just not sure why it does that.

The reason I've stumbled on this is: I wanted to make a side-by-side comparison to my patrons to show the quality of images pre- and post-crunched, but couldn't simply drag-and-drop the compressed version into Photoshop. Used an online image editor with no problem after that. It's a minor thing, so you shouldn't probably even bother.
 

hngg

Compress All The Things!
Modder
Game Compressor
Donor
May 26, 2019
574
2,461
Nah, that's what happens:

View attachment 1094076

Left is pre-crunched, right post-crunched.
So, the extension is still .png, but the header is changed. Trying to open a post-crunched file in Photoshop gives the error "not a png file" and refuses to open. It's not super crucial, just not sure why it does that.

The reason I've stumbled on this is: I wanted to make a side-by-side comparison to my patrons to show the quality of images pre- and post-crunched, but couldn't simply drag-and-drop the compressed version into Photoshop. Used an online image editor with no problem after that. It's a minor thing, so you shouldn't probably even bother.
Buuuuut what happens when you just rename the file to end in .webp instead of .png?
 

DahliaRose

Member
Dec 22, 2018
275
240
Quick question. I'm trying to compress gif images but none of them are compressing. They keep saying image data not found.
 

hngg

Compress All The Things!
Modder
Game Compressor
Donor
May 26, 2019
574
2,461
Quick question. I'm trying to compress gif images but none of them are compressing. They keep saying image data not found.
GIFs are counted as video. After compressing you'll need to play them back via a video player like VLC. HTML games will need to be modified to look for a .webm video rather than a .gif image(different call structure).
 

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
I'm sorry, I don't have Photoshop. Gimp has no problem opening either file. Are you able to open these?
Nope, same error as above.
I guess Photoshop is just kinda picky. If the extension says one thing and inside it reads anything else, simply gives an error (probably to "protect user" or some bullshit) and doesn't allow to do anything.
As I said, it's not really a problem, I already used an online image editor to do what I wanted (opened both alright), just was kinda curious why the cruncher does that.
 

DahliaRose

Member
Dec 22, 2018
275
240
GIFs are counted as video. After compressing you'll need to play them back via a video player like VLC. HTML games will need to be modified to look for a .webm video rather than a .gif image(different call structure).
I was doing them as video. It did see the gifs, and try doing them, but it just kept saying things like what I told you about image data not found among other things.
 

hngg

Compress All The Things!
Modder
Game Compressor
Donor
May 26, 2019
574
2,461
Nope, same error as above.
I guess Photoshop is just kinda picky. If the extension says one thing and inside it reads anything else, simply gives an error (probably to "protect user" or some bullshit) and doesn't allow to do anything.
As I said, it's not really a problem, I already used an online image editor to do what I wanted (opened both alright), just was kinda curious why the cruncher does that.
Some versions of RPGmaker get tripped up on the file header, so the "file header fix" is a workaround. It looks like Photoshop doesn't really support webp correctly since one of those files I sent you is a normal webp file from GIMP. Try this plugin
 

AdventAnyx

Active Member
Game Developer
Feb 2, 2020
728
2,711
Some versions of RPGmaker get tripped up on the file header, so the "file header fix" is a workaround. It looks like Photoshop doesn't really support webp correctly since one of those files I sent you is a normal webp file from GIMP. Try this plugin
Yeah. With that plugin, your files open alright, but the cursed crunched .png still gives an error until you rename it to .webp.
My own conclusion: Photoshop sucks ass :LUL:
Sorry for bothering
 
  • Haha
Reactions: hngg

hngg

Compress All The Things!
Modder
Game Compressor
Donor
May 26, 2019
574
2,461
Yeah. With that plugin, your files open alright, but the cursed crunched .png still gives an error until you rename it to .webp.
My own conclusion: Photoshop sucks ass :LUL:
Sorry for bothering
Lol, there is a reason I haven't used Photoshop since version CS2 :p

On another note:
I've updated YAC to version 2.0! The biggest change is MUCH faster video encode time. I've tried to improve speed without sacrificing quality too much so please let me know how I've done. ;)
 
  • Red Heart
Reactions: AdventAnyx