September 13, 2009, 11:29:15 AM

| Welcome, Guest. Please login or register. Did you miss your activation email? Login with username, password and session length

News: ..none. |

|  | Home |  | Chat | Recent | Archive | Help | Members | Login | Register |

Pages: [1] Go Down |

| Send this topic | Print |

| Author | Topic: Sffer - SFF extraction and optimizing (Read 3330 times)

VIB Contributor Offline Hi, I am the "Personal Text" |

| Sffer - SFF extraction and optimizing « on: June 09, 2006, 01:24:16 AM / June 08, 2006, 10:24:16 PM » |

Hey hey, I started learning c++ less than a month ago. So take it easy. And I just finished my first real project.
It is this small application that reads .sff files. And tries to optimize it, reducing it's size as much as it can and fixing common mistakes done by some other programs. It will remove duplicate sprites and palettes, crop all images and reencode every subfile.
I tried it on many of the chars in my mugen and I could reduce the size of some .sff files considerably. Such reducing a 6mb sff to 4mb. Others will not reduce at al if it is already optimized.
Before you use it, be sure to back-up your files and check for viruses. Like I said, it is my first program and I am still really bad at this, so there is a chance that the program will screw up your files.
If you find a bug, please let me know. Tell me what .sff file you tried to load, where I could download it and what happenned wrong. Here it is:
http://www.brunazo.eng.br/vandre/sffer.zip
Screen Shots (click to enlarge):
Compiled for Windows only. But I am trying to keep the core code as multi-platform as I can. I will upload the source code soon.
update 6/12/2006:
- Upgraded status from BETA to version 1.0
- Fixed a bug when trying to crop images with 1 pixel width or height
- Added some minor cosmetics
update 6/11/2006: Update:
- Fixed a bug when encoding some sprites
- Fixed a bug when saving the palette type on group 9000 for WinMugen and Linux Mugen
- Sffer should now fix sff files that cannot have bgfx applied to
- new host
update 6/10/2006: Small update:
- Saving all sprites to .PCX should now save in the selected directory.
- Added a few messages to the status bar, it is now gonna tell you how much did the file reduce.

« Last Edit: June 12, 2006, 12:26:50 PM by VIB » | Logged

http://www.geocities.com/vibhp/mugen/
GREAT people talk about IDEAS.
Average people talk about Things.
small people talk about other people.

electrocaid User Offline god bless mugen lovers |

| Re: Sffer - SFF extraction and optimizing « Reply #1 on: June 10, 2006, 06:41:20 AM » |

excellent project
if you wanna have my best advice: ask to DarkSaviour for testing it
< he specializes in sff optimisation
i already talked to him about your program...
another detail: is this new production as-much-hostable-as-all-your-other-ones?

| Logged

MUGEN MUSEUM CREATOR
mugen museum is currently A SITE!!!! but Fanatic Mugen does still exist of course
Which Final Fantasy Character Are You?
Final Fantasy 7

Green Lantern Yuki Contributor Offline Walking between DC Nation and Neogeo Land |

| Re: Sffer - SFF extraction and optimizing « Reply #2 on: June 10, 2006, 10:30:52 AM / June 10, 2006, 01:30:52 PM » |

Wow, this program can help me too much fixing my chars' SFF for WinM, thanks
Prooving right now

| Logged

Quote from: Blind/Niewidomy on July 17, 2009, 09:52:45 AM
It looks good u failed...

Sludge Guest |

| Re: Sffer - SFF extraction and optimizing « Reply #3 on: June 10, 2006, 11:39:54 AM » |

Nice program. It'd be great if there were an option to scan a directory of character folders and have it fix all the .sff files it found
Good Job!

| Logged

Sepp Administrator Offline |

| Re: Sffer - SFF extraction and optimizing « Reply #4 on: June 10, 2006, 12:29:36 PM / June 10, 2006, 07:29:36 PM » |

