BraveTree Tank Pack for TSE
by Kip Carr · in Torque Game Engine Advanced · 08/09/2005 (11:22 am) · 68 replies
Hi guys just trying to get an idea of what needs to be done to get the tank pack working. I have the tank pack now and followed all the insturctions but when i go to compile the code i am missing the whole dgl folder and that references some platformGL.h file which references more of those and etc.... I dont know what the dgl folder is for and I think the GL stuff is opengl but im not sure. I dont know what i need to do to get this working. Has anyone else had any luck getting it to work with TSE.
I am also interested in the extras pack, car pack, and sparrow pack. All of which i havent tried yet.
I am also interested in the extras pack, car pack, and sparrow pack. All of which i havent tried yet.
#2
08/09/2005 (5:28 pm)
Probably not related to dgl. Are they falling through Atlas terrain? Sounds like there are collision issues.
#3
08/09/2005 (8:21 pm)
Probably missing a collision flag for vehicles...
#4
08/10/2005 (5:06 am)
I dont know if they are falling through my terrain, they seem to be starting way below my terrain so i cant tell what is going on. I have my spawn point above the terrain. If im a soldier then i seem to spawn at that point but if i change me to a tank then i spawn somewhere different (way below terrain) and i just continue to fall.
#5
08/10/2005 (6:04 am)
If you watch your Console (Tilde Key). Does it show any Errors in red? If there are missing scripts or wrong spelled functions it should show in red or at least grey.
#6
I am unsure why it is doing this and i dont even a clue where to start since there arent even any errors to follow off of.
08/10/2005 (8:40 am)
Nope nothing that deals with the tank, except for some splashdata problems which i get with every weapon ported from tge to tse. I am unsure why it is doing this and i dont even a clue where to start since there arent even any errors to follow off of.
#7
Maybe Physics simulation prerenders a few frames to ensure that all Gravitybased objects are perfectly aligned with the terrain.
If your tank doesnt have any collision with the Atlas terrain it will precompute a few steps and these steps will push the tank beneath terrain.
I would try placing the tank even higher in mission editor so that you can actually watch the tank falling thru terrain or not.
[/wildguessing]
unfortunately i dont have the Tank Pack and i cant access TSE right now so i cant test stuff out before posting.
Hope it helps in any way :/
Florian
08/10/2005 (8:54 am)
[wildguessing]Maybe Physics simulation prerenders a few frames to ensure that all Gravitybased objects are perfectly aligned with the terrain.
If your tank doesnt have any collision with the Atlas terrain it will precompute a few steps and these steps will push the tank beneath terrain.
I would try placing the tank even higher in mission editor so that you can actually watch the tank falling thru terrain or not.
[/wildguessing]
unfortunately i dont have the Tank Pack and i cant access TSE right now so i cant test stuff out before posting.
Hope it helps in any way :/
Florian
#8
08/10/2005 (3:10 pm)
I was thinking about buying the tank pack and trying it in TSE myself.
#9
@Florian: Prerendering...? Nothing so complicated in Torque, I assure you.
08/10/2005 (3:41 pm)
Have you tried modifying the collision mask for the tank to enable it to collide with the terrain?@Florian: Prerendering...? Nothing so complicated in Torque, I assure you.
#10
08/10/2005 (4:37 pm)
Just as a follow up, the problem that Kip is experiencing here is actually a problem with getting the spawn location of the tank working properly. His tank is spawning beneath the terrain, and then physics are applied. It therefore never gets a chance to actually collide with the terrain block at all.
#11
Is the determination whether an object is above ground or below it based on the pivot or on the bounding box?
@Kip ... maybe you can post a screenshot of the editor showing the spawnpoint above terrain and the actuall starting position where it spawns?
@Ben ... i just remembered that i saw physic simulations where during the first few seconds stuff just fell from midair because it was placed that way. In order to solve that and to gain a nice look some just started to render the physics engine before the graphics engine starts rendering. As i said: i was just wild guessing ;)
I hate it that i cant reproduce it ... its the kind of problem i love to solve
08/11/2005 (4:27 am)
I was just thinking that maybe the tank actually spawned above the terrain but fell thru it during the first few frames.Is the determination whether an object is above ground or below it based on the pivot or on the bounding box?
@Kip ... maybe you can post a screenshot of the editor showing the spawnpoint above terrain and the actuall starting position where it spawns?
@Ben ... i just remembered that i saw physic simulations where during the first few seconds stuff just fell from midair because it was placed that way. In order to solve that and to gain a nice look some just started to render the physics engine before the graphics engine starts rendering. As i said: i was just wild guessing ;)
I hate it that i cant reproduce it ... its the kind of problem i love to solve
#12
08/11/2005 (10:54 am)
Stephen has it right there. I am spawning below the terrain. I have tried to up my z value for the spawn point with no change. I have screenshoots but I dont know where i can upload my pics to show. Any one have some ideas and i can upload them.
#13
you can open the *.mis file with a text editor and copy and paste the Terrain Datablock and the PlayerSpawnpoint Datablock
Maybe this will suffice
08/11/2005 (12:48 pm)
Maybe it will suffice if you just post the datablocks of your mission file:you can open the *.mis file with a text editor and copy and paste the Terrain Datablock and the PlayerSpawnpoint Datablock
Maybe this will suffice
#14
08/11/2005 (4:20 pm)
Are you using Atlas terrain or the normal TerrainBlock Kipp? The tank physics may be looking for data directly from the TerrainBlock that isn't there.
#15
Here is my .mis file
I put it in code blocks for readablity, i hope it works.
Here is player creation:
This is in game.cs
I made all changes to the files like the instructions say for the tank pack. The main things i canged was that i commented out any includes to simplepoly code and dgl code. Both of these were referenced as header files in the tank code.
08/12/2005 (7:01 am)
I am using the Atlas terrain.Here is my .mis file
...
new AtlasInstance(Game00Terrain) {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
chunkFile = "~/data/terrains/Game_8k_0_0.chu";
tqtFile = "~/data/terrains/Game_8k_0_0.tqt";
materialName = "AtlasMaterial";
detailTexture = "~/data/terrains/details/detail1";
};
new AtlasInstance(Game10Terrain) {
position = "16384 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
chunkFile = "~/data/terrains/Game_8k_1_0.chu";
tqtFile = "~/data/terrains/Game_8k_1_0.tqt";
materialName = "AtlasMaterial";
detailTexture = "~/data/terrains/details/detail1";
};
new AtlasInstance(Game01Terrain) {
position = "0 16384 0";
rotation = "1 0 0 0";
scale = "1 1 1";
chunkFile = "~/data/terrains/Game_8k_0_1.chu";
tqtFile = "~/data/terrains/Game_8k_0_1.tqt";
materialName = "AtlasMaterial";
detailTexture = "~/data/terrains/details/detail1";
};
new AtlasInstance(Game11Terrain) {
position = "16384 16384 0";
rotation = "1 0 0 0";
scale = "1 1 1";
chunkFile = "~/data/terrains/Game_8k_1_1.chu";
tqtFile = "~/data/terrains/Game_8k_1_1.tqt";
materialName = "AtlasMaterial";
detailTexture = "~/data/terrains/details/detail1";
};
...
new WaterBlock() {
position = "17065.7 14783.4 -49.2";
rotation = "1 0 0 0";
scale = "16384 16384 80";
waveDir[0] = "0.000000 1.000000";
waveDir[1] = "0.707000 0.707000";
waveDir[2] = "0.500000 0.860000";
waveDir[3] = "0.860000 8.500000";
waveSpeed[0] = "-0.065";
waveSpeed[1] = "0.09";
waveSpeed[2] = "0.04";
waveSpeed[3] = "0.025";
waveTexScale[0] = "7.140000 7.140000";
waveTexScale[1] = "6.250000 12.500000";
waveTexScale[2] = "50.000000 50.000000";
waveTexScale[3] = "0.000000 0.000000";
reflectTexSize = "512";
baseColor = "5 12 22 153";
underwaterColor = "11 31 46 190";
gridSize = "500";
surfMaterial[0] = "Water";
surfMaterial[1] = "Underwater";
surfMaterial[2] = "Water1_1FogPass";
surfMaterial[3] = "WaterBlendMat";
surfMaterial[4] = "WaterFallback1_1";
fullReflect = "0";
clarity = "0.08";
fresnelBias = "0.12";
fresnelPower = "6";
renderFogMesh = "1";
};
new SimGroup(PlayerDropPoints) {
new SpawnSphere() {
position = "16494 14589.6 50";
rotation = "0 0 1 150.115";
scale = "0.940827 1.97505 1";
dataBlock = "SpawnSphereMarker";
radius = "10";
sphereWeight = "1";
indoorWeight = "1";
outdoorWeight = "1";
homingCount = "0";
locked = "false";
lockCount = "0";
};
};
};I put it in code blocks for readablity, i hope it works.
Here is player creation:
// BraveTree Tank Pack
// Create a tank instead...
%player = new TankShape() {
//dataBlock = ShermanTank;
dataBlock = AbramsTank;
client = %this;
};
%player.mountable = false;
MissionCleanup.add(%player);This is in game.cs
I made all changes to the files like the instructions say for the tank pack. The main things i canged was that i commented out any includes to simplepoly code and dgl code. Both of these were referenced as header files in the tank code.
#16
08/12/2005 (7:02 am)
Had to take out some code ot get it to work with max chars :) but this should be all you need!
#17
08/12/2005 (4:25 pm)
Why did you comment out SimplePolyList? Since the tank collision relies on that it would makes sense that you are suddenly falling through the terrain.
#18
Also, it isnt falling through the terrain it is starting below it and i cant change it.
08/17/2005 (5:44 am)
I commented out the SimplePolylist because there are like 40 calls to dgl stuff. I dont know how to keep it and not implement that file which then need more files and so on. I think i would have to implement opengl in order to get all the errors gone with that. Plus the place that it is referenced in the tank code i cant even see it being used in the rest of the code. Also, it isnt falling through the terrain it is starting below it and i cant change it.
#19
08/17/2005 (8:51 am)
But you dont Spawn at Coordinate (0 0 0) by any chance?
#20
08/17/2005 (10:29 am)
I cant tell where i spawn... from the looks of it i spawn at my spawn point plus some negative z value. I dont know how to check where i am spawning at.
Torque Owner Kip Carr
Default Studio Name