Welcome Guest. Please Login or Register. Feb 9, 2010, 10:34am
BOARD LOCKED (as per IsmAvatar)
These boards have been locked down into Read-Only Mode. This was a move that we have been expecting for some time.
These forums are dead. They've served their purpose, and now nobody uses them anymore. It was great while it lasted, and it lasted much longer than I had expected. If you still feel that we need anything like this, feel free to start up your own. Also, feel free to loot and scavenge any of the posts/threads you find here.
The GM6 File Format board has become part of the LateralGM project. For all things related to that, please visit www.lateralgm.org and forum.lateralgm.org. Some of the information here has still not been transferred over yet, so from time to time you may be referred (or may refer) to these old forums, at least until we get all of that stuff transferred over (do feel free to help out).
Thank you all for your loyalty to these forums, and for making this a great experience for everyone. But now, it's time to move on to bigger and better things. You are all Released to Seek Opportunities Elsewhere.
GMDefrag, when ID numbers get too big « Thread Started on Aug 27, 2006, 11:48pm »
Header GMDefrag Beta 1 By IsmAvatar Made in Java (Eclipse) Requires Java 1.5 to run (best download the latest version of Java) Requires access to any GameMaker-compatable gm6 file Only works on GM6.0 and 6.1 files. Not inteded for use with corrupted files!
Advertisement When you delete resources/instances/tiles, they are remembered by GM (only so much as to be marked as "deleted"). This causes later resources to have bigger and bigger numbers. GMDefrag gets rid of all that unnecessary junk, and drops those id's down where they belong. I chopped 40 kb off of a 580kb file, and my friend tried it and chopped 400kb off of a 2.5mb file, and they still ran just fine.
Usage Usage of the program is VERY straightforward. Works from any location (I was going to make an applet, too, but couldn't figure out how) and any Operating System that supports Java. Once you click Defrag, it will start defragging. When it finishes, it will show a popup saying "Success" (or it will say an error). You can then open the GM6 file to make sure it didn't corrupt, and run the game to make sure it didn't screw up anything (like collisions and such). Then post your results.
Speed How long it takes depends on the size of the gm6 file and your processing power. For me, it took all of 5 seconds to defrag a 580kb file with 700some mb of RAM and 2.8GHz. Do feel free to post how long it took for you on what size file and your computer specs.
What can go wrong If you think it may have frozen, shut down the program, check the output gm6 file to see if it works or not, and run it to see if it works. Report your results to me, in addition to a mention of the freeze.
Warning: GMDefrag will alter ID numbers and update references. Since GMDefrag does not manually go through codes to update references, you may need to do that yourself. This is only true if you refer to the actual number itself - resource names and functions that return ID's will still work just fine.
What to do if something goes wrong If you do find any errors or the backup fails, please post with a detailed explanation of the problem, what you were doing when the problem occurred, and any extra information about the original file that you think may help determine where the problem is.
Legal crap Warning: This is only a beta, and as such, may still have a few errors. I am not responsible for any damages done to your files. It's your own fault for not making a backup. I tried to make it so it makes a .gb1 backup for you, but there's absolutely no promise that that will work 100% of the time.
Re: GMDefrag, when ID numbers get too big « Reply #1 on Aug 29, 2006, 11:34am »
I tried it and it worked very well on most files, saving a few bytes. But on a very old file, which was already converted from gmd to gm6 by GM6 it says the file is corrupted. I can't put this file openly around because this would result in legal trouble.
Re: GMDefrag, when ID numbers get too big « Reply #2 on Aug 29, 2006, 8:06pm »
Thank you, I will look into this. I have GM4.3c to 6.1, so I can try it myself. If anyone has any legal files that do not defrag, even (and especially) if they are made in old versions of GM and upgraded to 6.1, please mention this and send me a copy of the file.
Windapple, you can try my Anlizt6 program to try and find where the supposed corruption is. Then, you can look inside the binaries and either document yourself what seems to be wrong, or snip out that part and some of the things around it and send it my way. Also, optionally, you can send me the report that it creates in analyze.txt. This will only contain names of resources and file names and such, and the status of certain checkboxes, and will not contain any sprite/sound/etc data.
Re: GMDefrag, when ID numbers get too big « Reply #3 on Aug 30, 2006, 2:17am »
Ok, I analized the original file and the corrupted file, but the analizer doesn't find any corruption. But both the Defrag tool and GM say it's corrupted.
Edit:
I traced the problem down to the paths, the file remains intact if I remove them, and keeps being corrupted if I remove everything but the paths.
Heres a zip archive with the gm6 striped down to the paths, the report of the good file and the report of the corrupted file after the defragmentation, maybe you can have a look at it: http://windapple.gmxhome.de/path_error.zip
Re: GMDefrag, when ID numbers get too big « Reply #4 on Aug 30, 2006, 10:55am »
Please note, the defragger is not meant to be used on corrupted files. I apologize for any confusion the name may have made. I'll make a note in the first post.
The reported corruption appears to have something to do with the room used as the background of the path, and the room has since been deleted. I thought I made sure the program would address this issue, but I don't know now. I'm looking into it. In the meantime, please download the latest version of Anlizt6 (I just released it today). Please run it on both the "good" and the "bad" and re-send. Just so you know, GM opens path_error just fine for me. no corruptions. GmDefrag, however, does report a corruption, and I am still working on finding out why.
Re: GMDefrag, when ID numbers get too big « Reply #5 on Aug 30, 2006, 12:33pm »
Well, the file isn't corrupted at all. Only GMDefrag corrupts it. The good.txt is the path_error.gm6, the bad.txt is path_error.gm6 after GMDefrag. Actually, if I remove all paths except the last, it GMDefrag also corrupts the file, but the last path hasn't any room as background.
With the new anlizt... It doesn't find any corruption in the original file, however, after using GMDefrag on the file anlizt says
An unhandled exception occurred at 0x00404E59: Read past end of file 0x00404E59 0x00408C79
Re: GMDefrag, when ID numbers get too big « Reply #7 on Oct 19, 2006, 6:21am »
G'day Ismavatar,
This program works a treat for reducing filesizes in large gm6 files. I managed to chops of 150kb on a 1mb file.
However, I could not make it defrag any files unless I placed those files in the root directory of a hard drive. Everytime I tried to defrag a file from another location, I would get the error "Failed to make backup, file access error".
Joined: Oct 2006 Gender: Male Posts: 30 Location: Australia
Re: GMDefrag, when ID numbers get too big « Reply #12 on Jan 19, 2008, 2:41am »
You can actually do this with LGM now. LGM only supports gm7 in the sense that it can convert back to 6, so if your game uses gm7 specific features, using LGM to defrag ids isn't so simple. You can get a version of LGM capable of defragging ids from the weekly builds on this forum.