- Adon: optimized sprmaker .sff went from 3,290,582 Bytes to 3,290,111 Bytes.
  The last unoptimized .sff I had of him could not be handled by sffer. It reported an Error 1 and the resulting file is garbage.
- Chun-li: optimized sprmaker .sff went from 1,852,079 Bytes to 1,851,402 Bytes.
- Mike Bison: optimized sprmaker .sff went from 864,321 Bytes to 863,998 Bytes.
- Sagat: optimized sprmaker .sff went from 3,307,721 Bytes to 3,307,308 Bytes.
  The last unoptimized .sff I had of him went from 7,734,500 Bytes to 2,912,293 Bytes and wrecked the small portrait in the process. It might have given an error 1 as well but I forgot.
- Zangief: optimized sprmaker .sff went from 6,311,052 Bytes to 6,279,693 Bytes.
  The last unoptimized .sff I had of him went from 13,113,808 Bytes to 6,089,678 Bytes with no problems, but this one had not portraits to begin with.

=> minimally reduced file sizes on already optimized files.
A more interesting comparison would be unoptimized file to sprmaker optimum compared to unoptimized file to Sffer optimum, but I can't be bothered to run sprmaker when I don't have to. x_x
The setup of the problematic .sff files:

- Sagat's unoptimized one with the small portrait as first pcx in file => small protrait messed up
- Adon's unoptimized .sff with the small portrait as first pcx and the big protrait as last pcx => error 1 and broken 500-something KB file as result.

The programm had no trouble handling the optimized-with-sprmaker versions of files that are set up in such a way: all my .sff files have the small portrait first and the big one last.
I'm guessing Sffer has problems figuring out the palette sharing? When saving the unoptimized versions with sprmaker I tell it that "All files including the small portrait are supposed to share the same palette, except the big portrait."
I guess I could get the problematic .sff versions and the result to you somehow, if it's not a general error and you can't reproduce it with other .sffs, but I think it might be a general thing.

| Logged

"[A]nd the final, unthinkable, inarguable unfairness of existence—that some are smarter, others stronger or faster, and no force at your command can make you better than your gifts."
-- Matthew Woodring Stover
The New Jedi Order: Traitor (2002)

VIB Contributor Offline Hi, I am the "Personal Text" |

| Re: Sffer - SFF extraction and optimizing « Reply #5 on: June 10, 2006, 02:08:25 PM / June 10, 2006, 11:08:25 AM » |

Quote from: electrocaid on June 10, 2006, 06:41:20 AM
if you wanna have my best advice: ask to DarkSaviour for testing it
< he specializes in sff optimisation
Sounds good, do you know how can I contact him?
Quote
another detail: is this new production as-much-hostable-as-all-your-other-ones?
Of course it is. Feel free to use it as if it was yours. I also will release the c++ source code along with the final file once I have solid version that I am confident with. This one is still a little buggy.
Quote from: Sludge on June 10, 2006, 11:39:54 AM
Nice program. It'd be great if there were an option to scan a directory of character folders and have it fix all the .sff files it found
That was in my plans since start, but I will only implement that when am confident that the program is good. Right now if you just run it on all your files it is prolly gonna screw up some of them So you don't really wanna do it.
Quote from: Sepp on June 10, 2006, 12:29:36 PM
I guess I could get the problematic .sff versions and the result to you somehow, if it's not a general error and you can't reproduce it with other .sffs, but I think it might be a general thing.
Thanks a lot for your testing! It would be really helpfull if you could send me only the original .sff files that you had, both optimized by sprmaker and the unnoptimized ones. It does not seems like a general problem, I've tested it over 50 sff files that I have and did not see that problem before. The only known bug that I had for now was that Sffer can't reload files that he saved when the original file was a stage generated by Z-CharCad.
But note that the final optimized file shouldn't be much smaller than a properly saved sff by sprmaker indeed. The only exception would be if you have many duplicate PCX files that you saved with different names when loading into sprmaker (maybe if you didn't notice that they were the same image). Sffer should find those duplicates and remove them. Aside from that and other minor optimizations, it does about the same thing that you would do using sffextract and sprmaker.
But your report helps me a lot, I will look into it when I have some time. I just might be a little busy until valentine's day. Thanks again!
Lastly, I did a small update. It should now display how much the file reduced, such as "Final file saved with 432537 bytes. Size reduced by 23%." or something like it. The new screenshot in the first post should show that. I also fixed a small isse when saving all images to PCX, it should save on the correct folder now. But I didn't change the actual sff loading/saving.

