Hi there, how i can remove the Editors ?
by BRIOL Valerie · in Torque Game Engine · 06/28/2004 (6:46 pm) · 6 replies
Hi there,
I have a little question, how we can remove or desactivate the editor of Torque ?
Imagine, i make a little game and i don't wan to let ppl go in the editors with the Key F10 or F11.
Can i told to my VC++ do not include the editors ?
Many thanks.
Kiss
Val
I have a little question, how we can remove or desactivate the editor of Torque ?
Imagine, i make a little game and i don't wan to let ppl go in the editors with the Key F10 or F11.
Can i told to my VC++ do not include the editors ?
Many thanks.
Kiss
Val
#2
Actually you can just go to the start of the editor functions and insert....
return 0;
and that will abort all the following code of course. So if you had a function like this(just an example....
you could just insert the return.....
And none of the code after it will run. Also, by doing it this way, you can easily comment the returns out like this...
And restore the full functionality.
06/28/2004 (9:10 pm)
"This will take some work and I don't know of anyone who's done it but I think it's doable."Actually you can just go to the start of the editor functions and insert....
return 0;
and that will abort all the following code of course. So if you had a function like this(just an example....
function startEditor(%this)
{
get some values
do some stuff
fire up the editors
finish up
}you could just insert the return.....
function startEditor(%this)
{
return 0;
get some values
do some stuff
fire up the editors
finish up
}And none of the code after it will run. Also, by doing it this way, you can easily comment the returns out like this...
function startEditor(%this)
{
//return 0;
get some values
do some stuff
fire up the editors
finish up
}And restore the full functionality.
#3
If you just fix up your script functions with a return value, then anyone knowing this is a TGE game deletes the editor DSO files and dumps in stock ones from the TGE demo.
You need to fix up the C++ files - removing the editor functionality. On top of that you will need to implement "some functionality" that makes your game unplayable/unstartable if anyone dumps in a stock TGE binary.
06/29/2004 (1:04 am)
Security by obscurity GonzoIf you just fix up your script functions with a return value, then anyone knowing this is a TGE game deletes the editor DSO files and dumps in stock ones from the TGE demo.
You need to fix up the C++ files - removing the editor functionality. On top of that you will need to implement "some functionality" that makes your game unplayable/unstartable if anyone dumps in a stock TGE binary.
#4
Kiss.
Val
06/29/2004 (2:16 am)
Many thanks to you all ! I think the best way it's i need to change some code source in VC++ :-DKiss.
Val
#5
After that, remove the includes that refer to the /editor directory. Done.
06/29/2004 (2:43 am)
Rest assured it's not hard at all. Delete the directory, remove the inits for the editors, and remove the check from gEditingMission (you'll notice it gives errors in like 12 files) and you're mostly done. After that, remove the includes that refer to the /editor directory. Done.
#6
Not the scripts, the engine functions they call. Fire up a useless editor and what do you get? A useless editor.
"You need to fix up the C++ files - removing the editor functionality."
That's what I said. You just misunderstood because I didn't use C++ syntax and I didn't SPECIFY the engine. My mistake was assuming everyone would know the difference.
06/29/2004 (3:57 am)
@ ThomasNot the scripts, the engine functions they call. Fire up a useless editor and what do you get? A useless editor.
"You need to fix up the C++ files - removing the editor functionality."
That's what I said. You just misunderstood because I didn't use C++ syntax and I didn't SPECIFY the engine. My mistake was assuming everyone would know the difference.
Torque Owner Bil Simser
You can remove the supporting files (.cs/.dso, .gui, etc.) that are the editors themselves and disable the F10/F11 keys in your scripts. The only problem with this is that anyone who knows how a Torque game works can add them back in by copying it from another game.
The other option (the ugly one) is to disable the supporting code in your codebase and create a new executable (maybe only have it available if a certain file is present that has a checksum or whatever). This will take some work and I don't know of anyone who's done it but I think it's doable.
Again, you can disable anything. It's just a matter of how much energy do you want to put in to something like this.