GM RPG boards
« GMDefrag, when ID numbers get too big »

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.

Yours truly,
IsmAvatar



GM RPG boards :: Slightly off topic :: Game Maker 6.1 File Format :: GMDefrag, when ID numbers get too big
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: GMDefrag, when ID numbers get too big (Read 981 times)
IsmAvatar
God
*****
member is offline

[avatar]

Good Samaritan

[icq] [yim] [msn] [aim]
[homepage]

Joined: Nov 2003
Gender: Female
Posts: 1,062
 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.

Link
http://users.nni.com/cmagicj/GMDefrag.jar
10kb. Download to your hard drive and run.

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.
« Last Edit: Jan 19, 2008, 2:43am by IsmAvatar »Link to Post - Back to Top  IP: Logged

RPG tools
LateralGM
LateralGM Forum

Find me on Jabber/XMPP/Google Chat/email:
IsmAvatar at gmail dot com
windapple
Newbie
*
member is offline





Joined: Aug 2006
Posts: 2
 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.
Link to Post - Back to Top  IP: Logged
IsmAvatar
God
*****
member is offline

[avatar]

Good Samaritan

[icq] [yim] [msn] [aim]
[homepage]

Joined: Nov 2003
Gender: Female
Posts: 1,062
 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.
« Last Edit: Aug 29, 2006, 8:09pm by IsmAvatar »Link to Post - Back to Top  IP: Logged

RPG tools
LateralGM
LateralGM Forum

Find me on Jabber/XMPP/Google Chat/email:
IsmAvatar at gmail dot com
windapple
Newbie
*
member is offline





Joined: Aug 2006
Posts: 2
 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
« Last Edit: Aug 30, 2006, 4:19am by windapple »Link to Post - Back to Top  IP: Logged
IsmAvatar
God
*****
member is offline

[avatar]

Good Samaritan

[icq] [yim] [msn] [aim]
[homepage]

Joined: Nov 2003
Gender: Female
Posts: 1,062
 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.
« Last Edit: Aug 30, 2006, 11:44am by IsmAvatar »Link to Post - Back to Top  IP: Logged

RPG tools
LateralGM
LateralGM Forum

Find me on Jabber/XMPP/Google Chat/email:
IsmAvatar at gmail dot com
windapple
Newbie
*
member is offline





Joined: Aug 2006
Posts: 2
 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

Here is the analyze file of the gm6 file damaged by GMDefrag:
http://windapple.gmxhome.de/analyze.zip
Link to Post - Back to Top  IP: Logged
DFortun81
Active Newbie
**
member is offline

[avatar]

The Fortunate One

[msn]
[homepage]

Joined: Feb 2006
Gender: Male
Posts: 7
Location: DIA HQ -- Phoenix, AZ
 Re: GMDefrag, when ID numbers get too big
« Reply #6 on Sept 12, 2006, 12:09am »

I've been looking for something that did this for a while, I've even posted it on Mark's To-Do list!

I'll tell you if it works when Java is done DLing.
-DF81
Link to Post - Back to Top  IP: Logged

[image]
Jim
Guest
 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".
Link to Post - Back to Top  IP: Logged
IsmAvatar
God
*****
member is offline

[avatar]

Good Samaritan

[icq] [yim] [msn] [aim]
[homepage]

Joined: Nov 2003
Gender: Female
Posts: 1,062
 Re: GMDefrag, when ID numbers get too big
« Reply #8 on Oct 19, 2006, 11:58am »

What operating system are you using, and do you have administrative privileges?
« Last Edit: Oct 19, 2006, 11:59am by IsmAvatar »Link to Post - Back to Top  IP: Logged

RPG tools
LateralGM
LateralGM Forum

Find me on Jabber/XMPP/Google Chat/email:
IsmAvatar at gmail dot com
Jim
Guest
 Re: GMDefrag, when ID numbers get too big
« Reply #9 on Oct 20, 2006, 12:07am »

I am using WinXP Pro and have full admin privileges.

Link to Post - Back to Top  IP: Logged
royboyjoytoy2
Newbie
*
member is offline

[avatar]



Joined: Apr 2007
Posts: 2
 Re: GMDefrag, when ID numbers get too big
« Reply #10 on Apr 6, 2007, 3:44pm »

nice :)
Link to Post - Back to Top  IP: Logged

[image]
orange451
Guest
 Re: GMDefrag, when ID numbers get too big
« Reply #11 on Jan 18, 2008, 10:10pm »

can you get this to work with gm7?
Link to Post - Back to Top  IP: Logged
clam
User
***
member is offline

[avatar]

Even I don't know where my name came from!!

[icq] [msn]

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.
Link to Post - Back to Top  IP: Logged

Ignorance is an invincible foe, as it knows nothing of defeat...
IsmAvatar
God
*****
member is offline

[avatar]

Good Samaritan

[icq] [yim] [msn] [aim]
[homepage]

Joined: Nov 2003
Gender: Female
Posts: 1,062
 Re: GMDefrag, when ID numbers get too big
« Reply #13 on Jan 19, 2008, 2:42am »

Good idea. Sure. It'll take a while for me to program it, tho, so be patient. Probably no more than a week.
Link to Post - Back to Top  IP: Logged

RPG tools
LateralGM
LateralGM Forum

Find me on Jabber/XMPP/Google Chat/email:
IsmAvatar at gmail dot com
   [Search This Thread][Send Topic To Friend] [Print]

Affiliates:

LGM



Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!