Game Development Community

Beginner looking into TGE

by David Martin · in Torque Game Engine · 03/26/2007 (12:25 am) · 12 replies

Hey there guys. I have a couple of questions from someone who has only recently come across this Torque engine.

I have a reasonable experience with programming in VB 6 and then VB.NET 2003. I know that the coding in C++ is a fair bit different but I'm still of the view that any prior programming knowledge will be helpful in gaining an understanding of another. I have worked on some sports simulation games in VB.NET and will continue to do so but for a bit of a change I've been interested in trying out some 3D things. VB.NET, even with Direct X capabilities, is far from suitable for this.

During the holidays, when I have free time, I'm most likely going to purchase the TGE indie licence. What will I need to get me going with it basically? I hear all this talk of 'compilers'. I don't even know what they are. I have a student edition of Visual Studio 2003, given to me for use of VB.NET. It has C++ in it. Is that what you'd call a 'compiler'?

As for actually making something in TGE, what is it like? Are the basic structures all that different from VB.NET? Is coding in raw C++ neccesary? I have the demo and had a little fiddle around with the editors but never did I see just a basic page where you type in code like I was expecting.

Can someone please point me in the right direction and tell me what I should be looking at getting. Any books, starter kits, additional programs etc.

Things that I have that may be of some use:

Visual Studio 2003
3D Studio Max 6 (Can get 8 if needed)
Adobe Photoshop 7.0
Microsoft Paint (Hey.....when isn't this handy? :))

Thanks for your help guys (anticipation that some people will help ;))

-Dave

#1
03/26/2007 (1:05 am)
Hi and welcome,

you have 2 things to learn, first is TorqueScript look at any .cs file in the Demo. With this script language you programm your game, missions, guis, etc.
If you buy the tge or. tgea you have the full c++ source code, if you download the demo you have just the "game" code. Access to the source is necessary if you wanna make engine modifications. And in the most cases you must, or want that.

visual studio has a integreated compiler :) and you get code examples with the Demos, you have a documentation, and a really great community!

And you dont need to buy max 8/9 6 shoult be ok, i us 7 and happy with.

-Miguel
#2
03/26/2007 (1:36 am)
How do you edit the torquescript "game" code? I've looked over a couple of the .cs files. They open in Visual Studio. In what environment do people use the torquescript? I was expecting some kind of environment similar to what I use in VB.NET. Is there some environment that comes with TGE that you use to code the torquescript? Do you need to use maybe a text editor instead?

Also, what exactly do you mean by making engine modifications? Take for example, I want to make a game that has two people throwing a ball to each other. It has a couple of variables in it such as possibly wind and throw strength which then results in the person either catching it or dropping it. Talking some pretty simple stuff except for perhaps the animations that would possibly take some time to make. Would the torquescript be able to cover this? I'm not quite understanding the difference between coding in torquescript and then modifying the engine. I'm not quite sure really what this engine is specifically.

Is it the case that the only games that you are able to create just using torquescript are pretty generic based on the set template functions of TGE? And anything more original requires C++ programming? It just seems that the TGE engine is set up for action games and such because I see things such as Map editor and Mission editor but what if I wanted to make a soccer game or a racing game?

Thanks for your help bud. The speedy response gives a good impression of the community which no doubt will be vital for any future use of Torque.
#3
03/26/2007 (2:14 am)
To edit .cs files i use Codeweaver www.torquedev.com/,
but you can use Torsionwww.garagegames.com/products/106/
they are more around just search in the forums, and sure you can use a simple texteditor.

let me try to explain the SourceCode/Script Code thing a bit:
in the source you have all the basic functions routines that you need to load models render etc, then you have console functions that you make in c++ engine code, but then you can program your game with TorqueScript(.cs) and dont need to recompile everytime the whole Engine+thegame to test something,

if you wanna make as example a mmo or a fightig game like Tekken, a realistic racing game, something with realistic phisycs, etc. you need to modify the engine. TGE was for a Multiplayer FPS and not for a Tennis game for example. But in anyway its still much here, a lot of Community additons to the engine, and if you start work with TGE is a bit complicated all the stuff at the beginning or more is a lot of things you have to learn, about TGE. But its fun :)
#4
03/26/2007 (2:23 am)
How do you edit the torquescript "game" code? I've looked over a couple of the .cs files. They open in Visual Studio. In what environment do people use the torquescript? I was expecting some kind of environment similar to what I use in VB.NET. Is there some environment that comes with TGE that you use to code the torquescript? Do you need to use maybe a text editor instead?

Also, what exactly do you mean by making engine modifications? Take for example, I want to make a game that has two people throwing a ball to each other. It has a couple of variables in it such as possibly wind and throw strength which then results in the person either catching it or dropping it. Talking some pretty simple stuff except for perhaps the animations that would possibly take some time to make. Would the torquescript be able to cover this? I'm not quite understanding the difference between coding in torquescript and then modifying the engine. I'm not quite sure really what this engine is specifically.

