Game Development Community

Thinking of buying Torque...

by Thomas "Bulleyes" Cheah · in Torque Game Engine · 12/29/2003 (11:26 pm) · 17 replies

Hi, I am looking forward to purchase Torque, but I had a few questions in my mind. I try email GarageGames but it seems they are pretty slow in replying emails.

Sorry, these might be some lengthy questions. I had look through the FAQs and the online infos. But I still can't really get a clear view of Torque. Just wanted to be 100% sure on some aspects before purchasing it.

Ok, to keep it straight to the point, I will list them out as point.

1. Is Torque a C/C++ game engine library?
i.e. Will I be programming my game mainly in C/C++ using my favourite C/C++ compiler with the classes/functions/libraries in the Torque API? In this case, I will be able to use the C/C++ language features (like OOP, etc.) in my game.

Or I will be using TorqueScript all the time to write my games? (Sort of like programming MODs.) In this case, what tools are used for writing the code, debugging, etc. Is there any IDE for it? (Don't tell me I will be writing in Notepad and using those text printing functions for debugging and tracing my code.)


2. It mentioned that the Graphics Engine is written in OpenGL and Direct3D. Does it mean that the graphics engine have two sets of code? Meaning that I can modify the source even if I have no knowledge in OpenGL but only Direct3D.


3. The specification mentioned a few scripting tools in Torque, e.g. particle scripting, TorqueEdit, TorqueGUI, etc.

I suppose this scripts are used with the game engine to make certain task easier, like particle scripting is for describing the characteristic of certain particle effects in an external file so that it can be loaded in the game code, instead of hard code them in the game code directly.


4. Before purchasing, is there any way that I can get those API docs so that I can play around with the Demo and feel how is it like programming in Torque. The one available online for the non-Torque owner seems very limited to help me start doing something useful with the Demo.


5. Any code sample that I can see how Torque is used in actual games/applications?


6. If I purchase Torque, does it come in a box? Or I just get an account to access the CVS?

Thanks in advance!

#1
12/29/2003 (11:55 pm)
1. Yes, you get the full source, it can be compiled as a libarary or an executable. However, the game logic is usually done in torquescript. There is an ingame script editor being developed called TorqueIDE, there is also an editor called TribalIDE (made for tribes 2).

2. The graphics stuff is done in OpenGl, but there is a Direct3d dll that converts OpenGL commands into direct3d ones.

3. Yeah

4. You cant get the docs until you buy the engine, but you can get realmwars and the demo app, these allow you to mod the scripts. The scripts themselves are the documentation really.

5. I would say realmwars is your best bet.

6. No box, although you used to be able to order a CD... dont know if oyu still can. You do get a CVS account however.

Hope that helps,

Dylan
#2
12/30/2003 (12:03 am)
No more CDs... by the time you got it, the code on it would be out of date. :)

Also, Torque isn't an API you program against, it's more of a framework you program within.

There are a variety of IDEs, and only one scripting language.

I'm probably skipping half your questions, sorry. :) If we did end up missing some importnat issue, ask again and we'll try to address it. ;)
#3
12/30/2003 (3:47 am)
Thanks for all the answers. It really clears things up a bit.

Hmm... back the first question, so can I say that Torque is something like MFC for programming Windows application using Visual C++? What I meant is, I CAN write my ENTIRE game logic in C/C++ with the aid of the functions library in Torque. Or I MUST use TorqueScript to write my game logic, which in this case, C/C++ will be only use for modifying and extending the Torque game engine?

I know using TorqueScript will be a better choice as it's more easier and viable, but I have a set of game utilities library written in C/C++. Using TorqueScript meaning that I no longer able to use those library.

And also, writing my game logic in TorqueScript means that I will be constrained to only the language features in the script. I always prefer to write my code in Object-Oriented approach (esp. when comes to code reusability and design pattern for better team management), and I don't know how OO is TorqueScript.

Or am I just being too paranoid? Or is TorqueScript design in the way that the code will be highly reusable? Maybe someone can share some coding experience here.

Thanks a lot! :)
#4
12/30/2003 (4:51 am)
Torquescript is very OO if you want it to be, you dont HAVE to use it, but all the examples use it, so you'd be stabbing in the dark until you got the engine working without the scripts. A better approach would be to expose your library functions to the scripts with a few macros (this is how all C++ functions are exposed within the engine) and compiling the libraries with the engine.
#5
12/30/2003 (5:47 am)
Since this seems to be the "main" version of this thread (cross posting is bad...tsk..tsk):

1) Torque isn't really an API per se. You are not going to be able to start a blank project and start making calls to Torque. Instead you will be taking the demo and slowly changing it to fit your game (both scripts and C++ depending on your needs). The advantage here is that you will start with a fully functional multiplayer game with a great deal of example code already written. The disadvantage lies in not being able to grab parts of TGE for use in your already written engine. It is a philosophy that some people have trouble adapting to though if you look at the other major players (Quake, Unreal, Lithtech) they basically do the same thing (give you an example to expand into your own game).

You *are* going to have to spend a lot of time coding in TorqueScript (or Python ;) Much of your gameplay logic is going to be written in TorqueScript. It is the "glue" that pulls all of the exposed C++ objects together and actually makes them do something. To give you an example: the player class is defined in C++ but you would actually create the player and add him to the "mission" (loaded level) with a script. The player's collision with the terrain and the interiors are done in C++ (for speed) but if you wanted the player to pick up ammo when he runs over an ammo box you would edit the exposed script callback onCollision() to check to see what type of object you have collided with and if it is an ammo box then add +5 rifle ammo to the player's inventory. As you can see in the example, the low level stuff is in C++ but the gameplay is in TorqueScript. You *could* do it all in C++ but then you'd have to compile the exe (which can take some time depending on the change) everytime you wanted to change the +5 to some other value instead of a 3 sec script change. If you wanted to go a completely C++ route you are going to have a lot of work on your hands but it is theoretically possible (I wouldn't want to attempt it and I have been around this engine for nearly 3 years =)

