GM Obfuscator
Written by Schreib in Java
"I tested this program on a few simple games, and it sure got me. The source code is rendered nearly impossible to read, by anyone other than the amazingly desperate." - anonymouss
"One does not simply undo obfuscation." - Big J
*~ Download ~*
Above link doesn't work? Try this mirror.
REQUIRES JAVA 6.0 OR LATER. Get the latest version at www.java.com.
:GM8: A GM8.1 version is now available! Sprite obfuscation possible! :GM8:

Screenshot of the GM Obfuscator v0.3.0
Update 0.3.0: Massive content update including sprite obfuscation, greatly enhanced obfuscation abilities and is now very unlikely to produce buggy code
Table of contents:
I. What is an obfuscator?
II. What was the purpose of this project?
III. I'm having problems with this! It messes up my game completely!
IV. Who made this program, and what language was it written in?
V. How do I use this program?
VI. "When I open the ZIP all I see is .class files. How do I run the program?"
VII. Screenshots
VIII. Download
IX. Acknowledgements
X. Bugs & Suggestions
XI. Licensing and terms of use
XII. Final words
I. What is an obfuscator?
An obfuscator is a software program that will rewrite source code of a program to make it as unreadable as possible to human agents, often to prevent people from decompiling/reverse engineering the program and exploiting the code and resources in it. This project is such a program - specifically, it will take a
II. What was the purpose of this project?
This project was originally designed to provide an immediate solution to imminent issues Game Maker executables had with decompilation, but has more recently taken on other tasks. Being tremendously more powerful than its predecessor, and much more accurate in preserving code logic, as well as its support for newer Game Maker versions completes what its predecessor had problems with. Remember, this program does not make your games undecompilable. Additionally, this program was NOT designed to specifically counter the decompilation project, as I respect the work put into it a lot. The program's original purpose, and largely its current purpose was respectively is to hinder "noobs" who used the decompiler to understand the game source structure and code. As its obfuscation horizons have expanded greatly, even expert users will have trouble reverting the code back to an understandable format now.
III. I'm having problems with this! It messes up my game completely!
Here are a few pointers.
- Try obfuscating again. Because of the obfuscator's innate randomness, although very unlikely now, re-obfuscation might eliminate an unlikely random error.
- Using an extension package? Because of their nature, you are expected to add all functions and references to the extension package to the Do Not Modify list, as the obfuscator cannot automatically tell what is an extension function and what isn't.
- Use the debug check box. The obfuscator will then insert the original names as comments, allowing you to find the part which Game Maker cannot compile and edit it back to its original state.
- Uncheck "Nasty Obfuscation" and see if the state improves. If so, please contact me and describe the differences.
- Make sure you are not using deprecated functions, such as image_single, move_contact, make_color, external_call0, external_call1, image_single, image_single, image_single or the like. If you are, simply add the deprecated function (without the parenthesis) to the "Do Not Modify" list.
- If you think a particular function or variable is the cause, try adding it to the Do Not Modify list.
- If the problem remains unfixed, uncheck "Rename resources", obfuscate and try to run the obfuscated copy. Once you get an error, take a look in which script or piece of code the error occurs in. Then post the un-obfuscated script or code here. It will most likely be a problem like the ones above, but in the circumstance it isn't, I will see if I can fix other types of problems.
IV. Who made this program, and what language was it written in?
The program was made solely by me, Schreib. I've received much Java help from others, including the person going unnamed who made the decompiler. I want to sincerely thank ISMAvatar for providing such excellent Game Maker editable file format documentation, and xot for assisting greatly in developing clever image obfuscation algorithms.
The program was written in Java using the open-source development platform Eclipse, utilizing JavaX Swing components to make the GUI.
V. How do I use this program?
To run the program under Windows, usually, given that you have Java 6.0 or later installed, all you have to do is double-click the .jar file and it should launch momentarily.
If you're under another operating system and/or this method does not work, try using the following command in a terminal/command window:
java -jar urlwhere "url" is the path to your .jar (for instance, java -jar "C:\Users\Schreib\Desktop\GM Obfuscator 030.jar")
Using program is rather straightforward. Simply select your .gmd (for GM5), .gm6 (for GM6), .gmk (for GM7 or GM8.0) or .gm81 (for GM8.1) file (don't forget to read the license!), specify your settings and process your Game Maker editable to a new location. If you wonder what a certain setting does, hover your cursor over it and a tooltip will appear explaining what it does. Take this final file, open it and create an executable out of it. That's it, your game functions just as well as before, but when decompiled is quite difficult to understand.
If you've used the Sprite Obfuscation option, you may have to take additional steps before creating your final executable. This is explained, however, when you attempt to run your game directly after obfuscation.
VI. "When I open the ZIP all I see is .class files. How do I run the program?"
Internet Explorer tends to think that a downloaded .jar file is actually a .zip file (which it is, in one sense). This rarely happens on later editions, however. Simply make sure that it has the .jar extension.
VII. Screenshots
Here are few screenshots GM project that have been obfuscated.


More screenshots:
- Space Cleaner's sprites have been completely ravaged. [1]
- Space Cleaner works fine despite this. [2]
- The original code for the obfuscated code above. [3]
- Hey, don't ask me, I'm sure this stuff was legible before. [4]
VIII. Download
If you missed the large upload link above, here it is again: JAR (read section VI above, IE6 users!) from one of these two mirrors:
Main link (0.3.0): host-a.net
Mirror (0.3.0): speedyshare.com
Old links (0.2.2, 0.0.3):
mediafire.com
mediafire.com
IX. Acknowledgements
Again, my biggest thanks go to ISMAvatar, for her excellent Game Maker editable file format documentations and GMK encryption documentation and to xot for his invaluable help with image obfuscation algorithms. Thanks to YellowAfterLife for concieving an interesting obfuscation strategy and piluke for being helpful with testing.
X. Bugs & Suggestions
This program has been thoroughly tested on my own and others' GMD's, GM6's, GMK's and GM81's, including a lot of variety such as Drag and Drop, code styling variations and so on. Earlier, this program was slightly prone to some styles of coding, but should be much less so now. Despite this, I still disclaim myself from the possibility that your coding style may cause problems. The program was written in mind with the default Java coding & indentation standard. If it still fails, it will report with an error of the script/code/object in question, Even if it is successful, there is no guarantee that your game will be syntax-error free. Please, PLEASE contact me if your code causes an error.
If you want to report a bug, send me a PM or e-mail me at axiomates@gmail.com with the ORIGINAL file and the script/code the obfuscator couldn't obfuscate. If you have any suggestions, please let me know.
XI. Licencing and terms of use
This program utilizes the .gmd, .gm6, .gmk and .gm81 file formats, jointly created and designed by Mark Overmars and YoYoGames, respectively. I claim no ownership over these file formats whatsoever. This program only uses these relatively open formats and does not interact with Game Maker executables or the Game Maker runner. I hold no responsibility or accountability if the program is not able to read your particular file, and neither does Mark Overmars or YoYoGames. This project is not officially supported by either YoYoGames or Mark Overmars. No illegal use of proprietary technology owned by any party is intended. Please contact me about such issues.
Copyright © 2011 Schreib (axiomates@gmail.com). All rights reserved.
Redistribution and use of this software are permitted
provided that the following conditions are met:
- No modifications whatsoever must have been made to the original package.
This includes modifications to the above copyright notice, this list of
conditions and the following disclaimers, which must all be retained at
all times in the software.
- No commercial profit, whether abstract or concrete, must be made when
redistributing the original package.
In addition, this software must never be reverse engineered, decompiled or
disassembled in any way.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; DAMAGES INFERRED FROM POTENTIAL LICENSE INFRINGEMENTS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
XII. Final words
Well, this is it, again, after many months of work. I am truly happy that I have been able to contribute to helping the community create, and more specifically, secure their games.
© Copyright 2011 Schreib
Edited by Schreib, 25 November 2012 - 04:26 PM.