Is it the case that the only games that you are able to create just using torquescript are pretty generic based on the set template functions of TGE? And anything more original requires C++ programming? It just seems that the TGE engine is set up for action games and such because I see things such as Map editor and Mission editor but what if I wanted to make a soccer game or a racing game?

Thanks for your help bud. The speedy response gives a good impression of the community which no doubt will be vital for any future use of Torque.
#5
03/26/2007 (2:26 am)
How do you edit the torquescript "game" code? I've looked over a couple of the .cs files. They open in Visual Studio. In what environment do people use the torquescript? I was expecting some kind of environment similar to what I use in VB.NET. Is there some environment that comes with TGE that you use to code the torquescript? Do you need to use maybe a text editor instead?

Also, what exactly do you mean by making engine modifications? Take for example, I want to make a game that has two people throwing a ball to each other. It has a couple of variables in it such as possibly wind and throw strength which then results in the person either catching it or dropping it. Talking some pretty simple stuff except for perhaps the animations that would possibly take some time to make. Would the torquescript be able to cover this? I'm not quite understanding the difference between coding in torquescript and then modifying the engine. I'm not quite sure really what this engine is specifically.

Is it the case that the only games that you are able to create just using torquescript are pretty generic based on the set template functions of TGE? And anything more original requires C++ programming? It just seems that the TGE engine is set up for action games and such because I see things such as Map editor and Mission editor but what if I wanted to make a soccer game or a racing game?

Thanks for your help bud. The speedy response gives a good impression of the community which no doubt will be vital for any future use of Torque.
#6
03/26/2007 (4:13 am)
Not sure why my post keeps on duplicating here.....
#7
03/26/2007 (6:22 am)
When you hit reload, or back, after posting your post gets duplicated. Just post and navigate back to it from the main community page or a bookmark.

.cs files open in Visual Studio because that is the same file extension for C#. You can change the file open preferences and allow the file to be opened with whatever you choose.

To break it down to the most simple explanation, TorqueScript (.cs) files can be opened and modified using only notepad. You can edit and save the files, and any script functionality you just coded will be immediately available and working in your game.

The benefit of using a TorqueScript IDE (Torsion or Codeweaver), is that you get text highlighting, intellisense functionality, debugging capability, and project organization.

Miguel nailed it on the head when talking about the difference between engine code and script code. If you just want to change a weapon's behavior, or remap your controls, you'd be using script. If you wanted to integrate an advanced physics or AI engine, you'd have to modify the engine (C++) code, and recompile the executable.
#8
03/26/2007 (7:19 am)
Torque can do a preset list of things by itself, for example the projectiles are affected by gravity, drag, all the normal stuff. But if you want them to heat seek you would have to make an engine mod. Torque Script can do almost anything that doesn't require updates every frame like heat seeking. While technically it could that would be a very very bad idea. Basically the engine runs torquescript, torquescript tells the engine to do things and then the engine does them, but the engine only understands certain things adding a limitation.

To create your ball game I would create a projectile that looked like a ball, then when it impacts a player they "catch" it and gain the ball into their inventory. I have a couple projectile resources,

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9448

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8154

Those use projectiles in ways that arent normally used (normally their just bullets out of a gun). If you want me to make one for the ball I can do that.
#9
03/26/2007 (10:27 am)
I definitely recommend Torsion as mentioned above, - it is the best tool for TorqueScript editting bar none.
#10
03/26/2007 (11:06 pm)
Well thanks for this help here guys. I still plan on continuing to make my AFL simulation in VB.NET as it provides everything that I need and I already know all of the necessary skills as it requires little graphics. My main reason for wanting to use Torque is really a 2 part reason.

1) I want to make something fun and exciting, even if it is just modifying the FPS/RPG/RTS packs etc. With Torque I'd be able to make something that looks pretty which is something really beyond the realms of VB.NET

2) I want to make my way into the world of C++. I reckon that this could provide a good avenue as I'd be able to firstly become familiar with TorqueScript and then delve into full on C++.

Another question:

When you purchase and I'm guessing download TGE, what do you in fact get? Surely there'd be a fair bit more to it than what's available in the demo?
#11
03/27/2007 (5:43 am)
You'll get the full source code, access to TDN, and access to the private forums. Those are the main features of a SDK purchase.
#12
03/27/2007 (10:37 am)
Since you are new to TGE I would highly recommend the following books:

3D Game Programming All in One, Second Edition

Advanced 3D Game Programming All in One

The Game Programmer's Guide to Torque: Under the Hood of the Torque Game Engine

These books are a valuable asset for the beginner and a great resource.