Game Development Community

Torque scripts

by David Hollister · in General Discussion · 01/12/2003 (2:18 am) · 7 replies

Well, I purchased/downloaded torque yesterday, and I have now modded the racing mod with my very own bike (pretty ugly though, and it doesn't act like a 2 wheeler....) But something concerns me as I play around with these scripts and models... Is there any way to keep someone who is playing your game from screwing around with it. I mean, mods are great. But if I'm playing against someone and their script is changed so that they are faster or their map is different or their bike is 3 times the size of mine, well it wouldn't be much fun for me.... I would assume the server does some sort of checking prior to starting the game (I haven't done anything with multiplayer yet, and as I say I downloaded the SDK yesterday, AND I have no prior experience w/Torque, Tribes 1/2.)... But does it check everything? Maybe there is something in a script I don't want someone else to see (can't think of an example right now... But it is 4:30 AM). I guess what I'm getting at is - is there any way to hide the scripts. Maybe combine them all into one binary resource or something. If the answer to this is blatantly obvious, or if it has been answered before, I apologize. And I probably already know the answer - "You have the source code. Make it do it." Anyway, glad to be here (and I'm going to sleep).

David

#1
01/12/2003 (2:47 am)
when you run the .exe file, any .cs files being used are automatically compiled into a .dso file which is unchangable. Just distribute the .dso files instead of the .cs and you'll be fine on that score.
#2
01/12/2003 (2:55 am)
All the important stuff (speed etc) is done in server scripts... this means that the server sends all the info to the client, so the client will have exactly the same speed etc as every one else. Unless you specificly make some of these things handled in a client side script for some reason then players would have to hack the exe file to make themselves faster etc... and then they probably couldnt connect to the server (im not to sure about that).

Remember... Torque is what Tribes 2 used, and since Tribes 2 was so hard to hack, your game should be too.

Hope that answers your questions.
#3
01/12/2003 (10:14 am)
Yes, it does. Thank you very much!

David
#4
01/12/2003 (10:32 am)
Apparently, you should leave the main.cs in script form, the one at the root of the example folder : that's how the 21-6 guys set up the Orbz demo, ie everything in .cs.dso,except the main.cs file.
Otherwise the engine will complain about a missing .cs file :)

Caveat emptor : that's doesn't prevent anyone from mucking with the scripts, since to replace a .dso, they only have to write a .cs file corresponding to the one you want to replace, which if you've used the example hierarchy and scripts is not that hard for someone intent on hacking.
Of course, they do need some knowledge to do that, it's harder than just changing a variable value. And it doesn't prevent cheating in single player game, since server and client are then one, and unless you disable the drop down console (not sure I'd want to), there is nothing stopping them from mucking with the system.
#5
01/12/2003 (12:09 pm)
Well, it just seems that some games seem to make it easy for single players to cheat (ex. Neverwinter Nights). They rely on self-policing to ensure the player stays on the level. And I suppose anything written w/Torque is the same. Although, there has never been a way to stop someone with a hex editor and a lot of spare time. And I guess, what difference does it make?? I mean if someone cheats at a single player game, who cares?? I don't know. It just seems a little odd to leave large chunks of game logic in ASCII text. But, the .dso files would seem to solve most of that.

David
#6
01/12/2003 (12:38 pm)
I doubt the DSO's provide very much protection against someone who really wants to see how the game ticks.

I mean, aren't they just tolkenized when they are in DSO form?

As far as multiplayer, cheat protection is very ingenious in that it doesn't matter what the client scripts say (for the important stuff).
#7
01/12/2003 (12:55 pm)
Anthony : granted, in that regard, I really like the way TGE handles this.

David : well, for that you have to understand that the basic premise of using scripts for a lot of the game code is that it allows you to modify stuff, experiment, etc. without having to rebuild the whole executable.
And you can hide all the scripts, as well as the rest of your contents in zip files, if you're so inclined (the .vl2 of Tribes II).
I don't know the present state of that feature in TGE, but afaik, it works.
You could modify it, and make it even harder for your users to muck with the game by password protecting the content/scripts archives, but as you say, that wouldn't deter a determined haxor for really long, ie he could find the password in the exe, and then use it to decompress the archives, etc.

But personally, I wouldn't have it any other way : it allows you an incredible degree of freedom, and nothing is stopping you from rolling back stuff in the scripts into the C++ engine, be it for performance reasons, or any other.
It's not for nothing that's it not a trend any more, but more like a standard way of doing things, not only in the games industry, but for all sorts of software application