Game Development Community

Tank Pack and TGE 1.4

by Pat AfterMoon · in Torque Game Engine · 12/01/2005 (1:59 pm) · 69 replies

I would like to implement Tank Pack with TGE 1.4 but it seem more difficult than expected. A lot of things have changed since 1.3.

I follow the BraveTree guideline for integrating in "custom version of Torque" (TankPackReadMe.htm) bug I'm stucked at start with too much change in "consoleTypes.h".

Anyone working on same subject ?
Page«First 1 2 3 4 Next»
#61
11/13/2007 (7:17 am)
I've put the fix in from up top there, but it still won't load.

I get an error in the console from line 308 of game.cs saying something like "unable to instantiate non-conobject class TankShape"

Any ideas?
#62
11/13/2007 (7:34 am)
Then the code couldn't create an instance of your class. Did it compile correctly? I have a TGE 1.5.2 compatible tank class on my disk here together with the most recent patches.
#64
11/13/2007 (12:11 pm)
Uhm, well, the user contributed ones, like tread marks etc.

See these threads:

Thread 1

and esp. this one here:

Thread 2

(see my video of how it looks like what I mean with the "patched" one - Tank pack in TGE 1.5.2 with all the user modifications applied like tread marks, turret cam etc.)
#65
11/13/2007 (1:18 pm)
Any way to get this stuff?

I'm still having problems just getting it load! I am NOT a C++ coder (mostly Java for me) and I'm unfamiliar with Visual Studio.
I can't get the game to compile after I put in the new tankShape and simplePolyList classes. It's throwing a bunch of problems like "fatal error C1083: Cannot open include file: 'game/shapeBase.h': No such file or directory"

Is the structure between 1.4 and 1.5.2 that different? Or do I just suck at Visual Studio?



The tread marks and AI look awesome, but I need to get up and running first!!
#66
11/13/2007 (2:50 pm)
Okay, I WAS a Visual Studio Idiot, but I found the directions on the TDN.

http://tdn.garagegames.com/wiki/Torque/vs2k5

Now I'm down to ONE problem:

"c:\torque\tge_1_5_2\engine\game\tankshape.cc(1249) : error C2065: 'mGenerateShadow' : undeclared identifier"

Any ideas? I've seen others had the same issue, but didn't understand any of the fixes I saw or tried.
#67
11/14/2007 (7:10 am)
Alright, for the mGenerateShadow trick, I put in the line

bool mGenerateShadow = true;

at line 60 of my tankShape.cc

This caused a domino of other problems, all of which were outlined above. Fixed by following above directions, mainly putting

void renderShadow(F32 dist, F32 fogAmount);
bool prepRenderImage(SceneState* state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState);

in up higher in tankShape.h, first moving the first line up and adding the second. Again, see above.

SO.

Now I've got a nice clean compile, according to Visual Studio 2005.

But I STILL get the danged "unable to instantiate non-conobject class TankShape" in the console at launch.

Tried a couple of re-compiles, but notta.
#68
11/14/2007 (2:55 pm)
UPDATE:

For anybody else out there beating their heads against the wall. I never could get the dang thing to compile right in Visual Studio. It SAID it did, but wouldn't load the tankShape.

Instead, I ran the build.bat batch file in the VS2005 folder and it worked fine.

Again, I don't KNOW why, but it works. Enjoy.

And thanks to all of those who posted further up in this thread. Great help!
#69
03/08/2008 (3:26 am)
Bought the pack this morning, and thanks to this thread, was able to get it up and running under TGE 1.5.2 in less than 30 mins. Cheers guys!

Some points to note -

the lines:
mGenerateShadow = true;
and
void renderShadow(F32 dist, F32 fogAmount);

can be removed as they are not needed under 1.5.2. DO NOT add the bool prepRenderImage(.... line, as it is not needed either.

In script, in tankDB.cs add these lines to the AbramsTank datablock:
shadowEnable = true;
shadowCanMove = true;
shadowCanAnimate = true;
and the tank will cast an animated shadow that looks really cool.
Page«First 1 2 3 4 Next»