Game Development Community

.dso compiling algorithm

by The Block · in Torque 3D Beginner · 08/28/2013 (1:17 pm) · 9 replies

I'm new to Torque3D, and I'm planning to create a small game. I want to keep it closed-source, so nobody can figure out how the game works. But I'm very worried that somebody can just download the engine's source code, find the algorithm, and make one which can decompile the .dso files. So I plan to modify the standard algorithm, and add some more steps to it in order to ensure greater security.
Where can I find the code for creating a .dso in the source code collection of Torque3D?
I'm not asking how to decompile the .dso. I'm asking for the algorithm to compile it.

About the author

Recent Threads

  • Creating .dso files

  • #1
    08/28/2013 (3:45 pm)
    Everything to compile TS is included in the source files. It has all the typical compiler type definitions needed for this. I "think" these are in the console section of the code.
    #2
    08/28/2013 (3:49 pm)
    I can't recall off the top of my head where compiling code is, but if you do a find in files for CompileAll that should put you on the breadcrumb trail back to it.
    #3
    08/28/2013 (5:15 pm)
    This is a really interesting technical issue that I never thought of. How do you do something like this as an open source engine? Hmmm. The Block is totally correct, someone could very well DL the source and reverse engineer the .dso stuff. Interesting Issue.

    Ron
    #4
    08/28/2013 (5:38 pm)
    I'm currently trying to find the file which the algorithm is in. I made a quick script in TorqueScript to search for any text related to "Compile" in the game engine's source code directory. So far, I've found hits with the variable '$CompileAll' in them
    But no luck with the algorithm.

    EDIT: I did some more searching and found 2 files called 'compiler.cpp' and 'compiler.h', but I don't know C++ too well.
    Do any of you guys think the algorithm is in those?
    #5
    08/28/2013 (7:01 pm)
    You know people decompile Minecraft all the time. The whole thing is written in Java, except for specific libraries. I think you may spend a lot of effort with little gain. I am not exactly sure what you are protecting yourself against here. This could be done to any scripting language.

    The algorithm is just compiling to bytecode. The easiest way to change it is change the bytecode values and recompile the entire project.

    What you want is in Compiler::CompiledInstructions in compiler.h. Change the order of the instruction or pad some bogus ones in there. It will make your DSOs incompatible with a decompiler based upon the stock compiler. The algorithm for compiling was written by compiler tools designed to create the compiler.

    If your code is so secret and unique then maybe it should be in a C++ function call. Then again, you can decompile that too.
    #6
    08/29/2013 (11:08 am)
    I noticed and somehow the extra length can be changed and put another custom dso, that's just an idea, just as plays change the códijo source, like the reference to the zip files.

    Ideally, try not to show the correct identity of the engine, ie by all means do not identify with torque 3d, it's just my idea.
    #7
    08/29/2013 (11:48 am)
    Anything you can do, someone will undo. The harder you make it, the more people will try to break it. If you come up with something truly revolutionary the brightest minds on Earth will team up to unravel it. In almost no case will your attempt to protect your scripts or assets last more than about 90 days. There are better ways to spend your time - like making your game cool instead of hard to hack. Though if your game is not cool because you spent your time making it hack-proof no one will hack it....
    #8
    08/29/2013 (1:35 pm)
    totally agree with Richard, commercial games to end up being usurped and that just means that they have been successful for more than try always released pirated versions of GTA IV, Crisys, the sim and what about the scripts.

    Instead of thinking about it, as Richard mentioned is better to focus on a good game.
    #9
    08/29/2013 (3:49 pm)
    IMO the best games are designed to be hack...er...modded. The main reason to decompile code is to mod the game. Not to steal IP. The code is irrelevant in that it would take more effort to decompile and make sense of the stupid code than it would to just write it from scratch (for the most part). The gaming industry is very good about sharing concepts in algorithm form. So there is really no incentive to reverse engineer a game unless you are modding. So: WRITE AN API FOR YOUR GAME FOR MODDERS!

    Bethesda does this and does it well. Hell they even support people writing real time DLLs that attach to the process to talk to game internals of the engine itself. That is hacking the C++ compiled code. As with Minecraft. There are APIs to mod the game. They almost encourage reverse engineering. 11 million sales cannot be wrong. That is $26 x 11 Million for the $#!7tiest graphics in a game on the market!