« Last Edit: June 10, 2006, 02:57:41 PM by VIB » | Logged

http://www.geocities.com/vibhp/mugen/
GREAT people talk about IDEAS.
Average people talk about Things.
small people talk about other people.

electrocaid User Offline god bless mugen lovers |

| Re: Sffer - SFF extraction and optimizing « Reply #6 on: June 11, 2006, 07:33:36 AM » |

Quote from: VIB on June 10, 2006, 02:08:25 PM
Quote from: electrocaid on June 10, 2006, 06:41:20 AM
if you wanna have my best advice: ask to DarkSaviour for testing it
< he specializes in sff optimisation
Sounds good, do you know how can I contact him?
Quote
another detail: is this new production as-much-hostable-as-all-your-other-ones?
Of course it is. Feel free to use it as if it was yours. I also will release the c++ source code along with the final file once I have solid version that I am confident with. This one is still a little buggy.
point 1: here's:
- http://dsarena.streetmugen.com/ (have an eye here: http://dsarena.streetmugen.com/tools/index.php3
- concerning his mail: i'll PM you that because he doesn't mention it on his site
point 2:: thanx a lot for this nice autorisation: i'll ask to Dadou for hosting it
good luck for your future developments

| Logged

MUGEN MUSEUM CREATOR
mugen museum is currently A SITE!!!! but Fanatic Mugen does still exist of course
Which Final Fantasy Character Are You?
Final Fantasy 7

Kung Fu Man Guest |

| Re: Sffer - SFF extraction and optimizing « Reply #7 on: June 11, 2006, 07:38:50 AM » |

Electro: might be better to wait on hosting till the actual tool is completed some more, since currently it is having some severe problems with certain factors for SFF files.

| Logged

electrocaid User Offline god bless mugen lovers |

| Re: Sffer - SFF extraction and optimizing « Reply #8 on: June 11, 2006, 07:43:06 AM » |

Quote from: Kung Fu Man on June 11, 2006, 07:38:50 AM
Electro: might be better to wait on hosting till the actual tool is completed some more, since currently it is having some severe problems with certain factors for SFF files.
thanx for the suggestion but:
- we'll warn the future users
- the more ppl will use this, the more feedback VIB will have: that's good for the program itself
no?

| Logged

MUGEN MUSEUM CREATOR
mugen museum is currently A SITE!!!! but Fanatic Mugen does still exist of course
Which Final Fantasy Character Are You?
Final Fantasy 7

Kung Fu Man Guest |

| Re: Sffer - SFF extraction and optimizing « Reply #9 on: June 11, 2006, 07:55:03 AM » |

Yes, but if the focus is kept here for now, people will be able to give it more directly. The more it's spread out, the more of a problem you have as people tend to lose track just who to contact for bug reports.
Besides, I'm more afraid posted somewhere else, someone might ignore the warning completely and download anyway more than they would if it's here. All I'm saying is let VIB get some kinks out, then host it up and the situation will be better for everyone overall.

| Logged

Manto MFG Network Member Offline Lone Star |

| Re: Sffer - SFF extraction and optimizing « Reply #10 on: June 11, 2006, 10:13:31 AM / June 11, 2006, 05:13:31 AM » |

