Game Development Community

Danger of code modification?

by baylor wetzel · in Torque Game Builder · 07/03/2006 (12:26 pm) · 2 replies

I come from a world where they hit you with big sticks if you change a 3rd party tool's source code. Many has been the time that some project bought a tool and tweaked it's code only to lose it all when they upgraded and wiped out their changes

From what i gather reading these posts, is it recommended/encouraged to change TGB's code?

From testing for a few days, it seems like TGB can do pretty much anything with scripts. Is there any reason i'd want to modify the code?

If i modify the source code, would there be any risks? For example, when i upgrade to TGB 2, maybe it would wipe out my changes or my changes wouldn't work with it

#1
07/03/2006 (12:38 pm)
Having access to the Source code means you can do anything to TGB you want, that isn't in the engine already, or modify what there is. There are large amounts of resources that require source code modification, however it depends on the needs of your project.

If you modify the source code, you have to recompile the executable. You will find that modifying the C++ Source Code may return compile errors if your code is wrong / bad / evil / whatever, you just have to fix those errors - it's normal for any executable compile.

TGB 2 ? If you are refering to upgrades, it's going to be upgrade specific. If you say, add modifications to the TCPObject in the Source Code, and GG brings out a new TGB with modified TCPObject source code, your going to have to work around that, and fix any issues if they arise.
The thing is, Source Code, while is more likely to be harder to fix than script code, is not the only thing that can be broken when upgrading your executable to the next version. For example, your scripts can also break.

People wrote scripts for Alpha T2D (Now TGB), which broke in the Beta, and broke in the Release build. ;)

Hope that helps,
- Tom.
#2
07/05/2006 (8:48 am)
In TGB you can add source code fairly easily and in a way that shouldn't break with newer versions (or at least has a lesser chance of breaking). By subclassing, etc, y ou can accomplish quite a bit that you can carry with you with further versions of TGB :)