There are some great tools for editing TorqueScript and there has been a lot of activity in this area recently. TribalIDE has been around for a long while. TIDE has gotten some fresh updates and is a new favorite of some. TorqueIDE is a brand new in-game script editor that is pretty sweet also. Tribal and TIDE have excellent debugging utils.

2) Internally the engine looks like a completely OpenGL engine. The DirectX wrapper is external and translates the OpenGL calls into D3D (as mentioned above...it is kinda spotty these days). If you are going to be changing rendering code you will need to know OpenGL (pretty easy to learn if you already understand D3D).

3) TorqueScript functions both to provide data value desciptions and for logic.

5) All of the scripts are exposed in the demo. Start opening up the .cs files in the editor of your choice (Notepad even ;) and you can quickly get an idea of what is done in scripts. Not a lot of the C++ code is going to be available before purchase.

6) Last I heard you can't do CD purchases anymore (search the forums). You will pretty much be getting a CVS login.


Feel free to hop onto the IRC channel if you have more questions (link is on the right) =)
#6
12/30/2003 (6:20 am)
Torque is NOT a game "library" or "API" it is a complete ENGINE!
#7
12/30/2003 (6:48 am)
Splitting hairs over terminology. I'd say it *is* a library and an API... and an engine.

To make analogies:

Torque ~= Quake3 Engine
TorqueScript ~= Quake3 Game Source
#8
12/30/2003 (7:07 am)
Not splitting hairs being semanticaly correct, so your personal definations are contrary to the accepted industry definations if you think they are all the same some how.

Library implies that it is something modular that can be pluged into a great whole which it is not, Loki, Boost, SDL are libraries since they don't have any stand alone functionality by themselves and must be embedded into another program to be executable or functional.

API implies that there is a standard INTERFACE that there is something to code "too". Direct3D, DirectInput, OpenGL, OpenAL, J2EE, ect. are all examples of "API"'s.

Torque is NEITHER of these and there have been a fair amount of posts recently and in the past where people have thought they were getting something other than a complete ready to run game engine.
#9
12/30/2003 (8:42 am)
You sound almost like an academic, fresh out of a software development class. :-)

I'd put forth that your definitions are somewhat "personal" as well. While modularity is a good trait to possess, it's not necessarily a defining trait. In practice, a library is just a bundle of code that is reused from one project to the next - hence .LIB files. (Granted, .LIB files are a specific, concrete example of what a library is, and doesn't necessarily constitute the whole of it's philosophical qualitative properties.) You could, if you so desired, build a Torque .LIB file and create a dozen different games linking this library/"game engine".

And a library needs an interface to be useful. I think you can guess where I'm going with that bit.

But your right, this area of technical semantics is a little vague.
#10
12/30/2003 (9:01 am)
Actually... you can't, Torque does some tricks in the scripting language that won't work if you put it in a .lib file.

Anyway, the point is, Torque isn't like OGL, D3D, DirectInput, MySQL, Oracle, etc. where you program against an API.
#11
12/30/2003 (9:03 am)
Right, right, sorry about the digression.
#12
12/30/2003 (9:37 pm)
Hmm... if I get it right, the source of Torque Engine will be eventually compiled in an EXE. The EXE will then execute the TorqueScript that I have, which basically contain the game logic. So I will be using the commands available in TorqueScript to code my game.

It sounds really like writing MOD for Quake or Half-Life engine. Does it mean that my script will be eventually exposed to the end user. I don't want my game logic can be modified easily.

By the way, I assumed that TribalIDE and TorqueIDE is a separate product, which means that I need to pay extra for it?

Thanks again! ;)
#13
12/30/2003 (11:58 pm)
When Torque first runs across your scripts it produces a compiled version of your scripts in .cs.dso extension and when you release your game just make sure your .cs scripts are not included only the compiled ones (.cs.dso)
#14
12/31/2003 (6:12 am)
TribalIDE is free and I believe TorqueIDE is also free.

What you would have to pay for is the compilier (unless you can get it compile with on of the free ones), the modeling programer (unless you use a free one and exporter like blender)
#15
12/31/2003 (8:12 am)
Half-Life mods are all done inside a .dll there is no scripting involved in Half-Life or any other version of Quake before Quake III when they introduced QuakeC. So no it is nothing like modding Quake 1 or 2 or Half-Life.
#16
12/31/2003 (9:11 am)
Both TribalIDE and TorqueIDE are separate 'products', but, they are all freebies. There's also a number of other free products you can use for script hackin' - TIDE, ConTEXT with the script highlighing resource, etc. Take a look through the resources section. There's a lot you can choose from when it comes ta' the scripting issues :-)

When it comes to a free compiler environment, take a look at Ming and the Eclipse resource if you don't already own VC++.

As for the scripts - it's up to you what you expose to the end user. Script files (*.cs files) are compiled to .dso files. You have the choice of distributing the .cs files with your project, or, just the .dso files. (Personally, I'm planning on releasing most of the .cs files so that others can write mods based on Trajectory Zone when it's released.)
#17
12/31/2003 (10:06 am)
@Jarrod - QuakeC was part of the original Quake engine too. I know several Quake mods that were written in QC, like the Silly But Fun patch (which was awesome :-).

I think they were compiled into progs.dat, or something like that...