Excelent! =D
One question : Does it works like sffmaker (when using not-shared sprites in the sff for stages, if you use MCM when a envcolor ou BG-efx is in use the colors are all messed up but with sffmaker this doesn't occur) for sff in stages?

| Logged

http://www.myspace.com/mantovao ~ http://mugenguild.com/mantovao

electrocaid User Offline god bless mugen lovers |

| Re: Sffer - SFF extraction and optimizing « Reply #11 on: June 11, 2006, 10:20:05 AM » |

Quote from: Kung Fu Man on June 11, 2006, 07:55:03 AM
Yes, but if the focus is kept here for now, people will be able to give it more directly. The more it's spread out, the more of a problem you have as people tend to lose track just who to contact for bug reports.
Besides, I'm more afraid posted somewhere else, someone might ignore the warning completely and download anyway more than they would if it's here. All I'm saying is let VIB get some kinks out, then host it up and the situation will be better for everyone overall.
ok, let's be cautious: the roof isn't on fire

| Logged

MUGEN MUSEUM CREATOR
mugen museum is currently A SITE!!!! but Fanatic Mugen does still exist of course
Which Final Fantasy Character Are You?
Final Fantasy 7

VIB Contributor Offline Hi, I am the "Personal Text" |

| Re: Sffer - SFF extraction and optimizing « Reply #12 on: June 11, 2006, 11:09:03 AM / June 11, 2006, 08:09:03 AM » |

electrocaid, I really appreciate your help. But I agree with KFM. It would be more clever to wait till I fix some stuff. This version appears to be more bugged than I first thought. So I would rather keep it here for now. But thanks for everything
Quote from: Zak Stevens on June 11, 2006, 10:13:31 AM
One question : Does it works like sffmaker (when using not-shared sprites in the sff for stages, if you use MCM when a envcolor ou BG-efx is in use the colors are all messed up but with sffmaker this doesn't occur) for sff in stages?
Theorically it shouldn't do anything about it, if your BG is bugging the bgfx it is still gonna do it. If it's working, it is still gonna work properlly after using sffer. But I didn't get to actually test it, since I can only get WinMugen to work here. And that was a DOS only BUG I think. I wanted my program to to actually FIX that on bugged stages, but I can't do that without testing it
Just to make sure. The bug happens with unshared sprites when the .sff itself is set to not use shared palette right? (note that there are 2 different flags for the palette type, one that is set on each sprite and another in the sff header). Either way I will try to look into that.
I updated the code. Sffer should now fix broken stages. If you have a bugged stage that cannot have bgfx applied to, using Sffer on the stage's .sff file should fix the stage. All you need to do is to open the sff on Sffer and save it.
It would be really helpfull if you guys could point me out where to get some .sff files that do not work after using Sffer. Because I am having a hard time getting mugen to work, and the chars that I have are really old. The ones I have that do work on my WinMugen all worked fine after using Sffer. And the ones that did not work with Sffer I couldn't load in WinMugen before using it. So I cannot see any bugs

« Last Edit: June 11, 2006, 01:34:17 PM by VIB » | Logged

http://www.geocities.com/vibhp/mugen/
GREAT people talk about IDEAS.
Average people talk about Things.
small people talk about other people.

Sepp Administrator Offline |

| Re: Sffer - SFF extraction and optimizing « Reply #13 on: June 11, 2006, 12:21:34 PM / June 11, 2006, 07:21:34 PM » |

Quote from: VIB on June 11, 2006, 11:09:03 AM
It would be really helpfull if you guys could point me out where to get some .sff files that do not work after using Sffer.
Email sent. Uhhh but I sent just the .sff files. Errr, guess you can get the corresponding chars from Random Select's hosted section.

| Logged

"[A]nd the final, unthinkable, inarguable unfairness of existence—that some are smarter, others stronger or faster, and no force at your command can make you better than your gifts."
-- Matthew Woodring Stover
The New Jedi Order: Traitor (2002)

electrocaid User Offline god bless mugen lovers |

| Re: Sffer - SFF extraction and optimizing « Reply #14 on: June 11, 2006, 12:25:20 PM » |

Quote from: VIB on June 11, 2006, 11:09:03 AM
electrocaid, I really appreciate your help. But I agree with KFM. It would be more clever to wait till I fix some stuff. This version appears to be more bugged than I first thought. So I would rather keep it here for now. But thanks for everything
no problem: the roof isn't on fire yet

| Logged

MUGEN MUSEUM CREATOR
mugen museum is currently A SITE!!!! but Fanatic Mugen does still exist of course
Which Final Fantasy Character Are You?
Final Fantasy 7

VIB Contributor Offline Hi, I am the "Personal Text" |

| Re: Sffer - SFF extraction and optimizing « Reply #15 on: June 11, 2006, 01:38:24 PM / June 11, 2006, 10:38:24 AM » |

Quote from: Sepp on June 11, 2006, 12:21:34 PM
Email sent. Uhhh but I sent just the .sff files. Errr, guess you can get the corresponding chars from Random Select's hosted section.
Thanks, that was all I needed for now. I fixed the bug with the small portrait palettes. And also fixed a bug with the PCX encoding.
edit: hmm, the .7z files you sent me seem corrupted. I can't open them with winrar. Do they really have around 600kb each? I'm gonna try from random select. Both the sprmaker files I could get from RandomSelect are working perfectly with Sffer indeed. I would need the non optimized ones to see if there is still something wrong with those.
The new version that I just uploaded might work fine with your files. It is definetly more stable now. No known bugs for now

« Last Edit: June 11, 2006, 02:10:04 PM by VIB » | Logged

http://www.geocities.com/vibhp/mugen/
GREAT people talk about IDEAS.
Average people talk about Things.
small people talk about other people.

Sepp Administrator Offline |

| Re: Sffer - SFF extraction and optimizing « Reply #16 on: June 11, 2006, 03:15:18 PM / June 11, 2006, 10:15:18 PM » |

Quote from: VIB on June 11, 2006, 01:38:24 PM
edit: hmm, the .7z files you sent me seem corrupted. I can't open them with winrar. Do they really have around 600kb each?
They've been compressed with 7zip because I wanted to keep the size down.
Quote from: Sepp on June 10, 2006, 12:29:36 PM

- Sagat's unoptimized one with the small portrait as first pcx in file => small protrait messed up
- Adon's unoptimized .sff with the small portrait as first pcx and the big protrait as last pcx => error 1 and broken 500-something KB file as result.

Sagat works fine now, Adon remains the same. New email with new Adon results, Winrared this time.

| Logged

"[A]nd the final, unthinkable, inarguable unfairness of existence—that some are smarter, others stronger or faster, and no force at your command can make you better than your gifts."
-- Matthew Woodring Stover
The New Jedi Order: Traitor (2002)

VIB Contributor Offline Hi, I am the "Personal Text" |

| Re: Sffer - SFF extraction and optimizing « Reply #17 on: June 12, 2006, 12:37:43 PM / June 12, 2006, 09:37:43 AM » |

Got that, the bug was a miscalculation from me. When croppig, it should return an error when a sprite had zero pixel height or width but was doing that when the sprite had only 1 pixel. Like one of your explods.
Fixed it and updated the program. Your unoptimized sff went down 75%
Thanks a lot for the help ^^

| Logged

http://www.geocities.com/vibhp/mugen/
GREAT people talk about IDEAS.
Average people talk about Things.
small people talk about other people.

Manto MFG Network Member Offline Lone Star |

| Re: Sffer - SFF extraction and optimizing « Reply #18 on: June 15, 2006, 01:42:43 PM / June 15, 2006, 08:42:43 AM » |

Nice I'll test Sffer with my stages and I'll be posting a more detailed feedback

| Logged

http://www.myspace.com/mantovao ~ http://mugenguild.com/mantovao

Pages: [1] Go Up |

| Send this topic | Print |

Jump to:

| Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC |

Page created in 0.279 seconds with 22 queries.
Loading...