Tribes 2 is Torque?
by David J Weaver · in General Discussion · 03/01/2002 (7:59 am) · 7 replies
ok this has been bugging me, ok tell me if i get this right, Torque is the "game" and Tribes 2 is a MOD of the "game", Well i noticed that you have 3 options:
1. Hard code everything (makes it unmodifyable)
2. soft code everything (basically give the engine away NOT A GOOD IDEA)
3. do a mix of both (umm Tribes 2?)
so my question is... i noticed that ALOT of T2 is softcoded, so that I per se could go into it and change almost everything (exept for certain things like Gravity) so is it possible to make an entire new game juat by modifying T2? i know these are normally called "Total conversion Mods" but becouse most of T2 is Soft coded, Could i actually make an entire new game out of T2? (of course no selling or $$ would be involved for certain legal reasons)
1. Hard code everything (makes it unmodifyable)
2. soft code everything (basically give the engine away NOT A GOOD IDEA)
3. do a mix of both (umm Tribes 2?)
so my question is... i noticed that ALOT of T2 is softcoded, so that I per se could go into it and change almost everything (exept for certain things like Gravity) so is it possible to make an entire new game juat by modifying T2? i know these are normally called "Total conversion Mods" but becouse most of T2 is Soft coded, Could i actually make an entire new game out of T2? (of course no selling or $$ would be involved for certain legal reasons)
About the author
#2
In modern programming, code is viewed as existing in modules or components. One way to think about this is the object oriented programming (OOP) model, but the concept is more basic than that. The idea is that if you have interfaces with "known" characteristics, you can use code without having to know what the code, directly, does.
Before "OOP" became the standard, we achieved this with subroutines and modular variables. As OOP has come into play, it's simplified this a lot in a really meaningful way.
The game engine (Torque) is a script processor, renderer, etc. It provides things like gravity and collisions that would be difficult to do from scripting. It provides all the high performance parts of the system.
The code in the scripts calls into the game engine to request services. For example, it might say "every time the game advances a turn, I need this set of functions to get called." All games are turn based, the turns are just so fast that you don't see them. In Tribes case, there are approximately 30 turns per second on the server.
The trick is to squeeze as much processing into each turn as you can. All your gameplay logic needs to fit within a turn; it doesn't necessarily have to finish on each turn, but you can't delay a turn while you "think about it."
So, sometimes, you have to hardcode some processing into the engine to achieve the necessary performance level. You can't do this with Tribes 2, because you don't have code to the engine, and so far as I know, there isn't a dynamic load mechanism for native modules.
Now lets say I write a native code weapon. Does that mean that a modification can't replace the weapon? No, it does not. I can expose that weapon to the scripting system (easily, in fact) and then script on it without any significant effort.
It's just a matter that I choose what behavior(s) I allow to be overridden.
For example, a couple people posted GUI Button hard code to the code snippets section. One alternative to what they did would be to export the events that they hard-coded to the scripting lanaguage, rather than coding it internally to change the state of the button in response to the mouse.
This would let a modification do transition effects, etc., on the button without having to touch the C++ code for the button.
The thing about the forums, code snippets, and resources (at present) is that a lot of these people, because it is independent game development, have never written code for this kind of an environment, especially in any sort of a professional level.
I'll even go out on a limb and suggest that many of the people buying the engine probably haven't had a significant level of formal computer engineering training.
That's not necessarily a bad thing; but what it does mean is a lot of people are working out the examples, and what they need to look like, via trial and error.
Anyway... the engine itself isn't very interesting. It doesn't do much of anything. It runs some scripts, it reads maps, it renders graphics, but it doesn't (for example) know how to shoot a gun.
The scripts tell the engine all the "game rules." If you think about it like Monopoly, the engine is the board, the dice, etc. You could play a lot of different games on a monopoly board; someone could lay out a board the same way, but have a totally different game on it.
Meanwhile, the rules that come with Monopoly say how to play a game; they don't really care about the board for the most part, and where they do care, it's because of the "interfaces" the board provides.
For example, there is a ring of squares around the board. The interface says that you can assign a piece to a square. The rules (game) says how.
03/01/2002 (9:16 am)
This is more of an explanation.In modern programming, code is viewed as existing in modules or components. One way to think about this is the object oriented programming (OOP) model, but the concept is more basic than that. The idea is that if you have interfaces with "known" characteristics, you can use code without having to know what the code, directly, does.
Before "OOP" became the standard, we achieved this with subroutines and modular variables. As OOP has come into play, it's simplified this a lot in a really meaningful way.
The game engine (Torque) is a script processor, renderer, etc. It provides things like gravity and collisions that would be difficult to do from scripting. It provides all the high performance parts of the system.
The code in the scripts calls into the game engine to request services. For example, it might say "every time the game advances a turn, I need this set of functions to get called." All games are turn based, the turns are just so fast that you don't see them. In Tribes case, there are approximately 30 turns per second on the server.
The trick is to squeeze as much processing into each turn as you can. All your gameplay logic needs to fit within a turn; it doesn't necessarily have to finish on each turn, but you can't delay a turn while you "think about it."
So, sometimes, you have to hardcode some processing into the engine to achieve the necessary performance level. You can't do this with Tribes 2, because you don't have code to the engine, and so far as I know, there isn't a dynamic load mechanism for native modules.
Now lets say I write a native code weapon. Does that mean that a modification can't replace the weapon? No, it does not. I can expose that weapon to the scripting system (easily, in fact) and then script on it without any significant effort.
It's just a matter that I choose what behavior(s) I allow to be overridden.
For example, a couple people posted GUI Button hard code to the code snippets section. One alternative to what they did would be to export the events that they hard-coded to the scripting lanaguage, rather than coding it internally to change the state of the button in response to the mouse.
This would let a modification do transition effects, etc., on the button without having to touch the C++ code for the button.
The thing about the forums, code snippets, and resources (at present) is that a lot of these people, because it is independent game development, have never written code for this kind of an environment, especially in any sort of a professional level.
I'll even go out on a limb and suggest that many of the people buying the engine probably haven't had a significant level of formal computer engineering training.
That's not necessarily a bad thing; but what it does mean is a lot of people are working out the examples, and what they need to look like, via trial and error.
Anyway... the engine itself isn't very interesting. It doesn't do much of anything. It runs some scripts, it reads maps, it renders graphics, but it doesn't (for example) know how to shoot a gun.
The scripts tell the engine all the "game rules." If you think about it like Monopoly, the engine is the board, the dice, etc. You could play a lot of different games on a monopoly board; someone could lay out a board the same way, but have a totally different game on it.
Meanwhile, the rules that come with Monopoly say how to play a game; they don't really care about the board for the most part, and where they do care, it's because of the "interfaces" the board provides.
For example, there is a ring of squares around the board. The interface says that you can assign a piece to a square. The rules (game) says how.
#3
i look at the code (scripts) of T2 and see everything that i can change. from Armors to Weapons, how everything looks acts and interacts with everything else is all laid open to us, soooo back to my original Question, Is it possible to make an entirely new game from an existing one? (say T2)
oh and Thanks for the very interesting paragraph, no really i didnt know all that.
03/01/2002 (9:45 am)
Ummm isnt that what i said? lol Torque (or Vl2) is the "game" and T2 is the MOD. im just curious if its not possible to make an entire new game from what were given in T2. i look at the code (scripts) of T2 and see everything that i can change. from Armors to Weapons, how everything looks acts and interacts with everything else is all laid open to us, soooo back to my original Question, Is it possible to make an entirely new game from an existing one? (say T2)
oh and Thanks for the very interesting paragraph, no really i didnt know all that.
#4
That is to say, if you Take T2 and hack its scripts, you STILL need T2 run the game (its a Modification). If you take the V12 engine and make a "GAME" you do not need T2 to run it, its is self serving and functioning
(at least tis my take on it)
-Ron
03/01/2002 (9:59 am)
you can make a totaly converted (TC) MOD (Modification) of T2, but to make a "new" game would require the engine (V12). That is to say, if you Take T2 and hack its scripts, you STILL need T2 run the game (its a Modification). If you take the V12 engine and make a "GAME" you do not need T2 to run it, its is self serving and functioning
(at least tis my take on it)
-Ron
#5
If you put down the $100 and get Torque, not only can you change how the .exe acts, you also get to give people the .exe so that they don't need to buy tribes 2 to play your game.
03/01/2002 (10:51 am)
You can make a new game with just T2, yes. But, only people who have T2 would be able to play your game, since you can only give them the scripts, and not the .exeIf you put down the $100 and get Torque, not only can you change how the .exe acts, you also get to give people the .exe so that they don't need to buy tribes 2 to play your game.
#6
03/01/2002 (12:12 pm)
Cool thats what i was thinking ;) dont worry bout Torque im gonna buy it.. its prolly the easyest and most powerfull (Bang vs. Buck) out there! Nebula is nice (considering its free) but it need's ALOT of work.
#7
Jeff Tunnell GG
03/01/2002 (2:41 pm)
Our motto is "Why make a mod, when you can make a game?" Creating a game or even a mod with the Torque allows you to sell your game if you want, plus your potential customers do not have to buy a different game before they can play what you create.Jeff Tunnell GG
Torque 3D Owner Rodney (OldRod) Burns