Pure C++ example
by Samme Ng · in General Discussion · 11/08/2003 (7:48 pm) · 7 replies
Hi all,
I have purchased the TGE and testing around. I am going to use this engine to make a MMORPG for commercial.
By looking in the demo, I found it is almost SCRIPT driven sample. Since I don't want to use script in the commercial product to prevent from user's modification.
I would like to know if there are samples code not using script and all done in pure C++? How about other commercial product if they also using the script as the back bone?
Thanks!
Samme
I have purchased the TGE and testing around. I am going to use this engine to make a MMORPG for commercial.
By looking in the demo, I found it is almost SCRIPT driven sample. Since I don't want to use script in the commercial product to prevent from user's modification.
I would like to know if there are samples code not using script and all done in pure C++? How about other commercial product if they also using the script as the back bone?
Thanks!
Samme
#2
In your case, it shouldn't make much difference if the end user modifies the server scripts, as the server won't be running on their box anyway. And if you design it right, the only things they will be able to modify with the client scripts will be UI related stuff.
11/09/2003 (12:49 am)
Actually, the scripting in Torque is well suited for what you have in mind. As there are client side scripts and server side scripts, you just need to make sure you don't expose anything to the client from the server side script that you don't want exposed. In your case, it shouldn't make much difference if the end user modifies the server scripts, as the server won't be running on their box anyway. And if you design it right, the only things they will be able to modify with the client scripts will be UI related stuff.
#3
Imagine having to recompile your server code every time you want to add a new item into your server?
Script code is great in that it can be executed "on the fly" using the "exec" call.
Phil.
11/09/2003 (1:13 am)
Actually, doing some of this stuff in script is MUCH better than C++ code.Imagine having to recompile your server code every time you want to add a new item into your server?
Script code is great in that it can be executed "on the fly" using the "exec" call.
Phil.
#4
Yeah, theres basically 2 types of scripts, server ones and client ones. Server ones control all the aspects of the gameplay etc, whereas client ones are to do with options, guis, etc.
But either way, you would give the client only the client scripts, and the compiled ones at that, so they would have no idea how they worked (until someone made a decompiler for dso's) and even then, they couldnt cheat unless they actually hacked into your computer, and uploaded their version of the dso file. So, in summary, You dont want to make a game like a MMORPG without scripts ;) See Phil's comment.
That and Torque is very script-centric, and itd be harder to get it working without scripts than to just learn the scripting lanuage.
11/09/2003 (5:58 am)
Yep, yay scripts :D I love them so.Yeah, theres basically 2 types of scripts, server ones and client ones. Server ones control all the aspects of the gameplay etc, whereas client ones are to do with options, guis, etc.
But either way, you would give the client only the client scripts, and the compiled ones at that, so they would have no idea how they worked (until someone made a decompiler for dso's) and even then, they couldnt cheat unless they actually hacked into your computer, and uploaded their version of the dso file. So, in summary, You dont want to make a game like a MMORPG without scripts ;) See Phil's comment.
That and Torque is very script-centric, and itd be harder to get it working without scripts than to just learn the scripting lanuage.
#5
But actually the server side will not running TGE as we will use other scripting language for our online game server engine.
What I am afraid is that the user(or hacker) learn the programming technique used in the client side, as if they can view the scripting text.
However, if it is possible to pre-compile the .CS to .DSO and no one easy to understand, that is ok.
By the way, I didn't find a tool to compile the .CS to .DSO, is there one to?
11/09/2003 (7:41 am)
Thanks for all!But actually the server side will not running TGE as we will use other scripting language for our online game server engine.
What I am afraid is that the user(or hacker) learn the programming technique used in the client side, as if they can view the scripting text.
However, if it is possible to pre-compile the .CS to .DSO and no one easy to understand, that is ok.
By the way, I didn't find a tool to compile the .CS to .DSO, is there one to?
#6
11/09/2003 (8:03 am)
Nope, the script files (.cs) get compiled once you run the game/the scripts are accessed. So I guess you would at least have to run the game ONCE and then distribute everything except the .cs-files to "the players".
#7
11/09/2003 (9:56 am)
Put in the root directory main.cs this will compile all cs and gui files without having to execute everything.function compileAll()
{
for(%file = findFirstFile("*.cs"); %file !$= ""; %file = findNextFile("*.cs"))
compile(%file);
for(%file = findFirstFile("*.gui"); %file !$= ""; %file = findNextFile("*.gui"))
compile(%file);
}
Torque Owner Edward Smith
Silencersoft