Game Development Community

Coding in C++

by Jonmark Weber · in Torque Game Engine · 04/18/2005 (8:44 am) · 9 replies

Hey all,

David Blake Already gave me a link to what looks like a nice doc to get me off the ground on interfacing with the Torque engine in C++, but I was wondering what other resources there might be to help me learn what Interfaces/Factories/Utilities are already available to me in the source as well as any examples in pure C++...

TorqueScript is cool, and I know that is the primary interface endorsed by GarageGames, but I guess I just like getting my hands into whats going on a bit more. Any help would be tremendously appreciated.

Sincerely,

Jonmark

About the author

Recent Threads

  • Coding in C++

  • #1
    04/18/2005 (9:11 am)
    If you have a good IDE, I recommend doing a search for files containing the words ConsoleMethod and ConsoleFunction, those define the entry points for all script interaction with the engine.

    Read the source, and understand the comments (alot of them don't have comments but oh well), that will bring you up to speed quicker than any method I know of.
    #2
    04/18/2005 (3:33 pm)
    Hi Jonmark,

    Do we need to own Torque 2D to see this material? Thanx.
    #3
    04/18/2005 (7:14 pm)
    Probably. I own the 2D and the 3D SDK's and this site does such a great job of making permissions seamless.

    I will take a look at the source like you mention. I have had a bear of a time finding a good IDE, got any recommendations?

    I am a professional Java Developer and have horribly spoiled with Idea IntelliJ which is the best IDE I have ever seen, but it only really works great for Java... Visual Studio is OK, but I hate Managed C++... So any alternatives would be better.

    Cheers,

    Jonmark
    #4
    04/18/2005 (7:22 pm)
    Thanx Jonmark,

    In another thread it was suggested that we fix stuff as we find it.

    Almost all of the documentation I have seen for Torque 3D refers to Torque Script. Does anyone know of a C++ reference/tutorial etc. for the Torque 3D SDK?
    #5
    04/18/2005 (8:54 pm)
    Hi Phil,

    If you go to the main Torque docs page (www.garagegames.com/docs/torque/), the second link is labelled "Torque Source Code Documentation." This contains a pretty thorough C++ reference for Torque. If you have a specific task, you can probably find a C++ tutorial/resource for it - Torque is much, much too vast to write a "general" tutorial on it.
    #6
    04/19/2005 (12:49 am)
    Are there any simple example programs that we can disect and learn from?

    Its amazing how much easier it is to get a grasp on something when you have a functioning widget to play and modify with.

    Jonmark
    #7
    04/19/2005 (12:55 am)
    TAP doesn't really work that way--it's a full fledged simulation, not an API or SDK that you link in to make programs. There really isn't any way to create a "simple" example program--basically, that's what a starter kit is.

    What you may want to do is to pick a particular system/functionality--movement, or firing a projectile, or manipulating a GUI, and trace that functionality through the simulation to see how it works within the integrated environment.
    #8
    04/24/2005 (11:37 am)
    Does anything like this:

    crystal.sourceforge.net/mazetut/mazetut_tutorial.html

    exist for Torque? This is a C++ tutorial for getting started with another 3D game engine. From most of what I've read the answer appears to be no. I just want to make sure.

    If the answers is no as it appears, how are folks doing real development? Are people writing tens of thousands of line of Torque Script?

    Thanx.
    #9
    04/24/2005 (6:02 pm)
    Nope. Torque provides about 80% of that functionality out of box as a service of the engine.

    People do real development by building on that functionality - for instance, by identifying that they need a new player object, and extending or modifying the Player class to do so (for instance, the RTSUnit class in the RTS kit had its genesis in the Player code, and was then almost completely rewritten). Or perhaps they might need a new GUI control, so they might see how the button control works, then create a new subclass of GuiControl similar to it, and modify it to do what they want. In the process they might learn about the script bindings, the resource manager, how to interact with OpenGL from within Torque, how to deal with mouse clicks, etc.

    The best thing to do with Torque is to identify a localized piece of functionality you want and build that within the existing framework. Then build the next, and the next, and the next, until you have everything you want. That's how ThinkTanks got going, how MarbleBlast was done, how Lore was done, etc. etc. etc. The end result is not recognizably the same code, but they all started from the same base point and got to where they went by incremental, result-focused changes.