Game Development Community

Brand new to torque and programign in general

by Jarrod Coolen · in General Discussion · 04/26/2011 (1:42 pm) · 7 replies

Well first off let me introduce myself since this is my first post. Im Jarrod im from canada and im a self taught 3ds max intermidate level artist. I purchased torque 3d a few months ago as well as a book titled "3d game programing all in one second edition" though im jsut startign to work with the engine and read the book now.
so now for my questions. firstly the book the book is written for an older version of TGE but im hopign that much of the lessons will still be applicable to torque 3d, if this is not the case could someone point me in the direction of a textbook that is more relevant.
second for the game i am planning i'm mostly definatly going to need to modify the eninge but i dont know c++ at all so im wondering if anyone could recomend a book or 2 that would at least give me a general idea of how to read and modify the engine code, or even some free guides that are good for beginners.

About the author

I live in halifax canada with my girlfriend and our son. I have been teaching myself 3d modeling off and on for a few years, finaly have the time now where i can get serious with it. will model for food btw


#1
04/26/2011 (6:19 pm)
Welcome to the community! :)

Can you give us a basic idea of the modifications you want to achieve with the engine code?
Many aspects of the book are still working, some of them might be differently handled now.
#2
04/26/2011 (7:55 pm)
Well without giving away to many of my ideas essentialy i want to make a fps game played with tanks instead of people (not overly original i know, but im doign it for fun and experience more than anything). I would like to have it so that the tank takes different amounts of damage dependign where it was hit i.e. hits to the front do 20% damage becuase its the most heavily armored part, hits to the turret take 50% damage, hits to the side 40% and htis to the rear 100%. i also want to the mouse to move the vehicles turret independantly of the wsad movement controls, so the tank could be moving foraward and shooting to its side for example.
mind you i am just starting so mostly everythign i want to do is just notes on paper and in my brain at this point. But i have plenty of time to learn and the resources to make it happen.
Im not sure if i would need to modify to engine to make this happen but from my research it seems to be the case. I just started with my giant textbook yesterday and its goign to be at least a month i'd say before im done reading it and actually get started putting my ideas into action let alone workign with the engine code, but finding some good c++ books for beginers for me to read after this book would be great.
#3
04/27/2011 (3:29 am)
Ok, I would say you don't need any more books for the moment, unless you want to get deeper into programming in general.
Furthermore I think your gameplay idea is pretty much without engine modification achievable. There are example script, that get delivered with T3D, e.g. the car script.
Here is a general guide for vehicles.
This is a tutorial for advanced camera modes and I just saw that your rig is included. You just have to figure out how to link the turret to the camera, but that should not be a big deal.
For the damage, there is a great add-on, the Guide Bot. Check-out the description about the effectors. It's in the graph and it says legs, spin, body, etc. You can use that for the tank parts or get inspired by that.
In my opinion, it's better to do learning-by-doing. After the "all-in-one" book, which already gives a nice introduction to C++ btw, you can start right away to make your game.
Beside that, here are recommendations for some books I possess:
Beginning C++ Through Game Programming
Character Animation With Direct3D
The Ultimate Guide to Video Game Writing and Design
The titles may appear a bit long, but hey, they deserve the title-space ;)
#4
04/27/2011 (8:24 am)
awesome! i will check these things out, thanks!
#5
04/27/2011 (10:49 am)
Quote:
i want to make a fps game played with tanks instead of people
Stock Torque vehicles include a wheeled vehicle, hover vehicle, and a flying vehicle. If by tank you mean the typical tracked tank then some source code modification will be needed. I don't recall a tank Resource but there are a few for other vehicle types... and there is/was a tank content pack (multiple) I just don't remember who released it.

Quote:
tank takes different amounts of damage dependign where it was hit i.e. hits to the front do 20% damage becuase its the most heavily armored part, hits to the turret take 50% damage, hits to the side 40% and htis to the rear 100%
In stock Torque only the player class has any idea about which area of the body is taking damage, but it does so by using a 'best-guess' calculation of where that damage occurred based on the hit percentage of the bounding box information stored in the player datablock. You have two choices, extrapolate something similar (hackish) or implement hit-boxes for your new/modified vehicle class. See here and/or here for ideas/implementation/example -- the latter is more up to date.

Quote:
want to the mouse to move the vehicles turret independantly of the wsad movement controls
This will also entail another source code modification. I *believe* there was a Resource example that demonstrated how to split the movement/look controls apart for vehicles. Although it may be possible for the turret to automatically be controlled through script without regard to vehicle movement depending on how the tank class is implemented. But the actual tank and turret will be a source code modification.
#6
04/27/2011 (11:42 am)
The Vehicle Camera Mouse Control - Driving and Looking Resource shows a basic implementation of splitting vehicle movement/look controls apart.
#7
04/27/2011 (1:02 pm)
awesome, more useful stuff to look at. with community support this good im startign to believe my project could actually get finished someday lol. thanks guys!